Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
@@ -12,8 +12,8 @@ hf_token = os.getenv("HateSpeechMujtabatoken")
|
|
12 |
|
13 |
whisper_processor = WhisperProcessor.from_pretrained("openai/whisper-tiny", token=hf_token)
|
14 |
whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny", token=hf_token)
|
15 |
-
text_model = AutoModelForSequenceClassification.from_pretrained("
|
16 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
17 |
|
18 |
def transcribe(audio_path):
|
19 |
waveform, sample_rate = torchaudio.load(audio_path)
|
|
|
12 |
|
13 |
whisper_processor = WhisperProcessor.from_pretrained("openai/whisper-tiny", token=hf_token)
|
14 |
whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny", token=hf_token)
|
15 |
+
text_model = AutoModelForSequenceClassification.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain", token=hf_token)
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain", token=hf_token)
|
17 |
|
18 |
def transcribe(audio_path):
|
19 |
waveform, sample_rate = torchaudio.load(audio_path)
|