Update app.py
Browse files
app.py
CHANGED
|
@@ -44,12 +44,16 @@ def fetch_data(symbol, req_type):
|
|
| 44 |
|
| 45 |
|
| 46 |
# --- Gradio Minimal Layout ---
|
| 47 |
-
with gr.Blocks(
|
| 48 |
-
|
| 49 |
-
#
|
| 50 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
# Top horizontal row
|
| 53 |
with gr.Row(elem_id="topbar"):
|
| 54 |
symbol = gr.Textbox(
|
| 55 |
label="",
|
|
@@ -77,15 +81,9 @@ with gr.Blocks(css="""
|
|
| 77 |
)
|
| 78 |
btn = gr.Button("Submit", scale=1)
|
| 79 |
|
| 80 |
-
# Output container (full HTML)
|
| 81 |
output = gr.HTML()
|
| 82 |
|
| 83 |
-
|
| 84 |
-
btn.click(
|
| 85 |
-
fetch_data,
|
| 86 |
-
inputs=[symbol, req_type],
|
| 87 |
-
outputs=output
|
| 88 |
-
)
|
| 89 |
|
| 90 |
|
| 91 |
# --- Launch Server ---
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
# --- Gradio Minimal Layout ---
|
| 47 |
+
with gr.Blocks() as iface:
|
| 48 |
+
|
| 49 |
+
# Inject custom CSS (safe for older Gradio)
|
| 50 |
+
gr.HTML("""
|
| 51 |
+
<style>
|
| 52 |
+
.gradio-container {padding-top: 0 !important;}
|
| 53 |
+
#topbar {margin: 0; padding: 0;}
|
| 54 |
+
</style>
|
| 55 |
+
""")
|
| 56 |
|
|
|
|
| 57 |
with gr.Row(elem_id="topbar"):
|
| 58 |
symbol = gr.Textbox(
|
| 59 |
label="",
|
|
|
|
| 81 |
)
|
| 82 |
btn = gr.Button("Submit", scale=1)
|
| 83 |
|
|
|
|
| 84 |
output = gr.HTML()
|
| 85 |
|
| 86 |
+
btn.click(fetch_data, inputs=[symbol, req_type], outputs=output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
|
| 89 |
# --- Launch Server ---
|