pragnakalp commited on
Commit
f10f992
1 Parent(s): 2d7b88a

Update app.py

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