Abaryan commited on
Commit
b89d5ac
·
verified ·
1 Parent(s): ecef291

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -9
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's Response
 
 
 
 
 
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"- Correct Answer: {correct_letter}\n"
98
- output += f"- Model's Answer: {model_answer}\n"
99
- output += f"- Result: {'✅ Correct' if is_correct else '❌ Incorrect'}\n"
100
-
101
- if explanation:
102
- output += f"\n### Expert Explanation\n{explanation}"
 
 
 
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