ngcanh commited on
Commit
f68fdda
·
verified ·
1 Parent(s): 98da028

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -86,7 +86,7 @@ capy_proposal = read_pdf(file_path)
86
  # input = read_pdf(file_path)
87
 
88
  # Function to grade the essay using GPT-4
89
- def grade_essay(input):
90
  # Sample prompt for grading using GPT-4
91
  template = f"""
92
 
@@ -175,8 +175,8 @@ def main():
175
  # Grading button
176
  if st.button("Grade Proposal"):
177
  if new_file:
178
- # final_feedback = grade_essay(input = new_file)
179
- # final_feedback = final_feedback.replace("\n", "")
180
  df = pd.read_json(grade_essay(input = new_file))
181
  df = df.T
182
  # Store results in session state
 
86
  # input = read_pdf(file_path)
87
 
88
  # Function to grade the essay using GPT-4
89
+ def grade_essay(str(input)):
90
  # Sample prompt for grading using GPT-4
91
  template = f"""
92
 
 
175
  # Grading button
176
  if st.button("Grade Proposal"):
177
  if new_file:
178
+ final_feedback = grade_essay(input = new_file)
179
+ final_feedback = final_feedback.replace("\n", "")
180
  df = pd.read_json(grade_essay(input = new_file))
181
  df = df.T
182
  # Store results in session state