Spaces:
Runtime error
Runtime error
jonatasgrosman
commited on
Commit
•
3eaeb0a
1
Parent(s):
6cb3e95
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,9 @@ def run(input_file, language, decoding_type, history, model_size="300M"):
|
|
55 |
|
56 |
logger.info(f"Running ASR {language}-{model_size}-{decoding_type} for {input_file}")
|
57 |
|
58 |
-
history = history or []
|
|
|
|
|
59 |
|
60 |
if model_size == "300M":
|
61 |
model = LARGE_MODEL_BY_LANGUAGE.get(language, None)
|
@@ -88,8 +90,8 @@ def run(input_file, language, decoding_type, history, model_size="300M"):
|
|
88 |
feature_extractor=processor.feature_extractor, decoder=None)
|
89 |
|
90 |
transcription = asr(input_file.name, chunk_length_s=5, stride_length_s=1)["text"]
|
91 |
-
|
92 |
-
logger.info(f"Transcription for {input_file}: {transcription}")
|
93 |
|
94 |
history.append({
|
95 |
"model_id": model["model_id"],
|
55 |
|
56 |
logger.info(f"Running ASR {language}-{model_size}-{decoding_type} for {input_file}")
|
57 |
|
58 |
+
# history = history or []
|
59 |
+
# the history seems to be not by session anymore, so I'll deactivate this for now
|
60 |
+
history = []
|
61 |
|
62 |
if model_size == "300M":
|
63 |
model = LARGE_MODEL_BY_LANGUAGE.get(language, None)
|
90 |
feature_extractor=processor.feature_extractor, decoder=None)
|
91 |
|
92 |
transcription = asr(input_file.name, chunk_length_s=5, stride_length_s=1)["text"]
|
93 |
+
|
94 |
+
logger.info(f"Transcription for {language}-{model_size}-{decoding_type} for {input_file}: {transcription}")
|
95 |
|
96 |
history.append({
|
97 |
"model_id": model["model_id"],
|