Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,7 @@ for cls in myList:
|
|
28 |
classnames.append(os.path.splitext(cls)[0])
|
29 |
st.write(classnames)
|
30 |
|
|
|
31 |
def findEncodings(Images):
|
32 |
encodeList = []
|
33 |
for img in Images:
|
@@ -46,8 +47,8 @@ if img_file_buffer is not None:
|
|
46 |
test_image = Image.open(img_file_buffer)
|
47 |
st.image(test_image, use_column_width=True)
|
48 |
|
49 |
-
image = np.asarray(test_image)
|
50 |
-
|
51 |
#########################
|
52 |
imgS = cv2.resize(image,(0,0),None,0.25,0.25)
|
53 |
imgS = cv2.cvtColor(imgS, cv2.COLOR_BGR2RGB)
|
@@ -72,12 +73,18 @@ if img_file_buffer is not None:
|
|
72 |
##############
|
73 |
url = "https://rgiattendance.000webhostapp.com"
|
74 |
url1 = "/update.php"
|
75 |
-
data1 = {'name':name
|
76 |
response = requests.post(url+url1, data=data1)
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
if response.status_code == 200 :
|
79 |
st.write(" data updated on : " + url)
|
80 |
-
else : st.write("data
|
81 |
|
82 |
##############################
|
83 |
st.image(image)
|
|
|
28 |
classnames.append(os.path.splitext(cls)[0])
|
29 |
st.write(classnames)
|
30 |
|
31 |
+
|
32 |
def findEncodings(Images):
|
33 |
encodeList = []
|
34 |
for img in Images:
|
|
|
47 |
test_image = Image.open(img_file_buffer)
|
48 |
st.image(test_image, use_column_width=True)
|
49 |
|
50 |
+
image = np.asarray(test_image)
|
51 |
+
|
52 |
#########################
|
53 |
imgS = cv2.resize(image,(0,0),None,0.25,0.25)
|
54 |
imgS = cv2.cvtColor(imgS, cv2.COLOR_BGR2RGB)
|
|
|
73 |
##############
|
74 |
url = "https://rgiattendance.000webhostapp.com"
|
75 |
url1 = "/update.php"
|
76 |
+
data1 = {'name':name }
|
77 |
response = requests.post(url+url1, data=data1)
|
78 |
+
|
79 |
+
# # https://aimljul23f.glitch.me/fsave?nm=testname
|
80 |
+
# url = "https://aimljul23f.glitch.me/"
|
81 |
+
# url1 = "fsave?nm=" + name
|
82 |
+
# # data1 = {'name':name }
|
83 |
+
# response = requests.post(url+url1)
|
84 |
|
85 |
if response.status_code == 200 :
|
86 |
st.write(" data updated on : " + url)
|
87 |
+
else : st.write("data NOT updated " + url+url1)
|
88 |
|
89 |
##############################
|
90 |
st.image(image)
|