Spaces:
Runtime error
Runtime error
use my own model
Browse files
app.py
CHANGED
@@ -36,9 +36,10 @@ def demo_predict(df_row):
|
|
36 |
|
37 |
def cache_model():
|
38 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
39 |
-
model_name_or_path = '
|
|
|
40 |
config = AutoConfig.from_pretrained(model_name_or_path)
|
41 |
-
processor = Wav2Vec2Processor.from_pretrained(
|
42 |
model = Wav2Vec2ForSpeechClassification.from_pretrained(model_name_or_path).to(device)
|
43 |
return config, processor, model, device
|
44 |
|
|
|
36 |
|
37 |
def cache_model():
|
38 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
39 |
+
model_name_or_path = 'khizon/greek-speech-emotion-classifier-demo'
|
40 |
+
generic_greek_model = 'lighteternal/wav2vec2-large-xlsr-53-greek'
|
41 |
config = AutoConfig.from_pretrained(model_name_or_path)
|
42 |
+
processor = Wav2Vec2Processor.from_pretrained(generic_greek_model)
|
43 |
model = Wav2Vec2ForSpeechClassification.from_pretrained(model_name_or_path).to(device)
|
44 |
return config, processor, model, device
|
45 |
|