Spaces:
Runtime error
Runtime error
Commit
Β·
dc7c4f3
1
Parent(s):
68816f5
Removing logs
Browse files
app.py
CHANGED
|
@@ -5,13 +5,11 @@ from PIL import Image
|
|
| 5 |
reader = easyocr.Reader(['en'])
|
| 6 |
|
| 7 |
def inference(img_path, width_ths):
|
| 8 |
-
print("yes")
|
| 9 |
output = reader.readtext(img_path, detail=0, slope_ths=0.7, ycenter_ths=0.9,
|
| 10 |
height_ths=0.8, width_ths=width_ths, add_margin=0.2)
|
| 11 |
-
|
| 12 |
-
print("="*20)
|
| 13 |
output = "\n".join(output)
|
| 14 |
-
|
| 15 |
return output
|
| 16 |
|
| 17 |
title = "Receipt RAG"
|
|
|
|
| 5 |
reader = easyocr.Reader(['en'])
|
| 6 |
|
| 7 |
def inference(img_path, width_ths):
|
|
|
|
| 8 |
output = reader.readtext(img_path, detail=0, slope_ths=0.7, ycenter_ths=0.9,
|
| 9 |
height_ths=0.8, width_ths=width_ths, add_margin=0.2)
|
| 10 |
+
|
|
|
|
| 11 |
output = "\n".join(output)
|
| 12 |
+
|
| 13 |
return output
|
| 14 |
|
| 15 |
title = "Receipt RAG"
|