Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -230,7 +230,7 @@ def create_app(db_path: str = DB_PATH) -> FastAPI:
|
|
| 230 |
"total_drawers": len(drawer_list),
|
| 231 |
"examples": EXAMPLE_QUERIES,
|
| 232 |
"query": "",
|
| 233 |
-
"mode": "
|
| 234 |
"limit": 10,
|
| 235 |
"old_ocr_label": OLD_OCR_LABEL,
|
| 236 |
"new_ocr_label": NEW_OCR_LABEL,
|
|
@@ -241,7 +241,7 @@ def create_app(db_path: str = DB_PATH) -> FastAPI:
|
|
| 241 |
async def search(
|
| 242 |
request: Request,
|
| 243 |
query: str = "",
|
| 244 |
-
mode: str = "
|
| 245 |
limit: int = 5,
|
| 246 |
):
|
| 247 |
limit = max(1, min(20, limit))
|
|
@@ -296,7 +296,7 @@ def create_app(db_path: str = DB_PATH) -> FastAPI:
|
|
| 296 |
async def search_single(
|
| 297 |
request: Request,
|
| 298 |
query: str = "",
|
| 299 |
-
mode: str = "
|
| 300 |
limit: int = 10,
|
| 301 |
):
|
| 302 |
limit = max(1, min(20, limit))
|
|
|
|
| 230 |
"total_drawers": len(drawer_list),
|
| 231 |
"examples": EXAMPLE_QUERIES,
|
| 232 |
"query": "",
|
| 233 |
+
"mode": "fts",
|
| 234 |
"limit": 10,
|
| 235 |
"old_ocr_label": OLD_OCR_LABEL,
|
| 236 |
"new_ocr_label": NEW_OCR_LABEL,
|
|
|
|
| 241 |
async def search(
|
| 242 |
request: Request,
|
| 243 |
query: str = "",
|
| 244 |
+
mode: str = "fts",
|
| 245 |
limit: int = 5,
|
| 246 |
):
|
| 247 |
limit = max(1, min(20, limit))
|
|
|
|
| 296 |
async def search_single(
|
| 297 |
request: Request,
|
| 298 |
query: str = "",
|
| 299 |
+
mode: str = "fts",
|
| 300 |
limit: int = 10,
|
| 301 |
):
|
| 302 |
limit = max(1, min(20, limit))
|