Update app.py
Browse files
app.py
CHANGED
@@ -328,8 +328,10 @@ class App:
|
|
328 |
btn_reset = gr.Button(value="Reset")
|
329 |
btn_reset.click(None,js="window.location.reload()")
|
330 |
with gr.Row():
|
331 |
-
|
332 |
-
|
|
|
|
|
333 |
with gr.Row():
|
334 |
#tb_indicator = gr.Textbox(label="Output preview (Always review output generated by AI models)", show_copy_button=True, show_label=True)
|
335 |
tb_indicator = gr.Dataframe(label="Output preview",
|
@@ -354,7 +356,8 @@ class App:
|
|
354 |
#btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
355 |
|
356 |
input_multi.change(fn=self.update_viewer,inputs=input_multi,outputs=[input_file_audio,input_file_video,input_file_multi])
|
357 |
-
|
|
|
358 |
with gr.TabItem("Device info"): # tab2
|
359 |
with gr.Column():
|
360 |
gr.Markdown(device_info, label="Hardware info & installed packages")
|
@@ -400,6 +403,11 @@ class App:
|
|
400 |
else:
|
401 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
402 |
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
# Create the parser for command-line arguments
|
405 |
parser = argparse.ArgumentParser()
|
|
|
328 |
btn_reset = gr.Button(value="Reset")
|
329 |
btn_reset.click(None,js="window.location.reload()")
|
330 |
with gr.Row():
|
331 |
+
with gr.Column(scale=14):
|
332 |
+
tb_info = gr.Textbox(label="Output info", interactive=False, show_copy_button=True)
|
333 |
+
with gr.Column(scale=1):
|
334 |
+
btn_sidebar = gr.Button("Show results")
|
335 |
with gr.Row():
|
336 |
#tb_indicator = gr.Textbox(label="Output preview (Always review output generated by AI models)", show_copy_button=True, show_label=True)
|
337 |
tb_indicator = gr.Dataframe(label="Output preview",
|
|
|
356 |
#btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
357 |
|
358 |
input_multi.change(fn=self.update_viewer,inputs=input_multi,outputs=[input_file_audio,input_file_video,input_file_multi])
|
359 |
+
btn_sidebar.click(fn_self.toggle_sidebar,inputs=btn_sidebar,outputs=[gr.Sidebar(),btn_sidebar])
|
360 |
+
|
361 |
with gr.TabItem("Device info"): # tab2
|
362 |
with gr.Column():
|
363 |
gr.Markdown(device_info, label="Hardware info & installed packages")
|
|
|
403 |
else:
|
404 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
405 |
|
406 |
+
@staticmethod
|
407 |
+
def toggle_sidebar(show_sidebar):
|
408 |
+
new_state = not show_sidebar # Toggle the visibility
|
409 |
+
button_text = "Hide results" if new_state else "Show results"
|
410 |
+
return new_state, button_text
|
411 |
|
412 |
# Create the parser for command-line arguments
|
413 |
parser = argparse.ArgumentParser()
|