huggingface / speech-to-speech

Speech To Speech: an effort for an open-sourced and modular GPT4-o
Apache License 2.0
3.31k stars 348 forks source link

Unable to start Inference_demo : ModuleNotFoundError: No module named 'rich' #128

Closed shackdown closed 2 hours ago

shackdown commented 3 hours ago

Hi, i try to follow the blog https://huggingface.co/blog/s2s_endpoint

First i added the HF_MODEL_ID = andito/s2s in env variable, it seems to be mandatory even if we set MODEL in creation form.

image

And after i obtained the issue below


[Server message]Endpoint failed to start
See details
Exit code: 3. Reason: 00:00, 49.37it/s]
Fetching 77 files: 100%|██████████| 77/77 [00:02<00:00, 37.88it/s]
2024-10-23 09:17:16 - huggingface_inference_toolkit - INFO - Initializing model from directory:/opt/huggingface/model
2024-10-23 09:17:16 - huggingface_inference_toolkit - INFO - Found custom pipeline at /opt/huggingface/model/handler.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 693, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 569, in __aenter__
    await self._router.startup()
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 670, in startup
    await handler()
  File "/app/webservice_starlette.py", line 62, in prepare_model_artifacts
    inference_handler = get_inference_handler_either_custom_or_default_handler(
  File "/app/huggingface_inference_toolkit/handler.py", line 90, in get_inference_handler_either_custom_or_default_handler
    custom_pipeline = check_and_register_custom_pipeline_from_directory(model_dir)
  File "/app/huggingface_inference_toolkit/utils.py", line 170, in check_and_register_custom_pipeline_from_directory
    spec.loader.exec_module(handler)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/huggingface/model/handler.py", line 5, in <module>
    from s2s_pipeline import main, prepare_all_args, get_default_arguments, setup_logger, initialize_queues_and_events, build_pipeline
  File "/opt/huggingface/model/s2s_pipeline.py", line 10, in <module>
    from VAD.vad_handler import VADHandler
  File "/opt/huggingface/model/VAD/vad_handler.py", line 3, in <module>
    from baseHandler import BaseHandler
  File "/opt/huggingface/model/baseHandler.py", line 3, in <module>
    from rich.console import Console
ModuleNotFoundError: No module named 'rich'

Application startup failed. Exiting.

thanks for your help ;)

shackdown commented 2 hours ago

new issue on https://github.com/huggingface/huggingface-inference-toolkit/issues/93