Vikas01 commited on
Commit
68a7922
·
1 Parent(s): 55e552e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -13,7 +13,7 @@ import matplotlib.pyplot as plt
13
  # pylab.rcParams['figure.figsize'] = (10.0, 8.0) # this controls figure size in the notebook
14
 
15
  import io
16
- import streamlit as st
17
 
18
 
19
 
@@ -81,17 +81,17 @@ def attend():
81
  def run_face_recognition():
82
  bytes_data=None
83
 
84
- img_file_buffer=st.camera_input("Take a picture")
85
  if img_file_buffer is not None:
86
  test_image = Image.open(img_file_buffer)
87
- st.image(test_image, use_column_width=True)
88
- st.write(type(test_image))
89
  image = np.asarray(test_image)
90
  gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
91
 
92
- st.image(cv2.cvtColor(gray))
93
  if bytes_data is None:
94
- st.stop()
95
 
96
 
97
 
 
13
  # pylab.rcParams['figure.figsize'] = (10.0, 8.0) # this controls figure size in the notebook
14
 
15
  import io
16
+ import gradio as gr
17
 
18
 
19
 
 
81
  def run_face_recognition():
82
  bytes_data=None
83
 
84
+ img_file_buffer=gr.camera_input("Take a picture")
85
  if img_file_buffer is not None:
86
  test_image = Image.open(img_file_buffer)
87
+ gr.image(test_image, use_column_width=True)
88
+ gr.write(type(test_image))
89
  image = np.asarray(test_image)
90
  gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
91
 
92
+ gr.image(cv2.cvtColor(gray))
93
  if bytes_data is None:
94
+ gr.stop()
95
 
96
 
97