-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'tokens' #19
Comments
Is port 8000 the right port? Usually gradio defaults to port 7860 - could you check with:
(also Either way, I agree that we should have a better error message! Will open a PR for this |
Using the main branch now should give you a more detailed Gradio error message @syedmustafa54! |
@sanchit-gandhi Thanks for the update but now I am facing a different issue on GPU it's not giving output its stuck I have modified
its stuck for long time there |
port 8000 is for |
Cool! The model is probably JIT compiling (which takes a few minutes the first time you run it, but will be fast thereafter). See https://github.com/sanchit-gandhi/whisper-jax#pipeline-usage for details. |
@sanchit-gandhi any guess on T4 I have waited for 25-30 mins but still no results is this normal? |
Which checkpoint are you using? And how long is the audio file? If it's stuck on the pre-processing stage then it might be that you're maxed out on CPU resource for pre-processing the audio file. |
I just ran direct_app.py. the audio file is 3 sec. I have checked the CPU usage its only 1 process is using 100% rest is at 0% |
Hey @syedmustafa54 - could you first check that the Flax Whisper Pipeline works standalone with this audio file, i.e. not as a gradio app? This will give you better error logs for any environment / resource errors. You can follow the instructions from https://github.com/sanchit-gandhi/whisper-jax#pipeline-usage |
Hey I tried to run the below code by adding audio.mp3 in the folder but still its not giving any error just not showing any output
|
Hello @sanchit-gandhi I have started a new Instance install cuda-11.8 cudnn-8.8 and install all the requirements
Now this code is working fine its taking 1.5 mins to give the output on 3 sec audio on T4 GPU.
according to me when I debug the issue is in the below for loop logic it has printed
|
Hey @syedmustafa54 - could you maybe try and pinpoint the exact line the app is failing on? Perhaps you can quit the app when it hangs (CTRL + C) and paste the traceback here? For reference, I'm using There are some more verbose instructions for creating a demo here: https://github.com/sanchit-gandhi/whisper-jax#creating-an-endpoint |
@sanchit-gandhi for your case you are just hosting the front end on hugging face and back end at Google TPU I think that's why you are not getting any issues.
|
Hey @syedmustafa54 - the application is agnostic to whether we host on HF / locally. How many preprocessing workers are you using? Is this more than the number of CPUs you have available? If so, then multiprocessing will hang indefinitely. Could you check the number of CPUs you have through:
And make sure that this number is less than the product of Line 22 in 7159222
And concurrency_count :Line 244 in 7159222
(so |
Hello @sanchit-gandhi Thanks for sharing this repo.
I installed all the dependencies and ran this command in terminal 1
bash launch_app.sh
in terminal 2 I ran
API_URL=http://0.0.0.0:8000/generate/ API_URL_FROM_FEATURES=http://0.0.0.0:8000/gnerate_from_features/ python app.py
when I select you tube url getting this error
Complete error
The text was updated successfully, but these errors were encountered: