Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 6, 2025
1 parent 81e4b44 commit 44ccc7b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
4 changes: 1 addition & 3 deletions comps/asr/src/opea_asr_microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

asr_component_name = os.getenv("ASR_COMPONENT_NAME", "OPEA_WHISPER_ASR")
# Initialize OpeaComponentLoader
loader = OpeaComponentLoader(
asr_component_name, description=f"OPEA ASR Component: {asr_component_name}"
)
loader = OpeaComponentLoader(asr_component_name, description=f"OPEA ASR Component: {asr_component_name}")


@register_microservice(
Expand Down
2 changes: 1 addition & 1 deletion comps/cores/common/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__(self, component_name, **kwargs):
:param component_name: The name of the component to load
:param kwargs: Additional parameters for the component's initialization
"""
kwargs['name'] = component_name
kwargs["name"] = component_name

# Retrieve the component class from the registry
component_class = OpeaComponentRegistry.get(component_name)
Expand Down
3 changes: 2 additions & 1 deletion comps/image2image/src/opea_image2image_microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

component_loader = None


@register_microservice(
name="opea_service@image2image",
service_type=ServiceType.IMAGE2IMAGE,
Expand Down Expand Up @@ -60,7 +61,7 @@ def image2image(input: SDImg2ImgInputs):
image2image_component_name,
description=f"OPEA IMAGE2IMAGE Component: {image2image_component_name}",
config=args.__dict__,
)
)
except Exception as e:
logger.error(f"Failed to initialize components: {e}")
exit(1)
Expand Down
4 changes: 1 addition & 3 deletions comps/llms/src/text-generation/opea_llm_microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

llm_component_name = os.getenv("LLM_COMPONENT_NAME", "OPEA_LLM")
# Initialize OpeaComponentLoader
loader = OpeaComponentLoader(
llm_component_name, description=f"OPEA LLM Component: {llm_component_name}"
)
loader = OpeaComponentLoader(llm_component_name, description=f"OPEA LLM Component: {llm_component_name}")


@register_microservice(
Expand Down
4 changes: 1 addition & 3 deletions comps/reranks/src/opea_reranking_microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

rerank_component_name = os.getenv("RERANK_COMPONENT_NAME", "OPEA_RERANK_TEI")
# Initialize OpeaComponentLoader
loader = OpeaComponentLoader(
rerank_component_name, description=f"OPEA RERANK Component: {rerank_component_name}"
)
loader = OpeaComponentLoader(rerank_component_name, description=f"OPEA RERANK Component: {rerank_component_name}")


@register_microservice(
Expand Down
4 changes: 1 addition & 3 deletions comps/tts/src/opea_tts_microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

tts_component_name = os.getenv("TTS_COMPONENT_NAME", "OPEA_SPEECHT5_TTS")
# Initialize OpeaComponentLoader
loader = OpeaComponentLoader(
tts_component_name, description=f"OPEA TTS Component: {tts_component_name}"
)
loader = OpeaComponentLoader(tts_component_name, description=f"OPEA TTS Component: {tts_component_name}")


async def stream_forwarder(response):
Expand Down

0 comments on commit 44ccc7b

Please sign in to comment.