Spaces:
Runtime error
course u7 demo, VitModel problem @sanchit-gandhi.
Dear tutor,
when I set git+https://github.com/hollance/transformers.git@6900e8ba6532162a8613d2270ec2286c3f58f57b in requirements.txt, Space won't let me run. It keeps showing that version is several delta back when it executing fetch.
Also it keeps showing:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/fastapi/applications.py", line 289, in call
await super().call(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/routes.py", line 291, in api_info
return gradio.blocks.get_api_info(config, serialize) # type: ignore
File "/home/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/blocks.py", line 528, in get_api_info
serializer = serializing.COMPONENT_MAPPINGtype
KeyError: 'dataset'
what is that dataset?
Hey
@YCHuang2112
- you need to pin the version of transformers
here: https://huggingface.co/spaces/YCHuang2112/speech-to-speech-translation-mms/blob/2a29763cf9d589608d2e5ccbd3f55195bbc829f4/requirements.txt#L2
To:
git+https://github.com/hollance/transformers.git@6900e8ba6532162a8613d2270ec2286c3f58f57b
It looks like it's working with the latest version of the space though? https://huggingface.co/spaces/YCHuang2112/speech-to-speech-translation-mms
I've tried the different setting until it works, I'm currently using mms the one, not needs to be loaded with VitsModel.
I've tried to set git+https://github.com/hollance/transformers.git@6900e8ba6532162a8613d2270ec2286c3f58f57b this to my requirement but it fails @fetching, there're will be delta files ahead issues. You may try open one yourself.
Secondly, because I believe the latest version of gradio is not supported on the Space, so you need to set following settings in your requirement:
pip>=23.2
gradio_client==0.2.7
Hope you can update.
Hey
@YCHuang2112
- VITS MMS has now been merged to transformers
. Here's a code snippet for how you run inference with the model: https://huggingface.co/facebook/mms-tts-eng#usage
To run this, you'll need to install transformers from main:
pip install git+https://github.com/huggingface/transformers
Hey
@YCHuang2112
- were you able to launch your space by installing transformers from main
with the instructions linked above? Let me know if you were blocked in submitting your Space for the U7 assessment and I can take a deeper look!
Everything works fine on my side. Thank you for your information.
Best,
Yu-Cheng