Spaces:
Running
Running
pragnakalp
commited on
Commit
•
ecdecda
1
Parent(s):
0d71e3c
changes for mail sending
Browse files
app.py
CHANGED
@@ -129,10 +129,10 @@ def save_details(Method,text_output,img):
|
|
129 |
print(img)
|
130 |
hostname = get_device_ip_address()
|
131 |
# url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_image_to_text'
|
132 |
-
url = 'http://pragnakalpdev35.pythonanywhere.com/HF_space_image_to_text'
|
133 |
-
myobj = {'Method': Method,'text_output':text_output,'img':img.tolist(),'hostname':hostname}
|
134 |
-
|
135 |
-
|
136 |
# method = []
|
137 |
# img_path = []
|
138 |
# text = []
|
@@ -165,8 +165,8 @@ def save_details(Method,text_output,img):
|
|
165 |
# df.to_csv("AllDetails.csv")
|
166 |
|
167 |
|
168 |
-
|
169 |
-
return x
|
170 |
|
171 |
"""
|
172 |
Create user interface for OCR demo
|
|
|
129 |
print(img)
|
130 |
hostname = get_device_ip_address()
|
131 |
# url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_image_to_text'
|
132 |
+
# url = 'http://pragnakalpdev35.pythonanywhere.com/HF_space_image_to_text'
|
133 |
+
# myobj = {'Method': Method,'text_output':text_output,'img':img.tolist(),'hostname':hostname}
|
134 |
+
# x = requests.post(url, json = myobj)
|
135 |
+
|
136 |
# method = []
|
137 |
# img_path = []
|
138 |
# text = []
|
|
|
165 |
# df.to_csv("AllDetails.csv")
|
166 |
|
167 |
|
168 |
+
return send_user_email(hostname,text_output,Method)
|
169 |
+
# return x
|
170 |
|
171 |
"""
|
172 |
Create user interface for OCR demo
|