gngpostalsrvc commited on
Commit
b51aacd
·
1 Parent(s): 0de7571

updated application file

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,14 +1,16 @@
1
  # -*- coding: utf-8 -*-
2
 
3
- !pip install https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl
4
-
5
  import crepe
6
  import spacy
7
  import librosa
 
8
  import gradio as gr
9
  import pandas as pd
10
  from transformers import pipeline, RobertaTokenizerFast, TFRobertaForSequenceClassification
11
 
 
 
12
  asr = pipeline('automatic-speech-recognition', model='facebook/wav2vec2-large-960h-lv60-self')
13
  tokenizer = RobertaTokenizerFast.from_pretrained("arpanghoshal/EmoRoBERTa")
14
  model = TFRobertaForSequenceClassification.from_pretrained("arpanghoshal/EmoRoBERTa")
 
1
  # -*- coding: utf-8 -*-
2
 
3
+ import sys
 
4
  import crepe
5
  import spacy
6
  import librosa
7
+ import subprocess
8
  import gradio as gr
9
  import pandas as pd
10
  from transformers import pipeline, RobertaTokenizerFast, TFRobertaForSequenceClassification
11
 
12
+ subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl'])
13
+
14
  asr = pipeline('automatic-speech-recognition', model='facebook/wav2vec2-large-960h-lv60-self')
15
  tokenizer = RobertaTokenizerFast.from_pretrained("arpanghoshal/EmoRoBERTa")
16
  model = TFRobertaForSequenceClassification.from_pretrained("arpanghoshal/EmoRoBERTa")