Spaces:
Sleeping
Sleeping
Commit
•
1ea52be
1
Parent(s):
b673159
Update api.py
Browse files
api.py
CHANGED
@@ -29,6 +29,7 @@ async def getCoordinates(image: UploadFile = File(...)):
|
|
29 |
image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
|
30 |
path_to_image = "save.jpg"
|
31 |
image.save(path_to_image)
|
32 |
-
|
|
|
33 |
os.remove(path_to_image)
|
34 |
return result
|
|
|
29 |
image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
|
30 |
path_to_image = "save.jpg"
|
31 |
image.save(path_to_image)
|
32 |
+
ocr_api_func = ofa_ocr_gr()
|
33 |
+
result = ocr_api_func(path_to_image)[2]
|
34 |
os.remove(path_to_image)
|
35 |
return result
|