Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -77,23 +77,23 @@ def attend():
|
|
77 |
csv_writer = csv.writer(csv_file)
|
78 |
|
79 |
@app.route('/at')
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
# Call the function to run face recognition
|
94 |
-
|
95 |
|
96 |
-
|
97 |
|
98 |
@app.route('/table')
|
99 |
def show_table():
|
|
|
77 |
csv_writer = csv.writer(csv_file)
|
78 |
|
79 |
@app.route('/at')
|
80 |
+
def run_face_recognition():
|
81 |
+
bytes_data=None
|
82 |
|
83 |
+
img_file_buffer=st.camera_input("Take a picture")
|
84 |
+
if img_file_buffer is not None:
|
85 |
+
st.write("data ")
|
86 |
+
test_image=Image.open(img_file_buffer)
|
87 |
+
st.image(test_image)
|
88 |
|
89 |
+
if bytes_data is None:
|
90 |
+
st.write("nothing")
|
91 |
+
st.stop()
|
92 |
|
93 |
# Call the function to run face recognition
|
94 |
+
run_face_recognition()
|
95 |
|
96 |
+
return redirect(url_for('show_table'))
|
97 |
|
98 |
@app.route('/table')
|
99 |
def show_table():
|