ngcanh commited on
Commit
a331d36
·
verified ·
1 Parent(s): 10fa374

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -126,24 +126,24 @@ def main():
126
  if st.button("Grade Essays"):
127
  if example_files and scores_file and new_file:
128
 
129
- # Grading the new essay using the provided barem and example graded essays
130
- result = grade_essay(new_file, example_files, barem)
131
 
132
- # Parse feedback into barem components
133
- parsed_scores = parse_feedback(result)
134
 
135
- # Store results in session state
136
- st.session_state.results.append({
137
- 'Essay File': new_file.name,
138
- **parsed_scores,
139
- 'Feedback': result,
140
- })
141
 
142
- # Display the grading feedback
143
- st.write("Feedback:")
144
- st.write(result)
145
 
146
- st.success("Grading completed for all uploaded essays.")
147
  else:
148
  st.error("Please upload a proposal in pdf")
149
 
 
126
  if st.button("Grade Essays"):
127
  if example_files and scores_file and new_file:
128
 
129
+ # Grading the new essay using the provided barem and example graded essays
130
+ result = grade_essay(new_file, example_files, barem)
131
 
132
+ # Parse feedback into barem components
133
+ parsed_scores = parse_feedback(result)
134
 
135
+ # Store results in session state
136
+ st.session_state.results.append({
137
+ 'Essay File': new_file.name,
138
+ **parsed_scores,
139
+ 'Feedback': result,
140
+ })
141
 
142
+ # Display the grading feedback
143
+ st.write("Feedback:")
144
+ st.write(result)
145
 
146
+ st.success("Grading completed for uploaded proposal.")
147
  else:
148
  st.error("Please upload a proposal in pdf")
149