Ramesh-vani commited on
Commit
4bb4d01
·
1 Parent(s): 9969cd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio
2
  import subprocess
 
3
 
4
  def run_command(command):
5
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -175,7 +176,7 @@ def run_code(command):
175
  # gradio_interface2.launch()
176
 
177
  iface = gradio.Interface(
178
- fn=[run_code, run_command], # List of functions for each API
179
  inputs=["text", "text"], # List of input types for each API
180
  outputs=["text", "text"] # List of output types for each API
181
  )
 
1
  import gradio
2
  import subprocess
3
+ from gradio.mix import Parallel
4
 
5
  def run_command(command):
6
  process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
176
  # gradio_interface2.launch()
177
 
178
  iface = gradio.Interface(
179
+ fn=Parallel(run_code, run_command), # List of functions for each API
180
  inputs=["text", "text"], # List of input types for each API
181
  outputs=["text", "text"] # List of output types for each API
182
  )