yigitcanozdemir commited on
Commit
6f35b1e
·
1 Parent(s): de2ae20

asyncio fix

Browse files
Files changed (1) hide show
  1. components/gradio_ui.py +1 -1
components/gradio_ui.py CHANGED
@@ -61,7 +61,7 @@ def get_recommendations_api(message, engine):
61
 
62
  def create_interface(engine):
63
  async def predict_wrapper(message):
64
- return asyncio.to_thread(get_recommendations_api(message, engine))
65
 
66
  iface = gr.Interface(
67
  fn=predict_wrapper,
 
61
 
62
  def create_interface(engine):
63
  async def predict_wrapper(message):
64
+ return await asyncio.to_thread(get_recommendations_api(message, engine))
65
 
66
  iface = gr.Interface(
67
  fn=predict_wrapper,