Update app.py
Browse files
app.py
CHANGED
|
@@ -136,8 +136,8 @@ with gr.Blocks(title="Stock / Index App") as iface:
|
|
| 136 |
|
| 137 |
req_type = gr.Dropdown(
|
| 138 |
label="Request Type",
|
| 139 |
-
choices=
|
| 140 |
-
value="",
|
| 141 |
scale=2
|
| 142 |
)
|
| 143 |
|
|
@@ -159,10 +159,6 @@ with gr.Blocks(title="Stock / Index App") as iface:
|
|
| 159 |
outputs=[req_type, symbol]
|
| 160 |
)
|
| 161 |
|
| 162 |
-
# Initialize dropdown for default mode
|
| 163 |
-
req_type.update(choices=STOCK_REQ, value="info")
|
| 164 |
-
symbol.update(value="ITC")
|
| 165 |
-
|
| 166 |
# Fetch button click
|
| 167 |
btn.click(fetch_data, inputs=[mode_input, req_type, symbol, date_field], outputs=output)
|
| 168 |
|
|
|
|
| 136 |
|
| 137 |
req_type = gr.Dropdown(
|
| 138 |
label="Request Type",
|
| 139 |
+
choices=STOCK_REQ, # initial choices for default stock mode
|
| 140 |
+
value="info", # initial value
|
| 141 |
scale=2
|
| 142 |
)
|
| 143 |
|
|
|
|
| 159 |
outputs=[req_type, symbol]
|
| 160 |
)
|
| 161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
# Fetch button click
|
| 163 |
btn.click(fetch_data, inputs=[mode_input, req_type, symbol, date_field], outputs=output)
|
| 164 |
|