chore: change default concurrency

This commit is contained in:
arkohut 2024-11-06 16:55:22 +08:00
parent f524622728
commit c1ffa007ff
3 changed files with 4 additions and 6 deletions

View File

@ -11,7 +11,6 @@ from pydantic_settings import (
from pydantic import BaseModel, SecretStr
import yaml
from collections import OrderedDict
import io
import typer
@ -19,7 +18,7 @@ class VLMSettings(BaseModel):
modelname: str = "minicpm-v"
endpoint: str = "http://localhost:11434"
token: str = ""
concurrency: int = 1
concurrency: int = 8
# some vlm models do not support webp
force_jpeg: bool = True
# prompt for vlm to extract caption
@ -30,7 +29,7 @@ class OCRSettings(BaseModel):
# will by ignored if use_local is True
endpoint: str = "http://localhost:5555/predict"
token: str = ""
concurrency: int = 1
concurrency: int = 8
use_local: bool = True
force_jpeg: bool = False

View File

@ -14,7 +14,7 @@ default_plugins:
# using ollama as the vlm server
vlm:
concurrency: 1
concurrency: 8
endpoint: http://localhost:11434
force_jpeg: true
modelname: minicpm-v
@ -23,7 +23,7 @@ vlm:
# using local ocr
ocr:
concurrency: 1
concurrency: 8
# this is not used if use_local is true
endpoint: http://localhost:5555/predict
force_jpeg: false

View File

@ -17,7 +17,6 @@ import json
import cv2
from PIL import Image
from secrets import compare_digest
import functools
import logging
from .config import get_database_path, settings