Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -142,10 +142,10 @@ app = gr.Interface(
|
|
142 |
fn=ImageChat,
|
143 |
inputs=[
|
144 |
gr.Image(label="Image"),
|
145 |
-
gr.Dropdown(label="Chart Type", choices=["Forex", "Crypto", "Stocks"], type="value",
|
146 |
gr.Textbox(label="Ticker", placeholder="Enter ticker symbol"),
|
147 |
gr.Textbox(label="Prompt", value="Analyze"),
|
148 |
-
gr.Dropdown(label="Analyze more", choices=[], type="value", placeholder="Select a question",
|
149 |
],
|
150 |
outputs=gr.Textbox(label="Response"),
|
151 |
title="Trading View Chat Analyzer",
|
@@ -153,7 +153,7 @@ app = gr.Interface(
|
|
153 |
)
|
154 |
|
155 |
# Dynamically update the questions based on the chart type
|
156 |
-
@app.change(inputs=
|
157 |
def update_analyze_more(chart_type):
|
158 |
return gr.Dropdown.update(choices=populate_questions(chart_type))
|
159 |
|
|
|
142 |
fn=ImageChat,
|
143 |
inputs=[
|
144 |
gr.Image(label="Image"),
|
145 |
+
gr.Dropdown(label="Chart Type", choices=["Forex", "Crypto", "Stocks"], type="value", value="Stocks"),
|
146 |
gr.Textbox(label="Ticker", placeholder="Enter ticker symbol"),
|
147 |
gr.Textbox(label="Prompt", value="Analyze"),
|
148 |
+
gr.Dropdown(label="Analyze more", choices=[], type="value", placeholder="Select a question", interactive=True)
|
149 |
],
|
150 |
outputs=gr.Textbox(label="Response"),
|
151 |
title="Trading View Chat Analyzer",
|
|
|
153 |
)
|
154 |
|
155 |
# Dynamically update the questions based on the chart type
|
156 |
+
@app.change(inputs="Chart Type", outputs="Analyze more")
|
157 |
def update_analyze_more(chart_type):
|
158 |
return gr.Dropdown.update(choices=populate_questions(chart_type))
|
159 |
|