Update app.py
Browse files
app.py
CHANGED
@@ -294,7 +294,7 @@ class App:
|
|
294 |
disclaimer_show = general_params["disclaimer_show"]
|
295 |
disclaimer_popup = general_params["disclaimer_popup"]
|
296 |
|
297 |
-
with gr.Sidebar(open=False,position="right"):
|
298 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple", height="200px")
|
299 |
|
300 |
with gr.Row():
|
@@ -356,7 +356,7 @@ class App:
|
|
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,
|
360 |
|
361 |
with gr.TabItem("Device info"): # tab2
|
362 |
with gr.Column():
|
@@ -404,10 +404,8 @@ class App:
|
|
404 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
405 |
|
406 |
@staticmethod
|
407 |
-
def toggle_sidebar(
|
408 |
-
|
409 |
-
button_text = "Hide results" if new_state else "Show results"
|
410 |
-
return gr.update(visible = state), button_text
|
411 |
|
412 |
# Create the parser for command-line arguments
|
413 |
parser = argparse.ArgumentParser()
|
|
|
294 |
disclaimer_show = general_params["disclaimer_show"]
|
295 |
disclaimer_popup = general_params["disclaimer_popup"]
|
296 |
|
297 |
+
with gr.Sidebar(open=False,position="right") as sidebar:
|
298 |
files_subtitles = gr.Files(label="Output data", interactive=False, file_count="multiple", height="200px")
|
299 |
|
300 |
with gr.Row():
|
|
|
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,outputs=[gr.Sidebar()])
|
360 |
|
361 |
with gr.TabItem("Device info"): # tab2
|
362 |
with gr.Column():
|
|
|
404 |
return gr.update(visible=False), gr.update(visible=False), gr.update(visible=True)
|
405 |
|
406 |
@staticmethod
|
407 |
+
def toggle_sidebar():
|
408 |
+
return gr.update(open=True)
|
|
|
|
|
409 |
|
410 |
# Create the parser for command-line arguments
|
411 |
parser = argparse.ArgumentParser()
|