SoybeanMilk commited on
Commit
e57c738
1 Parent(s): c27a2cb

Add support for the ALMA model.

Browse files
Files changed (2) hide show
  1. src/config.py +2 -2
  2. src/utils.py +1 -1
src/config.py CHANGED
@@ -43,7 +43,7 @@ class VadInitialPromptMode(Enum):
43
  return None
44
 
45
  class ApplicationConfig:
46
- def __init__(self, models: Dict[Literal["whisper", "m2m100", "nllb", "mt5"], List[ModelConfig]],
47
  input_audio_max_duration: int = 600, share: bool = False, server_name: str = None, server_port: int = 7860,
48
  queue_concurrency_count: int = 1, delete_uploaded_files: bool = True,
49
  whisper_implementation: str = "whisper", default_model_name: str = "medium",
@@ -169,7 +169,7 @@ class ApplicationConfig:
169
  # Load using json5
170
  data = json5.load(f)
171
  data_models = data.pop("models", [])
172
- models: Dict[Literal["whisper", "m2m100", "nllb", "mt5"], List[ModelConfig]] = {
173
  key: [ModelConfig(**item) for item in value]
174
  for key, value in data_models.items()
175
  }
 
43
  return None
44
 
45
  class ApplicationConfig:
46
+ def __init__(self, models: Dict[Literal["whisper", "m2m100", "nllb", "mt5", "ALMA"], List[ModelConfig]],
47
  input_audio_max_duration: int = 600, share: bool = False, server_name: str = None, server_port: int = 7860,
48
  queue_concurrency_count: int = 1, delete_uploaded_files: bool = True,
49
  whisper_implementation: str = "whisper", default_model_name: str = "medium",
 
169
  # Load using json5
170
  data = json5.load(f)
171
  data_models = data.pop("models", [])
172
+ models: Dict[Literal["whisper", "m2m100", "nllb", "mt5", "ALMA"], List[ModelConfig]] = {
173
  key: [ModelConfig(**item) for item in value]
174
  for key, value in data_models.items()
175
  }
src/utils.py CHANGED
@@ -130,7 +130,7 @@ def write_srt_original(transcript: Iterator[dict], file: TextIO,
130
  flush=True,
131
  )
132
 
133
- if original is not None: print(f"{original}",
134
  file=file,
135
  flush=True)
136
 
 
130
  flush=True,
131
  )
132
 
133
+ if original is not None: print(f"{original}\n",
134
  file=file,
135
  flush=True)
136