Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,13 +12,13 @@ model_cache = {}
|
|
12 |
def zero_shot_classify(audio_path: str, class_names: str, model_name: str) -> Dict[str, float]:
|
13 |
class_names = class_names.split(",")
|
14 |
tokenizer = get_tokenizer(multilingual=".en" not in model_name)
|
15 |
-
|
16 |
if model_name not in model_cache:
|
17 |
model = whisper.load_model(model_name)
|
18 |
model_cache[model_name] = model
|
19 |
else:
|
20 |
model = model_cache[model_name]
|
21 |
-
|
22 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
23 |
model=model,
|
24 |
class_names=class_names,
|
|
|
12 |
def zero_shot_classify(audio_path: str, class_names: str, model_name: str) -> Dict[str, float]:
|
13 |
class_names = class_names.split(",")
|
14 |
tokenizer = get_tokenizer(multilingual=".en" not in model_name)
|
15 |
+
print("#########", model_name)
|
16 |
if model_name not in model_cache:
|
17 |
model = whisper.load_model(model_name)
|
18 |
model_cache[model_name] = model
|
19 |
else:
|
20 |
model = model_cache[model_name]
|
21 |
+
print("#### Model ####", model)
|
22 |
internal_lm_average_logprobs = classify.calculate_internal_lm_average_logprobs(
|
23 |
model=model,
|
24 |
class_names=class_names,
|