Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -25,9 +25,12 @@ async def ocr(
|
|
25 |
image: UploadFile = File(...),
|
26 |
languages: list = Body(["eng"])
|
27 |
):
|
|
|
|
|
28 |
try:
|
29 |
print("[where?] inside try block")
|
30 |
content = await image.read()
|
|
|
31 |
print("[content]",content)
|
32 |
image = Image.open(BytesIO(content))
|
33 |
print("[image]",image)
|
|
|
25 |
image: UploadFile = File(...),
|
26 |
languages: list = Body(["eng"])
|
27 |
):
|
28 |
+
print("[where?] outside try block")
|
29 |
+
print("[image]", image)
|
30 |
try:
|
31 |
print("[where?] inside try block")
|
32 |
content = await image.read()
|
33 |
+
# image = Image.open(file.file)
|
34 |
print("[content]",content)
|
35 |
image = Image.open(BytesIO(content))
|
36 |
print("[image]",image)
|