Upload app.py
Browse files
app.py
CHANGED
@@ -391,8 +391,8 @@ def classify_solution_stream(question: str, solution: str):
|
|
391 |
|
392 |
try:
|
393 |
# ---------- Stage 1: Conceptual ----------
|
394 |
-
log.append("⏳ **Stage 1:
|
395 |
-
yield "⏳ Working…", "Starting initial check…", render(log)
|
396 |
|
397 |
conceptual = run_conceptual_check(question, solution, classifier_model, classifier_tokenizer)
|
398 |
pred = conceptual["prediction"]
|
@@ -473,10 +473,10 @@ with gr.Blocks(title="Math Solution Classifier", theme=gr.themes.Soft()) as app:
|
|
473 |
# -------- Examples --------
|
474 |
gr.Examples(
|
475 |
examples=[
|
476 |
-
|
477 |
-
"2x + 5 = 13\n2x = 13 - 5\n2x = 8\nx = 4"],
|
478 |
-
["John has three apples and Mary has seven, how many apples do they have together?",
|
479 |
"They have 7 + 3 = 11 apples."],
|
|
|
|
|
480 |
["What is 15% of 200?",
|
481 |
"15% = 15/100 = 0.15\n0.15 × 200 = 30"],
|
482 |
],
|
|
|
391 |
|
392 |
try:
|
393 |
# ---------- Stage 1: Conceptual ----------
|
394 |
+
log.append("⏳ **Stage 1: Conceptual check**")
|
395 |
+
yield "⏳ Working…", "Starting initial conceptual check…", render(log)
|
396 |
|
397 |
conceptual = run_conceptual_check(question, solution, classifier_model, classifier_tokenizer)
|
398 |
pred = conceptual["prediction"]
|
|
|
473 |
# -------- Examples --------
|
474 |
gr.Examples(
|
475 |
examples=[
|
476 |
+
["John has three apples and Mary has seven, how many apples do they have together?",
|
|
|
|
|
477 |
"They have 7 + 3 = 11 apples."],
|
478 |
+
["A tank holds 60 liters of fuel. A generator uses fuel at a rate of 5 liters per hour. After running for 9 hours, how many liters are still in the tank?",
|
479 |
+
"The generator uses 5 L/h × 9 h = 45 L of fuel in 9 hours. The, there remain 60 L + 45 L = 105 L in the tank. Final answer: 105 L"],
|
480 |
["What is 15% of 200?",
|
481 |
"15% = 15/100 = 0.15\n0.15 × 200 = 30"],
|
482 |
],
|