ZhouChuYue
commited on
Commit
Β·
f3602b9
1
Parent(s):
5e6d33f
resize
Browse files
app.py
CHANGED
|
@@ -323,9 +323,9 @@ label {
|
|
| 323 |
|
| 324 |
/* Fixed height textbox with scrollbar */
|
| 325 |
.gr-textbox textarea {
|
| 326 |
-
max-height:
|
| 327 |
overflow-y: auto !important;
|
| 328 |
-
resize:
|
| 329 |
}
|
| 330 |
|
| 331 |
/* Markdown box styling */
|
|
@@ -334,8 +334,8 @@ label {
|
|
| 334 |
border: 1px solid rgba(124, 58, 237, 0.3) !important;
|
| 335 |
border-radius: 8px !important;
|
| 336 |
padding: 16px !important;
|
| 337 |
-
min-height:
|
| 338 |
-
max-height:
|
| 339 |
overflow-y: auto !important;
|
| 340 |
color: #1a1a2e !important;
|
| 341 |
}
|
|
@@ -392,10 +392,11 @@ with gr.Blocks(title="UltraData Math Parser") as demo:
|
|
| 392 |
url_input = gr.Textbox(
|
| 393 |
label="URL",
|
| 394 |
placeholder="Enter URL to fetch (e.g., https://example.com/math-article)",
|
| 395 |
-
lines=
|
|
|
|
| 396 |
value="https://math.stackexchange.com/questions/5120625/ode-problem-of-yt-sqrtyt-with-the-inital-value-y0-1-t-geq-0",
|
| 397 |
)
|
| 398 |
-
fetch_btn = gr.Button("π₯ Fetch & Parse", variant="primary")
|
| 399 |
|
| 400 |
with gr.TabItem("π HTML"):
|
| 401 |
pass # HTML input will be below, shared between tabs
|
|
@@ -403,8 +404,8 @@ with gr.Blocks(title="UltraData Math Parser") as demo:
|
|
| 403 |
html_input = gr.Textbox(
|
| 404 |
label="HTML Content",
|
| 405 |
placeholder="Paste your HTML content here or fetch from URL above...",
|
| 406 |
-
lines=
|
| 407 |
-
max_lines=
|
| 408 |
value=EXAMPLE_HTML,
|
| 409 |
)
|
| 410 |
|
|
@@ -465,16 +466,16 @@ with gr.Blocks(title="UltraData Math Parser") as demo:
|
|
| 465 |
with gr.TabItem("π Plain Text"):
|
| 466 |
text_output = gr.Textbox(
|
| 467 |
label="Plain Text (w3m rendered)",
|
| 468 |
-
lines=
|
| 469 |
-
max_lines=
|
| 470 |
interactive=False,
|
| 471 |
autoscroll=False,
|
| 472 |
)
|
| 473 |
with gr.TabItem("π Raw HTML"):
|
| 474 |
html_output = gr.Textbox(
|
| 475 |
label="Extracted HTML",
|
| 476 |
-
lines=
|
| 477 |
-
max_lines=
|
| 478 |
interactive=False,
|
| 479 |
autoscroll=False,
|
| 480 |
)
|
|
|
|
| 323 |
|
| 324 |
/* Fixed height textbox with scrollbar */
|
| 325 |
.gr-textbox textarea {
|
| 326 |
+
max-height: 300px !important;
|
| 327 |
overflow-y: auto !important;
|
| 328 |
+
resize: vertical !important;
|
| 329 |
}
|
| 330 |
|
| 331 |
/* Markdown box styling */
|
|
|
|
| 334 |
border: 1px solid rgba(124, 58, 237, 0.3) !important;
|
| 335 |
border-radius: 8px !important;
|
| 336 |
padding: 16px !important;
|
| 337 |
+
min-height: 280px !important;
|
| 338 |
+
max-height: 300px !important;
|
| 339 |
overflow-y: auto !important;
|
| 340 |
color: #1a1a2e !important;
|
| 341 |
}
|
|
|
|
| 392 |
url_input = gr.Textbox(
|
| 393 |
label="URL",
|
| 394 |
placeholder="Enter URL to fetch (e.g., https://example.com/math-article)",
|
| 395 |
+
lines=3,
|
| 396 |
+
max_lines=5,
|
| 397 |
value="https://math.stackexchange.com/questions/5120625/ode-problem-of-yt-sqrtyt-with-the-inital-value-y0-1-t-geq-0",
|
| 398 |
)
|
| 399 |
+
fetch_btn = gr.Button("π₯ Fetch & Parse", variant="primary", size="lg")
|
| 400 |
|
| 401 |
with gr.TabItem("π HTML"):
|
| 402 |
pass # HTML input will be below, shared between tabs
|
|
|
|
| 404 |
html_input = gr.Textbox(
|
| 405 |
label="HTML Content",
|
| 406 |
placeholder="Paste your HTML content here or fetch from URL above...",
|
| 407 |
+
lines=10,
|
| 408 |
+
max_lines=20,
|
| 409 |
value=EXAMPLE_HTML,
|
| 410 |
)
|
| 411 |
|
|
|
|
| 466 |
with gr.TabItem("π Plain Text"):
|
| 467 |
text_output = gr.Textbox(
|
| 468 |
label="Plain Text (w3m rendered)",
|
| 469 |
+
lines=12,
|
| 470 |
+
max_lines=12,
|
| 471 |
interactive=False,
|
| 472 |
autoscroll=False,
|
| 473 |
)
|
| 474 |
with gr.TabItem("π Raw HTML"):
|
| 475 |
html_output = gr.Textbox(
|
| 476 |
label="Extracted HTML",
|
| 477 |
+
lines=12,
|
| 478 |
+
max_lines=12,
|
| 479 |
interactive=False,
|
| 480 |
autoscroll=False,
|
| 481 |
)
|