Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import requests
|
|
6 |
import face_recognition
|
7 |
import os
|
8 |
import streamlit as st
|
9 |
-
import
|
10 |
|
11 |
####### Section 2 ###################
|
12 |
p1 = "sarwan.jpg"
|
@@ -67,18 +67,24 @@ if img_file_buffer is not None:
|
|
67 |
cv2.putText(image , name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
68 |
|
69 |
########## update website
|
70 |
-
# using Get Method
|
71 |
-
url = "https://fc11.glitch.me/submit?email=pm&message=faceReco&name="
|
72 |
-
url = url + name
|
73 |
-
st.write(url)
|
74 |
-
res = urllib.request.urlopen(url)
|
75 |
-
response = requests.post(url )
|
76 |
|
77 |
# # using post method
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
# response = requests.post(url +url1 , data=data)
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
# if response.status_code == 200:
|
83 |
# st.success("Data updated on: " + "https://aimljul24f.glitch.me/")
|
84 |
# else:
|
|
|
6 |
import face_recognition
|
7 |
import os
|
8 |
import streamlit as st
|
9 |
+
from urllib import request
|
10 |
|
11 |
####### Section 2 ###################
|
12 |
p1 = "sarwan.jpg"
|
|
|
67 |
cv2.putText(image , name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
68 |
|
69 |
########## update website
|
70 |
+
# # using Get Method
|
71 |
+
# url = "https://fc11.glitch.me/submit?email=pm&message=faceReco&name="
|
72 |
+
# url = url + name
|
73 |
+
# st.write(url)
|
74 |
+
# res = urllib.request.urlopen(url)
|
75 |
+
# response = requests.post(url )
|
76 |
|
77 |
# # using post method
|
78 |
+
url = "https://aimljul24f.glitch.me"
|
79 |
+
url1 = "/save"
|
80 |
+
data = {'rollno': '99','name': name, 'email': '[email protected]','pwd': '**' }
|
81 |
# response = requests.post(url +url1 , data=data)
|
82 |
+
|
83 |
+
# Post Method is invoked if data != None
|
84 |
+
req = request.Request(url+url1, data=data)
|
85 |
+
|
86 |
+
# Response
|
87 |
+
resp = request.urlopen(req)
|
88 |
# if response.status_code == 200:
|
89 |
# st.success("Data updated on: " + "https://aimljul24f.glitch.me/")
|
90 |
# else:
|