Quant0 commited on
Commit
b7dd58c
路
verified 路
1 Parent(s): e557b9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -189,13 +189,13 @@ with gr.Blocks(title="An谩lisis de Opciones") as demo:
189
  outputs=[output_file, output_msg]
190
  )
191
 
192
-
193
  btn_mostrar.click(
194
  fn=generar_todo,
195
  inputs=[ticker_input, expiration_date, size_of_the_window],
196
  outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
197
  )
198
-
199
 
200
 
201
 
@@ -205,14 +205,24 @@ with gr.Blocks(title="An谩lisis de Opciones") as demo:
205
  btn_plot = gr.Button("Mostrar Plot")
206
 
207
  output_plot = gr.Plot(label="Distribuci贸n de Volumen de las opciones")
208
-
209
  # Enlaza el bot贸n "Mostrar datos" a la funci贸n generar_todo y a la nueva funci贸n de plot
210
  btn_plot.click(
211
  fn=plot_opciones,
212
  inputs=[df_put_state, df_call_state, ticker_input, expiration_date],
213
  outputs=output_plot
214
  )
215
-
 
 
 
 
 
 
 
 
 
 
216
 
217
 
218
  # Inicia la aplicaci贸n
 
189
  outputs=[output_file, output_msg]
190
  )
191
 
192
+ '''
193
  btn_mostrar.click(
194
  fn=generar_todo,
195
  inputs=[ticker_input, expiration_date, size_of_the_window],
196
  outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
197
  )
198
+ '''
199
 
200
 
201
 
 
205
  btn_plot = gr.Button("Mostrar Plot")
206
 
207
  output_plot = gr.Plot(label="Distribuci贸n de Volumen de las opciones")
208
+ '''
209
  # Enlaza el bot贸n "Mostrar datos" a la funci贸n generar_todo y a la nueva funci贸n de plot
210
  btn_plot.click(
211
  fn=plot_opciones,
212
  inputs=[df_put_state, df_call_state, ticker_input, expiration_date],
213
  outputs=output_plot
214
  )
215
+ '''
216
+ # Enlaza el bot贸n "Mostrar datos" para actualizar los dataframes y luego para graficar.
217
+ btn_mostrar.click(
218
+ fn=generar_todo,
219
+ inputs=[ticker_input, expiration_date, size_of_the_window],
220
+ outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
221
+ ).then(
222
+ fn=plot_opciones,
223
+ inputs=[df_put_state, df_call_state, ticker_input, expiration_date],
224
+ outputs=output_plot
225
+ )
226
 
227
 
228
  # Inicia la aplicaci贸n