Spaces:
Sleeping
Sleeping
File size: 595 Bytes
5a2deaa 45d0e7b 6fb2bde 5a2deaa 35ba894 811d9d6 cc8b70c 5a2deaa e2c148a 5a2deaa 094e924 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
import subprocess
import shlex
subprocess.run(shlex.split('pip install wheel/torchmcubes-0.1.0-cp310-cp310-linux_x86_64.whl'))
def greet(name):
return "Hello " + name + "!!"
def kickoff_worker(inputs):
from worker import worker # import the worker function
try:
worker() # call the worker function
except Exception as e:
return f"Error: {e}"
iface = gr.Interface(fn=kickoff_worker, inputs="text", outputs="text", live=True)
iface.launch()
print("Launching worker...")
# kickoff_worker() # kickoff the worker after launching the interface |