Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ from docquery.document import load_document, ImageDocument
|
|
| 13 |
from docquery.ocr_reader import get_ocr_reader
|
| 14 |
|
| 15 |
|
|
|
|
| 16 |
def ensure_list(x):
|
| 17 |
if isinstance(x, list):
|
| 18 |
return x
|
|
@@ -30,6 +31,7 @@ CHECKPOINTS = {
|
|
| 30 |
PIPELINES = {}
|
| 31 |
|
| 32 |
|
|
|
|
| 33 |
def construct_pipeline(task, model):
|
| 34 |
global PIPELINES
|
| 35 |
if model in PIPELINES:
|
|
|
|
| 13 |
from docquery.ocr_reader import get_ocr_reader
|
| 14 |
|
| 15 |
|
| 16 |
+
|
| 17 |
def ensure_list(x):
|
| 18 |
if isinstance(x, list):
|
| 19 |
return x
|
|
|
|
| 31 |
PIPELINES = {}
|
| 32 |
|
| 33 |
|
| 34 |
+
|
| 35 |
def construct_pipeline(task, model):
|
| 36 |
global PIPELINES
|
| 37 |
if model in PIPELINES:
|