Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -86,14 +86,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety):
|
|
86 |
class_names = classify_anxiety.split(",")
|
87 |
# tokenizer = get_tokenizer(multilingual=".en" not in model_name)
|
88 |
tokenizer= WhisperTokenizer.from_pretrained("openai/whisper-large")
|
89 |
-
model = "large"
|
90 |
-
|
91 |
-
if model_name not in model_cache:
|
92 |
-
model = whisper.load_model(model_name)
|
93 |
-
model_cache[model_name] = model
|
94 |
-
else:
|
95 |
-
# model = model_cache[model_name]
|
96 |
-
class_names = classify_anxiety.split(",")
|
97 |
|
98 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
99 |
model=model,
|
|
|
86 |
class_names = classify_anxiety.split(",")
|
87 |
# tokenizer = get_tokenizer(multilingual=".en" not in model_name)
|
88 |
tokenizer= WhisperTokenizer.from_pretrained("openai/whisper-large")
|
89 |
+
model = "whisper-large"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
92 |
model=model,
|