DrishtiSharma
commited on
Commit
•
74d759e
1
Parent(s):
42a1433
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ asr = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-xl
|
|
20 |
|
21 |
def predict_and_ctc_lm_decode(input_file):
|
22 |
speech = load_and_fix_data(input_file, sampling_rate)
|
23 |
-
transcribed_text = asr(speech, chunk_length_s=
|
24 |
pipe2 = pipeline("text-classification", model = "hackathon-pln-es/twitter_sexismo-finetuned-robertuito-exist2021")
|
25 |
sexism_detection = pipe2(transcribed_text)[0]['label']
|
26 |
|
|
|
20 |
|
21 |
def predict_and_ctc_lm_decode(input_file):
|
22 |
speech = load_and_fix_data(input_file, sampling_rate)
|
23 |
+
transcribed_text = asr(speech, chunk_length_s=10, stride_length_s=1)["text"]
|
24 |
pipe2 = pipeline("text-classification", model = "hackathon-pln-es/twitter_sexismo-finetuned-robertuito-exist2021")
|
25 |
sexism_detection = pipe2(transcribed_text)[0]['label']
|
26 |
|