Vikas01 commited on
Commit
fe7f886
·
1 Parent(s): 7e05515

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -78,8 +78,22 @@ def attend():
78
  csv_writer = csv.writer(csv_file)
79
 
80
 
81
-
82
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
 
85
 
 
78
  csv_writer = csv.writer(csv_file)
79
 
80
 
81
+ @app.route('/at')
82
+ def cam():
83
+ bytes_data=None
84
+ img_file_buffer=st.camera_input("Take a picture")
85
+ if img_file_buffer is not None:
86
+
87
+ test_image = Image.open(img_file_buffer)
88
+ st.image(test_image, use_column_width=True)
89
+ st.write(type(test_image))
90
+ image = np.asarray(test_image)
91
+ gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
92
+ st.image(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
93
+ if bytes_data is None:
94
+ st.stop()
95
+
96
+ return render_template('attendance.html')
97
 
98
 
99