Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -139,7 +139,7 @@ def populate_questions(chart_type):
|
|
| 139 |
return questions.get(chart_type, [])
|
| 140 |
|
| 141 |
def update_analyze_more(chart_type):
|
| 142 |
-
return gr.
|
| 143 |
|
| 144 |
app = gr.Interface(
|
| 145 |
fn=ImageChat,
|
|
@@ -158,7 +158,7 @@ app = gr.Interface(
|
|
| 158 |
# Create a function to dynamically update the dropdown based on the selected chart type
|
| 159 |
def dynamic_analyze_more(chart_type):
|
| 160 |
questions_list = populate_questions(chart_type)
|
| 161 |
-
return gr.
|
| 162 |
|
| 163 |
# Create a new Gradio Block to handle interactions
|
| 164 |
with gr.Blocks() as demo:
|
|
@@ -178,4 +178,3 @@ with gr.Blocks() as demo:
|
|
| 178 |
).launch()
|
| 179 |
|
| 180 |
demo.launch()
|
| 181 |
-
|
|
|
|
| 139 |
return questions.get(chart_type, [])
|
| 140 |
|
| 141 |
def update_analyze_more(chart_type):
|
| 142 |
+
return gr.update(choices=populate_questions(chart_type))
|
| 143 |
|
| 144 |
app = gr.Interface(
|
| 145 |
fn=ImageChat,
|
|
|
|
| 158 |
# Create a function to dynamically update the dropdown based on the selected chart type
|
| 159 |
def dynamic_analyze_more(chart_type):
|
| 160 |
questions_list = populate_questions(chart_type)
|
| 161 |
+
return gr.update(choices=questions_list)
|
| 162 |
|
| 163 |
# Create a new Gradio Block to handle interactions
|
| 164 |
with gr.Blocks() as demo:
|
|
|
|
| 178 |
).launch()
|
| 179 |
|
| 180 |
demo.launch()
|
|
|