Sergey Mikhno
commited on
Commit
·
b3ab4bb
1
Parent(s):
9cf899b
args
Browse files- app/app.py +1 -1
app/app.py
CHANGED
|
@@ -67,7 +67,7 @@ def doc_layout():
|
|
| 67 |
x, y, x1, y1 = r["coords"]
|
| 68 |
x, y, x1, y1 = int(x), int(y), int(x1), int(y1)
|
| 69 |
block = pimg[y:y1, x:x1]
|
| 70 |
-
result = doctr_model(block)
|
| 71 |
blocks["block" + str(i)] = result[0]["words"].tolist()
|
| 72 |
|
| 73 |
return json.dumps(blocks)
|
|
|
|
| 67 |
x, y, x1, y1 = r["coords"]
|
| 68 |
x, y, x1, y1 = int(x), int(y), int(x1), int(y1)
|
| 69 |
block = pimg[y:y1, x:x1]
|
| 70 |
+
result = doctr_model([block])
|
| 71 |
blocks["block" + str(i)] = result[0]["words"].tolist()
|
| 72 |
|
| 73 |
return json.dumps(blocks)
|