mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
hotfix (#254)
This commit is contained in:
@@ -7,6 +7,7 @@ services:
|
|||||||
- 1250:1250
|
- 1250:1250
|
||||||
environment:
|
environment:
|
||||||
LLM_URL: "${LLM_URL}"
|
LLM_URL: "${LLM_URL}"
|
||||||
|
MIN_TRANSCRIPT_LENGTH: "${MIN_TRANSCRIPT_LENGTH}"
|
||||||
volumes:
|
volumes:
|
||||||
- model-cache:/root/.cache
|
- model-cache:/root/.cache
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from reflector.llm import LLM, LLMTaskParams
|
from reflector.llm import LLM, LLMTaskParams
|
||||||
from reflector.processors.base import Processor
|
from reflector.processors.base import Processor
|
||||||
from reflector.processors.types import TitleSummary, Transcript
|
from reflector.processors.types import TitleSummary, Transcript
|
||||||
|
from reflector.settings import settings
|
||||||
|
|
||||||
|
|
||||||
class TranscriptTopicDetectorProcessor(Processor):
|
class TranscriptTopicDetectorProcessor(Processor):
|
||||||
@@ -12,7 +13,9 @@ class TranscriptTopicDetectorProcessor(Processor):
|
|||||||
OUTPUT_TYPE = TitleSummary
|
OUTPUT_TYPE = TitleSummary
|
||||||
TASK = "topic"
|
TASK = "topic"
|
||||||
|
|
||||||
def __init__(self, min_transcript_length: int = 750, **kwargs):
|
def __init__(
|
||||||
|
self, min_transcript_length: int = int(settings.MIN_TRANSCRIPT_LENGTH), **kwargs
|
||||||
|
):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.transcript = None
|
self.transcript = None
|
||||||
self.min_transcript_length = min_transcript_length
|
self.min_transcript_length = min_transcript_length
|
||||||
|
|||||||
@@ -97,5 +97,8 @@ class Settings(BaseSettings):
|
|||||||
# Cache directory for all model storage
|
# Cache directory for all model storage
|
||||||
CACHE_DIR: str = "./data"
|
CACHE_DIR: str = "./data"
|
||||||
|
|
||||||
|
# Min transcript length to generate topic + summary
|
||||||
|
MIN_TRANSCRIPT_LENGTH: int = 1800
|
||||||
|
|
||||||
|
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
|
|||||||
Reference in New Issue
Block a user