Vikas01 commited on
Commit
d76ab76
1 Parent(s): ecbe6d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -84,14 +84,12 @@ def run_face_recognition():
84
  if img_file_buffer is not None:
85
  # To read image file buffer as bytes:
86
  bytes_data = img_file_buffer.getvalue()
87
- # Check the type of bytes_data:
88
- # Should output: <class 'bytes'>
89
- st.write(type(bytes_data))
90
-
91
  # Call the function to run face recognition
92
 
93
- return "maa"
94
- # return redirect(url_for('show_table'))
95
 
96
  @app.route('/table')
97
  def show_table():
 
84
  if img_file_buffer is not None:
85
  # To read image file buffer as bytes:
86
  bytes_data = img_file_buffer.getvalue()
87
+ cv2_img = cv2.imdecode(np.frombuffer(bytes_data, np.uint8), cv2.IMREAD_COLOR)
88
+ st.write(type(cv2_img))
89
+ st.image(cv2_img)
 
90
  # Call the function to run face recognition
91
 
92
+ return redirect(url_for('show_table'))
 
93
 
94
  @app.route('/table')
95
  def show_table():