pragnakalp commited on
Commit
9f3f0c2
1 Parent(s): facfabe

Update app.py

Browse files

if not os.path.isdir('images'):
# os.mkdir('images')

Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -14,8 +14,8 @@ from paddleocr import PaddleOCR
14
  import socket
15
  from send_email_user import send_user_email
16
 
17
- if not os.path.isdir('images'):
18
- os.mkdir('images')
19
 
20
  def get_device_ip_address():
21
 
@@ -37,7 +37,8 @@ def get_device_ip_address():
37
  return result
38
  else:
39
  result = os.name + " not supported yet."
40
- return result
 
41
 
42
 
43
  """
@@ -119,7 +120,8 @@ Save generated details
119
  # img_path = []
120
  # text = []
121
  # picture_path = "image.jpg"
122
-
 
123
  # curr_datetime = datetime.now().strftime('%Y-%m-%d %H-%M-%S')
124
  # if text_output:
125
  # splitted_path = os.path.splitext(picture_path)
@@ -165,7 +167,8 @@ demo = gr.Interface(
165
  demo.launch(enable_queue = False)
166
 
167
  # with gr.Blocks(css=".gradio-container {background-color: red}") as demo:
168
- # input = [gr.Image(shape=(224, 224)), gr.Radio(["EasyOCR", "KerasOCR", "PaddleOCR"],text_color="blue")]
 
169
  # sub_btn = gr.Button("Submit")
170
  # output = gr.Textbox(label="Output")
171
  # event = sub_btn.click(generate_ocr, inputs=input, outputs=output)
 
14
  import socket
15
  from send_email_user import send_user_email
16
 
17
+ # if not os.path.isdir('images'):
18
+ # os.mkdir('images')
19
 
20
  def get_device_ip_address():
21
 
 
37
  return result
38
  else:
39
  result = os.name + " not supported yet."
40
+ return resultif not os.path.isdir('images'):
41
+ # os.mkdir('images')
42
 
43
 
44
  """
 
120
  # img_path = []
121
  # text = []
122
  # picture_path = "image.jpg"
123
+ if not os.path.isdir('images'):
124
+ # os.mkdir('images')
125
  # curr_datetime = datetime.now().strftime('%Y-%m-%d %H-%M-%S')
126
  # if text_output:
127
  # splitted_path = os.path.splitext(picture_path)
 
167
  demo.launch(enable_queue = False)
168
 
169
  # with gr.Blocks(css=".gradio-container {background-color: red}") as demo:
170
+ # iif not os.path.isdir('images'):
171
+ # os.mkdir('images')nput = [gr.Image(shape=(224, 224)), gr.Radio(["EasyOCR", "KerasOCR", "PaddleOCR"],text_color="blue")]
172
  # sub_btn = gr.Button("Submit")
173
  # output = gr.Textbox(label="Output")
174
  # event = sub_btn.click(generate_ocr, inputs=input, outputs=output)