Oscar Wang commited on
Commit
186d8d1
·
verified ·
1 Parent(s): 4280e30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -14
app.py CHANGED
@@ -83,22 +83,25 @@ def get_cpu_info():
83
 
84
  # Gradio interface
85
  def gradio_interface():
86
- with gr.Interface(
 
 
 
 
 
 
 
 
 
 
87
  fn=handle_upload,
88
- inputs=[
89
- gr.File(label="Upload Folder", file_count="multiple", file_types=['file']),
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
- capture_session=True,
99
- theme="compact"
100
- ) as iface:
101
- iface.launch()
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__":