Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,7 +83,7 @@ def process_submission(input_img, text_answer, country, state, city, se_asia_rel
|
|
83 |
image_path = None
|
84 |
if input_img is not None:
|
85 |
# Create filename with submission ID
|
86 |
-
image_filename = f"{timestamp}
|
87 |
image_path = os.path.join("uploaded_images", image_filename)
|
88 |
|
89 |
# Save the image
|
@@ -109,7 +109,7 @@ def process_submission(input_img, text_answer, country, state, city, se_asia_rel
|
|
109 |
}
|
110 |
|
111 |
# Save the data as JSON
|
112 |
-
json_filename = f"{timestamp}
|
113 |
json_path = os.path.join("submissions", json_filename)
|
114 |
with open(json_path, "w") as f:
|
115 |
json.dump(submission_data, f, indent=2)
|
|
|
83 |
image_path = None
|
84 |
if input_img is not None:
|
85 |
# Create filename with submission ID
|
86 |
+
image_filename = f"{timestamp}.jpg"
|
87 |
image_path = os.path.join("uploaded_images", image_filename)
|
88 |
|
89 |
# Save the image
|
|
|
109 |
}
|
110 |
|
111 |
# Save the data as JSON
|
112 |
+
json_filename = f"{timestamp}.json"
|
113 |
json_path = os.path.join("submissions", json_filename)
|
114 |
with open(json_path, "w") as f:
|
115 |
json.dump(submission_data, f, indent=2)
|