Spaces:
Sleeping
Sleeping
change
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ st.title("AutoAssess")
|
|
25 |
st.write("If you see this, the basic app is loading correctly!")
|
26 |
|
27 |
# Upload folder of images
|
28 |
-
uploaded_files =
|
29 |
|
30 |
# replace uploaded files with files loading from directory
|
31 |
# image_dir = "data/images"
|
@@ -49,6 +49,7 @@ if st.button("Process Essays"):
|
|
49 |
if not uploaded_files or not essay_question or not grading_criteria or not excel_file:
|
50 |
st.warning("Please upload all required files and enter necessary information.")
|
51 |
else:
|
|
|
52 |
# Process student info file
|
53 |
workbook = load_workbook(excel_file)
|
54 |
|
|
|
25 |
st.write("If you see this, the basic app is loading correctly!")
|
26 |
|
27 |
# Upload folder of images
|
28 |
+
uploaded_files = 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"
|
|
|
49 |
if not uploaded_files or not essay_question or not grading_criteria or not excel_file:
|
50 |
st.warning("Please upload all required files and enter necessary information.")
|
51 |
else:
|
52 |
+
uploaded_files = sorted(uploaded_files, key=lambda x: x.name)
|
53 |
# Process student info file
|
54 |
workbook = load_workbook(excel_file)
|
55 |
|