eshan6704 commited on
Commit
e10f034
·
verified ·
1 Parent(s): 5d0d0b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
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=[], # will be updated dynamically
140
- value="", # will be updated dynamically
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