Skip to content
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

shortgpt error when running the code #7364

Closed
1 task done
Jinyoung3 opened this issue Feb 9, 2024 · 10 comments
Closed
1 task done

shortgpt error when running the code #7364

Jinyoung3 opened this issue Feb 9, 2024 · 10 comments
Labels
bug Something isn't working Regression Bugs did not exist in previous versions of Gradio

Comments

@Jinyoung3
Copy link

Describe the bug

Traceback (most recent call last):
File "/app/./runShortGPT.py", line 1, in
from gui.gui_gradio import ShortGptUI
File "/app/gui/gui_gradio.py", line 1, in
import gradio as gr
File "/usr/local/lib/python3.11/site-packages/gradio/init.py", line 3, in
import gradio.components as components
File "/usr/local/lib/python3.11/site-packages/gradio/components/init.py", line 1, in
from gradio.components.annotated_image import AnnotatedImage
File "/usr/local/lib/python3.11/site-packages/gradio/components/annotated_image.py", line 8, in
from gradio_client.documentation import document, set_documentation_group
ImportError: cannot import name 'set_documentation_group' from 'gradio_client.documentation' (/usr/local/lib/python3.11/site-packages/gradio_client/documentation.py)

this is what I get and I do not know how to fix the issue

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

Screenshot

No response

Logs

No response

System Info

e

Severity

I can work around it

@Jinyoung3 Jinyoung3 added the bug Something isn't working label Feb 9, 2024
@abidlabs
Copy link
Member

abidlabs commented Feb 9, 2024

Hi @Jinyoung3 can you please provide a minimal code example that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example

@abidlabs abidlabs added the Regression Bugs did not exist in previous versions of Gradio label Feb 9, 2024
@Jinyoung3
Copy link
Author

yea the code is here: https://github.com/RayVentura/ShortGPT
you need to create a file called ".env" and put in your openai key and elevenlabs API key and when you run
docker build -t short_gpt_docker:latest . and then
docker run -p 31415:31415 --env-file .env short_gpt_docker:latest
I get that error.

@abidlabs
Copy link
Member

abidlabs commented Feb 9, 2024

Ok so what happened is that we released a more recent version of gradio_client that is incompatible with your version of gradio. And this is using a really old version of gradio that we don't really support anymore.

But I think you should be able to get it to work again by pinning the gradio_client to an older version. I've opened a PR here that should work I believe: RayVentura/ShortGPT#129

@abidlabs
Copy link
Member

abidlabs commented Feb 9, 2024

Will close for now but don't hesitate to reach back out on this thread with any questions or issues.

@abidlabs abidlabs closed this as completed Feb 9, 2024
@Jinyoung3
Copy link
Author

Traceback (most recent call last):
File "/app/./runShortGPT.py", line 1, in
from gui.gui_gradio import ShortGptUI
File "/app/gui/gui_gradio.py", line 3, in
from gui.content_automation_ui import GradioContentAutomationUI
File "/app/gui/content_automation_ui.py", line 3, in
from gui.ui_tab_short_automation import ShortAutomationUI
File "/app/gui/ui_tab_short_automation.py", line 6, in
from gui.asset_components import AssetComponentsUtils
File "/app/gui/asset_components.py", line 8, in
from shortGPT.config.api_db import ApiKeyManager
File "/app/shortGPT/config/init.py", line 1, in
from . import config
File "/app/shortGPT/config/config.py", line 1, in
import yaml
ModuleNotFoundError: No module named 'yaml' this is what I get now

@abidlabs
Copy link
Member

abidlabs commented Feb 9, 2024

Sorry I meant you have to do this:

pip install gradio_client==0.2.10

And it looks like you need yaml as well so please do:

pip install pyyaml

@Jinyoung3
Copy link
Author

So I keep what I have and just run the commands u told me to do?

@Jinyoung3
Copy link
Author

also those didn't work. Do you think the error is coming from shortGPT?

@abidlabs
Copy link
Member

Yes it seems that their requirements.txt file might be out of date. I’d recommend opening an issue on their repo

@Jinyoung3
Copy link
Author

ffmpeg
ffmpeg-python
python-dotenv
gradio_client==0.2.10
gradio==3.38.0
openai==1.10.0
tiktoken
tinydb
tinymongo
proglog
yt-dlp
torch
torchaudio

whisper timestamped

whisper-timestamped
protobuf==3.20.3
pillow==9.0.0
moviepy==1.0.3
progress
questionary
edge-tts
TTS==0.22.0
even after changing to this I get error do you know why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Regression Bugs did not exist in previous versions of Gradio
Projects
None yet
Development

No branches or pull requests

2 participants