Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
179 |
-
|
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
|