CazC commited on
Commit
7b53b74
·
verified ·
1 Parent(s): 6d89624

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(inputs):
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, inputs="text", outputs="text")
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