Spaces:
Sleeping
Sleeping
Oscar Wang commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,22 +83,25 @@ def get_cpu_info():
|
|
| 83 |
|
| 84 |
# Gradio interface
|
| 85 |
def gradio_interface():
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
fn=handle_upload,
|
| 88 |
-
inputs=
|
| 89 |
-
|
| 90 |
-
gr.Textbox(label="Python Script Name")
|
| 91 |
-
],
|
| 92 |
-
outputs=[
|
| 93 |
-
gr.Textbox(label="Log Output", interactive=False),
|
| 94 |
-
gr.File(label="Download Output Folder"),
|
| 95 |
-
gr.Textbox(label="Connected CPUs Info", interactive=False)
|
| 96 |
-
],
|
| 97 |
live=True,
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
|
| 103 |
# Launch the Gradio interface
|
| 104 |
if __name__ == "__main__":
|
|
|
|
| 83 |
|
| 84 |
# Gradio interface
|
| 85 |
def gradio_interface():
|
| 86 |
+
interface_inputs = [
|
| 87 |
+
gr.File(label="Upload Folder", file_count="multiple", file_types=['file']),
|
| 88 |
+
gr.Textbox(label="Python Script Name")
|
| 89 |
+
]
|
| 90 |
+
interface_outputs = [
|
| 91 |
+
gr.Textbox(label="Log Output", interactive=False),
|
| 92 |
+
gr.File(label="Download Output Folder"),
|
| 93 |
+
gr.Textbox(label="Connected CPUs Info", interactive=False)
|
| 94 |
+
]
|
| 95 |
+
|
| 96 |
+
iface = gr.Interface(
|
| 97 |
fn=handle_upload,
|
| 98 |
+
inputs=interface_inputs,
|
| 99 |
+
outputs=interface_outputs,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
live=True,
|
| 101 |
+
theme="light" # Specify a theme that works, "light" is an example
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
iface.launch()
|
| 105 |
|
| 106 |
# Launch the Gradio interface
|
| 107 |
if __name__ == "__main__":
|