Update app.py
Browse files
app.py
CHANGED
|
@@ -43,36 +43,37 @@ def fetch_data(mode, req_type, name):
|
|
| 43 |
|
| 44 |
with gr.Blocks() as iface:
|
| 45 |
|
| 46 |
-
# CSS for
|
| 47 |
gr.HTML("""
|
| 48 |
<style>
|
| 49 |
.gradio-container { padding-top: 0 !important; }
|
| 50 |
-
#
|
| 51 |
-
#
|
| 52 |
height: 40px !important;
|
| 53 |
font-size: 16px;
|
| 54 |
-
box-sizing: border-box;
|
| 55 |
}
|
| 56 |
-
#
|
| 57 |
-
display: none; /* optional: hide labels to save
|
| 58 |
}
|
| 59 |
</style>
|
| 60 |
""")
|
| 61 |
|
| 62 |
-
# Top
|
| 63 |
-
with gr.
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
| 76 |
|
| 77 |
# Output area
|
| 78 |
output = gr.HTML()
|
|
|
|
| 43 |
|
| 44 |
with gr.Blocks() as iface:
|
| 45 |
|
| 46 |
+
# CSS for proper spacing and full textbox visibility
|
| 47 |
gr.HTML("""
|
| 48 |
<style>
|
| 49 |
.gradio-container { padding-top: 0 !important; }
|
| 50 |
+
#topblock { margin: 0; padding: 5px; }
|
| 51 |
+
#topblock .gr-input, #topblock .gr-select, #topblock .gr-button {
|
| 52 |
height: 40px !important;
|
| 53 |
font-size: 16px;
|
| 54 |
+
box-sizing: border-box;
|
| 55 |
}
|
| 56 |
+
#topblock .gr-input label, #topblock .gr-select label {
|
| 57 |
+
display: none; /* optional: hide labels to save space */
|
| 58 |
}
|
| 59 |
</style>
|
| 60 |
""")
|
| 61 |
|
| 62 |
+
# Top inputs in a block
|
| 63 |
+
with gr.Block(elem_id="topblock"):
|
| 64 |
+
|
| 65 |
+
mode_input = gr.Textbox(label="Mode", value="stock", scale=2, placeholder="Mode")
|
| 66 |
+
symbol = gr.Textbox(label="Stock symbol", value="PNB", scale=2, placeholder="Symbol")
|
| 67 |
+
req_type = gr.Dropdown(
|
| 68 |
+
label="req_type",
|
| 69 |
+
choices=[
|
| 70 |
+
"info","intraday","daily","qresult","result","balance","cashflow",
|
| 71 |
+
"dividend","split","index","open","preopen","ce","pe","future","bhav","highlow"
|
| 72 |
+
],
|
| 73 |
+
value="info",
|
| 74 |
+
scale=3
|
| 75 |
+
|
| 76 |
+
btn = gr.Button("Submit", scale=2)
|
| 77 |
|
| 78 |
# Output area
|
| 79 |
output = gr.HTML()
|