Spaces:
Running
Running
Abaryan
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -79,27 +79,33 @@ Answer:"""
|
|
79 |
model_answer, model_reasoning = extract_answer(prediction)
|
80 |
|
81 |
# Format the output
|
82 |
-
output = f"""## Model
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
### Answer
|
85 |
{model_answer}
|
86 |
|
87 |
### Reasoning
|
88 |
{model_reasoning if model_reasoning else "No reasoning provided"}
|
89 |
-
|
90 |
-
### Evaluation
|
91 |
"""
|
92 |
|
93 |
# Add evaluation if correct answer is available
|
94 |
if correct_option is not None:
|
95 |
correct_letter = chr(65 + correct_option) # Convert 0-3 to A-D
|
96 |
is_correct = model_answer == correct_letter
|
97 |
-
output += f"
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
103 |
|
104 |
return output
|
105 |
|
|
|
79 |
model_answer, model_reasoning = extract_answer(prediction)
|
80 |
|
81 |
# Format the output
|
82 |
+
output = f"""## Raw Model Output
|
83 |
+
```
|
84 |
+
{prediction}
|
85 |
+
```
|
86 |
+
|
87 |
+
## Evaluation
|
88 |
|
89 |
### Answer
|
90 |
{model_answer}
|
91 |
|
92 |
### Reasoning
|
93 |
{model_reasoning if model_reasoning else "No reasoning provided"}
|
|
|
|
|
94 |
"""
|
95 |
|
96 |
# Add evaluation if correct answer is available
|
97 |
if correct_option is not None:
|
98 |
correct_letter = chr(65 + correct_option) # Convert 0-3 to A-D
|
99 |
is_correct = model_answer == correct_letter
|
100 |
+
output += f"""
|
101 |
+
### Results
|
102 |
+
- Correct Answer: {correct_letter}
|
103 |
+
- Model's Answer: {model_answer}
|
104 |
+
- Result: {'✅ Correct' if is_correct else '❌ Incorrect'}
|
105 |
+
|
106 |
+
### Expert Explanation
|
107 |
+
{explanation if explanation else "No expert explanation available"}
|
108 |
+
"""
|
109 |
|
110 |
return output
|
111 |
|