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

Runtime error #1

Open
ShinySylveonn opened this issue May 30, 2023 · 2 comments
Open

Runtime error #1

ShinySylveonn opened this issue May 30, 2023 · 2 comments

Comments

@ShinySylveonn
Copy link

ShinySylveonn commented May 30, 2023

There appears to be a typo on line 112, I believe it should be render_file (i have fixed that and gotten another error)

I have the program currently running in a HuggingFace private space, however after feeding an OpenAI key and uploading a PDF, any question is met with the please upload a key but you cannot continue further

To create a public link, set share=True in launch().
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/gradio/routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py", line 1323, in process_api
result = await self.call_function(
File "/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py", line 1067, in call_function
prediction = await utils.async_iteration(iterator)
File "/home/user/.local/lib/python3.8/site-packages/gradio/utils.py", line 336, in async_iteration
return await iterator.anext()
File "/home/user/.local/lib/python3.8/site-packages/gradio/utils.py", line 329, in anext
return await anyio.to_thread.run_sync(
File "/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.local/lib/python3.8/site-packages/gradio/utils.py", line 312, in run_sync_iterator_async
return next(iterator)
File "app.py", line 66, in generate_response
chain = process_file(btn)
File "app.py", line 45, in process_file
raise gr.Error('Upload your OpenAI API key')
gradio.exceptions.Error: 'Upload your OpenAI API key'

@sunilkumardash9
Copy link
Owner

Hi, @ShinySylveonn, It must be something to do with the way we set env key. i haven't tested it yet on Higgingface spaces. Looking into it.

@sunilkumardash9
Copy link
Owner

I did try on a Hface space, it seems to be working fine.
Screenshot from 2023-06-03 17-03-38

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