Spaces:
Sleeping
Sleeping
change
Browse files
app.py
CHANGED
@@ -25,14 +25,14 @@ st.title("AutoAssess")
|
|
25 |
st.write("If you see this, the basic app is loading correctly!")
|
26 |
|
27 |
# Upload folder of images
|
28 |
-
|
29 |
|
30 |
# replace uploaded files with files loading from directory
|
31 |
-
image_dir = "data/images"
|
32 |
-
uploaded_files = []
|
33 |
-
for file in os.listdir(image_dir):
|
34 |
-
|
35 |
-
|
36 |
|
37 |
# Text inputs for question and criteria
|
38 |
# essay_question = st.text_input("Enter the essay question:")
|
@@ -42,8 +42,8 @@ essay_question = "What is beauty?"
|
|
42 |
grading_criteria = "1. Introduction\n2. Body\n3. Conclusion\n4. Grammar\n5. Spelling\n6. Punctuation\n7. Originality\n8. Creativity"
|
43 |
|
44 |
# Upload Excel file with student IDs and page count
|
45 |
-
|
46 |
-
excel_file = "data/essays.xlsx"
|
47 |
|
48 |
if st.button("Process Essays"):
|
49 |
if not uploaded_files or not essay_question or not grading_criteria or not excel_file:
|
|
|
25 |
st.write("If you see this, the basic app is loading correctly!")
|
26 |
|
27 |
# Upload folder of images
|
28 |
+
uploaded_files = sorted(st.file_uploader("Upload a folder of student essays (images)", type=['jpg', 'jpeg', 'png'], accept_multiple_files=True))
|
29 |
|
30 |
# replace uploaded files with files loading from directory
|
31 |
+
# image_dir = "data/images"
|
32 |
+
# uploaded_files = []
|
33 |
+
# for file in os.listdir(image_dir):
|
34 |
+
# with open(image_dir + '/' + file, "rb") as image_file:
|
35 |
+
# uploaded_files.append(image_file.read())
|
36 |
|
37 |
# Text inputs for question and criteria
|
38 |
# essay_question = st.text_input("Enter the essay question:")
|
|
|
42 |
grading_criteria = "1. Introduction\n2. Body\n3. Conclusion\n4. Grammar\n5. Spelling\n6. Punctuation\n7. Originality\n8. Creativity"
|
43 |
|
44 |
# Upload Excel file with student IDs and page count
|
45 |
+
student_info_file = st.file_uploader("Upload Excel file with student IDs and page count", type=["xlsx"])
|
46 |
+
# excel_file = "data/essays.xlsx"
|
47 |
|
48 |
if st.button("Process Essays"):
|
49 |
if not uploaded_files or not essay_question or not grading_criteria or not excel_file:
|