Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|