khizon commited on
Commit
ce7bbb7
1 Parent(s): 9af1f5a

use my own model

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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 = 'm3hrdadfi/wav2vec2-xlsr-greek-speech-emotion-recognition'
 
40
  config = AutoConfig.from_pretrained(model_name_or_path)
41
- processor = Wav2Vec2Processor.from_pretrained(model_name_or_path)
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