Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,7 +105,8 @@ with gr.Blocks() as demo:
|
|
105 |
history_placeholder = gr.State(history) # Maintain history state
|
106 |
|
107 |
def update_outputs_and_history(input_text, selected_models):
|
108 |
-
|
|
|
109 |
output_components = create_outputs(selected_models)
|
110 |
output_placeholder.set(output_components)
|
111 |
return output_components
|
@@ -115,7 +116,7 @@ with gr.Blocks() as demo:
|
|
115 |
generate_button.click(
|
116 |
fn=generate_model_outputs_with_history,
|
117 |
inputs=[input_text, selected_models],
|
118 |
-
outputs=[update_outputs_and_history(
|
119 |
)
|
120 |
|
121 |
# Create tabs for each selected model and display scrollable outputs
|
|
|
105 |
history_placeholder = gr.State(history) # Maintain history state
|
106 |
|
107 |
def update_outputs_and_history(input_text, selected_models):
|
108 |
+
# Ensure selected_models is treated as a list
|
109 |
+
selected_models = selected_models
|
110 |
output_components = create_outputs(selected_models)
|
111 |
output_placeholder.set(output_components)
|
112 |
return output_components
|
|
|
116 |
generate_button.click(
|
117 |
fn=generate_model_outputs_with_history,
|
118 |
inputs=[input_text, selected_models],
|
119 |
+
outputs=[update_outputs_and_history(selected_models), history_placeholder],
|
120 |
)
|
121 |
|
122 |
# Create tabs for each selected model and display scrollable outputs
|