Spaces:
Runtime error
Runtime error
update
Browse files
main.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
| 5 |
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
-
pipe_ocr = pipeline("
|
| 9 |
|
| 10 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 11 |
|
|
@@ -16,4 +16,4 @@ def index() -> FileResponse:
|
|
| 16 |
@app.get("/ocr")
|
| 17 |
def ocr(input):
|
| 18 |
result = pipe_ocr(input)
|
| 19 |
-
print(
|
|
|
|
| 5 |
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
+
pipe_ocr = pipeline("text0recognition", model="naver-clova-ocr/bros-base-uncased")
|
| 9 |
|
| 10 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 11 |
|
|
|
|
| 16 |
@app.get("/ocr")
|
| 17 |
def ocr(input):
|
| 18 |
result = pipe_ocr(input)
|
| 19 |
+
print(result)
|