inoki-giskard commited on
Commit
93b6465
1 Parent(s): bdb6803

Try to start ML worker in async main

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def run_ml_worker(url, api_key, hf_token):
17
  )
18
  print(f"Starting ML worker for {backend_url}")
19
  ml_worker = MLWorker(False, backend_url, api_key, hf_token)
20
- asyncio.get_event_loop().run_until_complete(ml_worker.start())
21
  return "ML worker finished its work"
22
 
23
  iface = gr.Interface(fn=run_ml_worker, inputs=["text", "text", "text"], outputs="text")
 
17
  )
18
  print(f"Starting ML worker for {backend_url}")
19
  ml_worker = MLWorker(False, backend_url, api_key, hf_token)
20
+ asyncio.run(ml_worker.start())
21
  return "ML worker finished its work"
22
 
23
  iface = gr.Interface(fn=run_ml_worker, inputs=["text", "text", "text"], outputs="text")
requirements.txt CHANGED
@@ -1 +1 @@
1
- giskard==2.0.0b20
 
1
+ giskard[server]==2.0.0b20