merve HF staff commited on
Commit
eaa1840
1 Parent(s): 1480e7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -8,7 +8,6 @@ import openai
8
  import ast
9
  import os
10
  from deta import Deta
11
- import cv2
12
 
13
 
14
  openai.api_key = os.getenv('API_KEY')
@@ -27,13 +26,8 @@ def preprocess_img(inp_image):
27
  return gray_img
28
 
29
 
30
- def get_text(image):
31
- processed_image = preprocess_img(inp_image=image)
32
- result = reader.readtext(processed_image,
33
- detail=0,
34
- paragraph=True
35
- )
36
-
37
  return " ".join(result)
38
 
39
 
 
8
  import ast
9
  import os
10
  from deta import Deta
 
11
 
12
 
13
  openai.api_key = os.getenv('API_KEY')
 
26
  return gray_img
27
 
28
 
29
+ def get_text(input_img):
30
+ result = reader.readtext(input_img, detail=0)
 
 
 
 
 
31
  return " ".join(result)
32
 
33