Closed jmsether closed 1 year ago
Thanks for the PR! I would do a quick test locally and then merge your branch.
By the way, I have tried the asyncio.get_event_loop()
before, but it sometimes throws errors that said There is no event loop
or something. I am not familiar with Python or Gradio, so I finally end up with the synchronize_async
approach. 😿
@MaikoTan I ran it a few times and I have not had a problem with it yet. I will investigate that further and if I see an issue pop up with it I can easily get that fixed. It looks as though it's accessing a singleton. As long as gradio starts the event loop it should always work.
Fixed AttributeError: module 'gradio.utils' has no attribute 'synchronize_async'
Description
Fixed [Bug]: #95. The newest gradio library seems to have removed synchronize_async. This can be fixed by importing the 'asyncio' library, and running the 'horde.run()' asynchronous function using the 'run_until_complete' method of the event loop.
Type of changes
Please check the following items before submitting your pull request
black .
flake8 .