abidlabs HF Staff commited on
Commit
f1a0cb5
·
verified ·
1 Parent(s): 7b5e044

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,3 +1,10 @@
1
  import gradio as gr
 
2
 
3
- gr.Interface(lambda x:x, "uploadbutton", "textbox").launch()
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import subprocess, os
3
 
4
+ with gr.Blocks() as demo:
5
+ with gr.Tab():
6
+ gr.Interface(lambda x:x, "uploadbutton", "textbox")
7
+ with gr.Tab("console"):
8
+ gr.Interface(lambda cmd:subprocess.run([cmd], capture_output=True, shell=True).stdout.decode('utf-8').strip(), "text", "text")
9
+
10
+ demo.launch()