Spaces:
Sleeping
Sleeping
File size: 367 Bytes
5a2deaa |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
from worker import worker # import the worker function
def greet(name):
return "Hello " + name + "!!"
def kickoff_worker():
worker() # call the worker function
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()
print("Launching worker...")
kickoff_worker() # kickoff the worker after launching the interface |