Upload app.py
Browse files
app.py
CHANGED
|
@@ -416,13 +416,13 @@ def classify_solution_stream(question: str, solution: str, progress=gr.Progress(
|
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
# Create Gradio interface (streaming UI)
|
| 422 |
-
with gr.Blocks(title="Math Solution Classifier", theme=gr.themes.Soft()) as app:
|
| 423 |
gr.Markdown("# 🧮 Math Solution Classifier")
|
| 424 |
-
gr.Markdown(
|
| 425 |
-
|
|
|
|
|
|
|
| 426 |
|
| 427 |
with gr.Row():
|
| 428 |
# ---------- Left: inputs ----------
|
|
@@ -471,7 +471,7 @@ with gr.Blocks(title="Math Solution Classifier", theme=gr.themes.Soft()) as app:
|
|
| 471 |
fn=classify_solution_stream, # <- your generator function
|
| 472 |
inputs=[question_input, solution_input],
|
| 473 |
outputs=[classification_output, explanation_output, status_output],
|
| 474 |
-
show_progress="
|
| 475 |
)
|
| 476 |
|
| 477 |
# Clear everything
|
|
@@ -490,6 +490,3 @@ with gr.Blocks(title="Math Solution Classifier", theme=gr.themes.Soft()) as app:
|
|
| 490 |
|
| 491 |
if __name__ == "__main__":
|
| 492 |
app.launch()
|
| 493 |
-
|
| 494 |
-
if __name__ == "__main__":
|
| 495 |
-
app.launch()
|
|
|
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
+
# Create Gradio interface (streaming UI)
|
| 420 |
+
with gr.Blocks(title="Math Solution Classifier", theme=gr.themes.Soft(), queue=True) as app:
|
|
|
|
|
|
|
| 421 |
gr.Markdown("# 🧮 Math Solution Classifier")
|
| 422 |
+
gr.Markdown(
|
| 423 |
+
"Classify math solutions as **correct**, **conceptually flawed**, or **computationally flawed**. "
|
| 424 |
+
"You’ll see live status updates as the two-stage pipeline runs."
|
| 425 |
+
)
|
| 426 |
|
| 427 |
with gr.Row():
|
| 428 |
# ---------- Left: inputs ----------
|
|
|
|
| 471 |
fn=classify_solution_stream, # <- your generator function
|
| 472 |
inputs=[question_input, solution_input],
|
| 473 |
outputs=[classification_output, explanation_output, status_output],
|
| 474 |
+
show_progress="hidden", # single compact global bar; no per-output bars
|
| 475 |
)
|
| 476 |
|
| 477 |
# Clear everything
|
|
|
|
| 490 |
|
| 491 |
if __name__ == "__main__":
|
| 492 |
app.launch()
|
|
|
|
|
|
|
|
|