Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,14 @@ subprocess.run(shlex.split('pip install wheel/torchmcubes-0.1.0-cp310-cp310-linu
|
|
6 |
def greet(name):
|
7 |
return "Hello " + name + "!!"
|
8 |
|
9 |
-
def kickoff_worker(
|
10 |
from worker import worker # import the worker function
|
11 |
try:
|
12 |
worker() # call the worker function
|
13 |
except Exception as e:
|
14 |
return f"Error: {e}"
|
15 |
|
16 |
-
iface = gr.Interface(fn=kickoff_worker,
|
17 |
iface.launch()
|
18 |
print("Launching worker...")
|
19 |
# kickoff_worker() # kickoff the worker after launching the interface
|
|
|
6 |
def greet(name):
|
7 |
return "Hello " + name + "!!"
|
8 |
|
9 |
+
def kickoff_worker():
|
10 |
from worker import worker # import the worker function
|
11 |
try:
|
12 |
worker() # call the worker function
|
13 |
except Exception as e:
|
14 |
return f"Error: {e}"
|
15 |
|
16 |
+
iface = gr.Interface(fn=kickoff_worker, outputs="text", live=True)
|
17 |
iface.launch()
|
18 |
print("Launching worker...")
|
19 |
# kickoff_worker() # kickoff the worker after launching the interface
|