sotirios-slv commited on
Commit
0175b94
1 Parent(s): 738d1ca

Removed some debugging print statements

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -35,11 +35,6 @@ def get_named_entities(ocr_text: str):
35
 
36
 
37
  def run(image, lang="eng"):
38
- print("Image ", image)
39
- try:
40
- print("Image name ", image.name)
41
- except Exception as e:
42
- print(f"Could not print image filename: {e}")
43
  result = pytesseract.image_to_string(image, lang=None if lang == [] else lang)
44
 
45
  ner = get_named_entities(result)
@@ -82,11 +77,6 @@ with gr.Blocks() as demo:
82
  with gr.Row():
83
  download_btn = gr.Button("Download output")
84
 
85
- try:
86
- print("Image name ", image_in.name)
87
- except Exception as e:
88
- print(f"Could not print image filename: {e}")
89
-
90
  btn.click(fn=run, inputs=[image_in, lang], outputs=[ocr_text, ner])
91
  download_btn.click(
92
  fn=download_output,
 
35
 
36
 
37
  def run(image, lang="eng"):
 
 
 
 
 
38
  result = pytesseract.image_to_string(image, lang=None if lang == [] else lang)
39
 
40
  ner = get_named_entities(result)
 
77
  with gr.Row():
78
  download_btn = gr.Button("Download output")
79
 
 
 
 
 
 
80
  btn.click(fn=run, inputs=[image_in, lang], outputs=[ocr_text, ner])
81
  download_btn.click(
82
  fn=download_output,