Update app.py
#5
by
roshnn24
- opened
app.py
CHANGED
@@ -481,8 +481,6 @@ def generate_paper():
|
|
481 |
|
482 |
@app.route('/eval', methods=['GET', 'POST'])
|
483 |
def eval():
|
484 |
-
global eval_str
|
485 |
-
global max_marks
|
486 |
if request.method == 'POST':
|
487 |
input_type = request.form['input_type']
|
488 |
question_text = ""
|
@@ -515,12 +513,11 @@ def eval():
|
|
515 |
answer_text = request.form['answer_text']
|
516 |
|
517 |
evaluation_result = evaluate(question_text, answer_text, max_marks)
|
518 |
-
eval_str=evaluation_result
|
519 |
print(f"Question Text: {question_text}") # Debugging line
|
520 |
print(f"Answer Text: {answer_text}") # Debugging line
|
521 |
print(f"Evaluation Result: {evaluation_result}") # Debugging line
|
522 |
|
523 |
-
return render_template('
|
524 |
|
525 |
return render_template('teacher_eval.html')
|
526 |
|
|
|
481 |
|
482 |
@app.route('/eval', methods=['GET', 'POST'])
|
483 |
def eval():
|
|
|
|
|
484 |
if request.method == 'POST':
|
485 |
input_type = request.form['input_type']
|
486 |
question_text = ""
|
|
|
513 |
answer_text = request.form['answer_text']
|
514 |
|
515 |
evaluation_result = evaluate(question_text, answer_text, max_marks)
|
|
|
516 |
print(f"Question Text: {question_text}") # Debugging line
|
517 |
print(f"Answer Text: {answer_text}") # Debugging line
|
518 |
print(f"Evaluation Result: {evaluation_result}") # Debugging line
|
519 |
|
520 |
+
return render_template('teacher_eval.html', result=evaluation_result)
|
521 |
|
522 |
return render_template('teacher_eval.html')
|
523 |
|