sarwansingh commited on
Commit
63b81a1
·
verified ·
1 Parent(s): 618fae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -164,7 +164,22 @@ with app_tab:
164
 
165
  # Display the results
166
  if prediction[match_idx] >= 0.6:
167
- pname = image_paths[match_idx].split('/')[-1].split('.')[0]
168
- st.write('Welcome: ',pname)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  else:
170
  st.write("Match not found")
 
164
 
165
  # Display the results
166
  if prediction[match_idx] >= 0.6:
167
+ pname = image_paths[match_idx].split('/')[-1].split('.')[0]
168
+ st.write('Welcome: ',pname)
169
+
170
+ ###### upload the data to Glitch https://aimljan25f.glitch.me/adds
171
+ # # using post method
172
+ url = "https://aimljan25f.glitch.me/adds"
173
+
174
+ data = {'rno': '15','sname': pname, 'sclass': '7' }
175
+ # response = requests.post(url +url1 , data=data)
176
+
177
+ # Post Method is invoked if data != None
178
+ req = request.Request(url , method="POST", data=data)
179
+
180
+ # Response
181
+ resp = request.urlopen(req)
182
+
183
+ #######################
184
  else:
185
  st.write("Match not found")