Update app.py
Browse files
app.py
CHANGED
|
@@ -219,17 +219,19 @@ with gr.Blocks(title="Análisis de Opciones") as demo:
|
|
| 219 |
df_put_state = gr.State(value=initial_df_put)
|
| 220 |
df_call_state = gr.State(value=initial_df_call)
|
| 221 |
|
| 222 |
-
|
| 223 |
|
| 224 |
with gr.Tab("Puts"):
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
with gr.Row():
|
| 228 |
|
| 229 |
output_df_put = gr.DataFrame(label="Datos de Opciones put", value=initial_df_put)
|
| 230 |
|
| 231 |
-
|
| 232 |
-
triggers=None, # Esto hace que se ejecute al cargar
|
| 233 |
fn=generar_puts,
|
| 234 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 235 |
outputs= [ output_df_put, df_put_state]
|
|
@@ -238,14 +240,15 @@ with gr.Blocks(title="Análisis de Opciones") as demo:
|
|
| 238 |
|
| 239 |
with gr.Tab("Calls"):
|
| 240 |
|
|
|
|
| 241 |
gr.Markdown("# Opciones Call")
|
|
|
|
| 242 |
|
| 243 |
with gr.Row():
|
| 244 |
|
| 245 |
output_df_call = gr.DataFrame(label="Datos de Opciones call", value=initial_df_call)
|
| 246 |
|
| 247 |
-
|
| 248 |
-
triggers=None, # Esto hace que se ejecute al cargar
|
| 249 |
fn=generar_calls,
|
| 250 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 251 |
outputs= [ output_df_call, df_call_state]
|
|
|
|
| 219 |
df_put_state = gr.State(value=initial_df_put)
|
| 220 |
df_call_state = gr.State(value=initial_df_call)
|
| 221 |
|
| 222 |
+
|
| 223 |
|
| 224 |
with gr.Tab("Puts"):
|
| 225 |
+
|
| 226 |
+
with gr.Row():
|
| 227 |
+
gr.Markdown("# Opciones Put")
|
| 228 |
+
btn_mostrar1 = gr.Button("Mostrar datos")
|
| 229 |
|
| 230 |
with gr.Row():
|
| 231 |
|
| 232 |
output_df_put = gr.DataFrame(label="Datos de Opciones put", value=initial_df_put)
|
| 233 |
|
| 234 |
+
btn_mostrar1.click(
|
|
|
|
| 235 |
fn=generar_puts,
|
| 236 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 237 |
outputs= [ output_df_put, df_put_state]
|
|
|
|
| 240 |
|
| 241 |
with gr.Tab("Calls"):
|
| 242 |
|
| 243 |
+
with gr.Row():
|
| 244 |
gr.Markdown("# Opciones Call")
|
| 245 |
+
btn_mostrar2 = gr.Button("Mostrar datos")
|
| 246 |
|
| 247 |
with gr.Row():
|
| 248 |
|
| 249 |
output_df_call = gr.DataFrame(label="Datos de Opciones call", value=initial_df_call)
|
| 250 |
|
| 251 |
+
btn_mostrar2(
|
|
|
|
| 252 |
fn=generar_calls,
|
| 253 |
inputs=[ticker_input, expiration_date, size_of_the_window],
|
| 254 |
outputs= [ output_df_call, df_call_state]
|