Update app.py
Browse files
app.py
CHANGED
|
@@ -181,8 +181,8 @@ def exportar_a_excel_con_hojas(ticker_input, expiration_date, size_of_the_window
|
|
| 181 |
|
| 182 |
|
| 183 |
# --- Valores por defecto para inicializar la tabla ---
|
| 184 |
-
initial_df_put = generar_tabla("put", "MSTR",
|
| 185 |
-
initial_df_call = generar_tabla("call", "MSTR",
|
| 186 |
|
| 187 |
|
| 188 |
with gr.Blocks(title="Análisis de Opciones") as demo:
|
|
@@ -235,9 +235,7 @@ with gr.Blocks(title="Análisis de Opciones") as demo:
|
|
| 235 |
fn=generar_todo,
|
| 236 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 237 |
outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
|
| 238 |
-
)
|
| 239 |
-
|
| 240 |
-
btn_plot.click(
|
| 241 |
fn=plot_opciones,
|
| 242 |
inputs=[df_put_state, df_call_state, ticker_input, expiration_date],
|
| 243 |
outputs=[output_plot1, output_plot2]
|
|
|
|
| 181 |
|
| 182 |
|
| 183 |
# --- Valores por defecto para inicializar la tabla ---
|
| 184 |
+
initial_df_put = generar_tabla("put", "MSTR", '1900-01-01', 16)
|
| 185 |
+
initial_df_call = generar_tabla("call", "MSTR", '1900-01-01', 16)
|
| 186 |
|
| 187 |
|
| 188 |
with gr.Blocks(title="Análisis de Opciones") as demo:
|
|
|
|
| 235 |
fn=generar_todo,
|
| 236 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 237 |
outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
|
| 238 |
+
).then(
|
|
|
|
|
|
|
| 239 |
fn=plot_opciones,
|
| 240 |
inputs=[df_put_state, df_call_state, ticker_input, expiration_date],
|
| 241 |
outputs=[output_plot1, output_plot2]
|