Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
31 |
-
|
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 |
|