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

when python gradio_demo.py #5

Open
jjz1011 opened this issue Jan 31, 2024 · 3 comments
Open

when python gradio_demo.py #5

jjz1011 opened this issue Jan 31, 2024 · 3 comments

Comments

@jjz1011
Copy link

jjz1011 commented Jan 31, 2024

the error:
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
Traceback (most recent call last):
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/gradio/routes.py", line 439, in run_predict
output = await app.get_blocks().process_api(
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/gradio/blocks.py", line 1389, in process_api
result = await self.call_function(
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/gradio/blocks.py", line 1094, in call_function
prediction = await anyio.to_thread.run_sync(
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
return await future
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/site-packages/gradio/utils.py", line 704, in wrapper
response = f(*args, **kwargs)
File "/root/paddlejob/workspace/env_run/code/polite-flamingo/gradio_demo.py", line 185, in bot
inference_results = inferencer(
File "/root/paddlejob/workspace/env_run/code/polite-flamingo/gradio_demo.py", line 47, in call
return clever_flamingo_api(prompt, imgpaths)
File "/root/paddlejob/workspace/env_run/code/polite-flamingo/gradio_demo.py", line 45, in clever_flamingo_api
return js['result']['response']
version:
gradio: 3.37.0

@ChenDelong1999
Copy link
Owner

GPT: I’m sorry to hear that you’re experiencing an error with Gradio. The error message suggests that there might be an issue with your internet connection or the Gradio status page. You can try checking your internet connection and visiting the Gradio status page to see if there are any known issues.

If the issue persists, you can try reinstalling Gradio. Some users have reported that reinstalling Gradio has resolved similar issues.

I hope this helps! Let me know if you have any other questions.

gradio-app/gradio#3498

@jjz1011
Copy link
Author

jjz1011 commented Jan 31, 2024

thank you! i have reinstalled gradio to version 3.37.0 instead of 3.36.0. this problem have been solved. But i have another question. when i use "CUDA_VISIBLE_DEVICES=0 uvicorn api:app --host=0.0.0.0 --port=1234 --log-level=info" for example, but i met "urllib.error.URLError: <urlopen error [Errno 97] Address family not supported by protocol>". Because I've deployed this demo on my server, but my server can't connect to the internet. I'm not very clear about the content of the source code in api.py. Which part of it requires internet access?

@jjz1011
Copy link
Author

jjz1011 commented Jan 31, 2024

Traceback (most recent call last):
File "/root/miniconda3/envs/openflamingo/lib/python3.9/urllib/request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 1040, in _send_output
self.send(msg)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 980, in send
self.connect()
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 1447, in connect
super().connect()
File "/root/miniconda3/envs/openflamingo/lib/python3.9/http/client.py", line 946, in connect
self.sock = self._create_connection(
File "/root/miniconda3/envs/openflamingo/lib/python3.9/socket.py", line 844, in create_connection
raise err
File "/root/miniconda3/envs/openflamingo/lib/python3.9/socket.py", line 827, in create_connection
sock = socket(af, socktype, proto)
File "/root/miniconda3/envs/openflamingo/lib/python3.9/socket.py", line 232, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol

finally i can't deal with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants