Spaces:
Runtime error
Runtime error
inoki-giskard
commited on
Commit
•
93b6465
1
Parent(s):
bdb6803
Try to start ML worker in async main
Browse files- app.py +1 -1
- 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.
|
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
|