pragnakalp
commited on
Commit
•
31b2b68
1
Parent(s):
09472b6
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,25 @@ import keras_ocr
|
|
5 |
import cv2
|
6 |
import os
|
7 |
import numpy as np
|
8 |
-
import pandas as
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
from datetime import datetime
|
10 |
import scipy.ndimage.interpolation as inter
|
11 |
import easyocr
|
@@ -112,25 +130,25 @@ def generate_ocr(Method,img):
|
|
112 |
if Method == 'PaddleOCR':
|
113 |
text_output = ocr_with_paddle(img)
|
114 |
# save_details(Method,text_output,img)
|
115 |
-
sender="[email protected]"
|
116 |
-
password="httscgatatbbxxur"
|
117 |
-
reciever="[email protected]"
|
118 |
-
|
119 |
-
s = smtplib.SMTP_TLS('smtp.gmail.com', 587)
|
120 |
-
s.starttls()
|
121 |
-
s.ehlo()
|
122 |
-
# Pretend the SMTP server supports some forms of authentication.
|
123 |
-
smtp.esmtp_features['auth'] = 'LOGIN DIGEST-MD5 PLAIN'
|
124 |
-
s.login(sender,password)
|
125 |
-
|
126 |
-
|
127 |
-
message = """Subject : Appointment Booking\n\n
|
128 |
-
|
129 |
-
Your OCR generated successfully"""
|
130 |
-
s.sendmail(sender, reciever, message)
|
131 |
-
s.quit()
|
132 |
-
mailsend=1
|
133 |
-
print("Send mail successfully")
|
134 |
# return text_output
|
135 |
# hostname = socket.gethostname()
|
136 |
# IPAddr = socket.gethostbyname(hostname)
|
|
|
5 |
import cv2
|
6 |
import os
|
7 |
import numpy as np
|
8 |
+
import pandas as pdsender="[email protected]"
|
9 |
+
# password="httscgatatbbxxur"
|
10 |
+
# reciever="[email protected]"
|
11 |
+
|
12 |
+
# s = smtplib.SMTP_TLS('smtp.gmail.com', 587)
|
13 |
+
# s.starttls()
|
14 |
+
# s.ehlo()
|
15 |
+
# # Pretend the SMTP server supports some forms of authentication.
|
16 |
+
# smtp.esmtp_features['auth'] = 'LOGIN DIGEST-MD5 PLAIN'
|
17 |
+
# s.login(sender,password)
|
18 |
+
|
19 |
+
|
20 |
+
# message = """Subject : Appointment Booking\n\n
|
21 |
+
# Hello,
|
22 |
+
# Your OCR generated successfully"""
|
23 |
+
# s.sendmail(sender, reciever, message)
|
24 |
+
# s.quit()
|
25 |
+
# mailsend=1
|
26 |
+
# print("Send mail successfully")
|
27 |
from datetime import datetime
|
28 |
import scipy.ndimage.interpolation as inter
|
29 |
import easyocr
|
|
|
130 |
if Method == 'PaddleOCR':
|
131 |
text_output = ocr_with_paddle(img)
|
132 |
# save_details(Method,text_output,img)
|
133 |
+
# sender="[email protected]"
|
134 |
+
# password="httscgatatbbxxur"
|
135 |
+
# reciever="[email protected]"
|
136 |
+
|
137 |
+
# s = smtplib.SMTP_TLS('smtp.gmail.com', 587)
|
138 |
+
# s.starttls()
|
139 |
+
# s.ehlo()
|
140 |
+
# # Pretend the SMTP server supports some forms of authentication.
|
141 |
+
# smtp.esmtp_features['auth'] = 'LOGIN DIGEST-MD5 PLAIN'
|
142 |
+
# s.login(sender,password)
|
143 |
+
|
144 |
+
|
145 |
+
# message = """Subject : Appointment Booking\n\n
|
146 |
+
# Hello,
|
147 |
+
# Your OCR generated successfully"""
|
148 |
+
# s.sendmail(sender, reciever, message)
|
149 |
+
# s.quit()
|
150 |
+
# mailsend=1
|
151 |
+
# print("Send mail successfully")
|
152 |
# return text_output
|
153 |
# hostname = socket.gethostname()
|
154 |
# IPAddr = socket.gethostbyname(hostname)
|