Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,7 +74,7 @@ with gr.Blocks() as iface:
|
|
74 |
if "error" in results:
|
75 |
return [
|
76 |
"", # transcript
|
77 |
-
|
78 |
results["error"], # execution_info
|
79 |
] + [gr.update(visible=False)] * 24 # 8 components per tab * 3 tabs
|
80 |
|
@@ -102,7 +102,7 @@ with gr.Blocks() as iface:
|
|
102 |
else:
|
103 |
tab_updates.extend([gr.update(visible=False)] * 9) # Hide unused tab and its components
|
104 |
|
105 |
-
return [transcript, gr.
|
106 |
|
107 |
# Modify the analyze_button.click setup
|
108 |
analyze_button.click(
|
@@ -115,6 +115,5 @@ with gr.Blocks() as iface:
|
|
115 |
] + [component for tab in tabs_output.children for component in tab.children],
|
116 |
show_progress=True
|
117 |
)
|
118 |
-
|
119 |
if __name__ == "__main__":
|
120 |
iface.launch()
|
|
|
74 |
if "error" in results:
|
75 |
return [
|
76 |
"", # transcript
|
77 |
+
None, # tabs (no update)
|
78 |
results["error"], # execution_info
|
79 |
] + [gr.update(visible=False)] * 24 # 8 components per tab * 3 tabs
|
80 |
|
|
|
102 |
else:
|
103 |
tab_updates.extend([gr.update(visible=False)] * 9) # Hide unused tab and its components
|
104 |
|
105 |
+
return [gr.update(value=transcript, visible=True), None, gr.update(value=execution_info, visible=True)] + tab_updates
|
106 |
|
107 |
# Modify the analyze_button.click setup
|
108 |
analyze_button.click(
|
|
|
115 |
] + [component for tab in tabs_output.children for component in tab.children],
|
116 |
show_progress=True
|
117 |
)
|
|
|
118 |
if __name__ == "__main__":
|
119 |
iface.launch()
|