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

Issues for gradio #80

Open
ashutoshbk opened this issue Jul 30, 2024 · 4 comments
Open

Issues for gradio #80

ashutoshbk opened this issue Jul 30, 2024 · 4 comments

Comments

@ashutoshbk
Copy link

python gradio_demo.py --trex2_api_token 328483asjdfhsa

Note: this token number is fake, I am using real one

when i draw bouding box and click on Run T-Rext then follwing error is occurs

`(t_rex) C:\Users\ashut\Documents\Work\T-Rex\T-Rex>python gradio_demo.py --trex2_api_token 328483asjdfhsa
Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch().
IMPORTANT: You are using gradio version 4.22.0, however version 4.29.0 is available, please upgrade.

IMPORTANT: You are using gradio version 4.22.0, however version 4.29.0 is available, please upgrade.

IMPORTANT: You are using gradio version 4.22.0, however version 4.29.0 is available, please upgrade.

Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\asyncio\proactor_events.py", line 162, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Traceback (most recent call last):
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\gradio\queueing.py", line 501, in call_prediction
output = await route_utils.call_process_api(
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\gradio\route_utils.py", line 258, in call_process_api
output = await app.get_blocks().process_api(
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\gradio\blocks.py", line 1710, in process_api
result = await self.call_function(
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\gradio\blocks.py", line 1250, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread
return await future
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\anyio_backends_asyncio.py", line 859, in run
result = context.run(func, *args)
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\gradio\utils.py", line 693, in wrapper
response = f(*args, **kwargs)
File "gradio_demo.py", line 293, in inference
trex2_results = trex2.interactve_inference([prompts])
File "C:\Users\ashut\Documents\Work\T-Rex\T-Rex\trex\model_wrapper.py", line 91, in interactve_inference
image=self.get_image_url(prompt["prompt_image"]),
File "C:\Users\ashut\Documents\Work\T-Rex\T-Rex\trex\model_wrapper.py", line 357, in get_image_url
url = self.client.upload_file(tmp_file_path)
File "C:\Users\ashut\Anaconda3\envs\t_rex\lib\site-packages\dds_cloudapi_sdk\client.py", line 76, in upload_file
with open(local_path, "rb") as fp:
PermissionError: [Errno 13] Permission denied: 'C:\Users\ashut\AppData\Local\Temp\tmpzy8utpaz.png'
`

@Mountchicken
Copy link
Collaborator

This indicates that the program cannot access the temp image. You can change the temp file path to somewhere with read permission
https://github.com/IDEA-Research/T-Rex/blob/trex2/trex/model_wrapper.py#L351-L358

@ashutoshbk
Copy link
Author

Okay, Thanks. I will check

@ashutoshbk
Copy link
Author

Thank you @Mountchicken , It's working now properly. If you don't mind can you tell me which dataset you used to train T-Rex?

@Mountchicken
Copy link
Collaborator

31671722422998_ pic
it's listed in the paper

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