DrishtiSharma
commited on
Commit
•
826ab06
1
Parent(s):
08ca6e7
Update app.py
Browse files
app.py
CHANGED
@@ -31,14 +31,14 @@ def speech_to_text(input_file):
|
|
31 |
|
32 |
|
33 |
#Defining a function for Harassment detection (text classification)
|
34 |
-
def
|
35 |
harassment_detection = classifier(transcribed_text)[0]["label"]
|
36 |
return harassment_detection
|
37 |
|
38 |
#Defining a function which outputs audio transcription and the output of harassment detection module
|
39 |
def asr_and_harassment_detection(input_file):
|
40 |
transcribed_text = speech_to_text(input_file)
|
41 |
-
harassment_detection =
|
42 |
return harassment_detection
|
43 |
|
44 |
|
|
|
31 |
|
32 |
|
33 |
#Defining a function for Harassment detection (text classification)
|
34 |
+
def harassment_detector(transcribed_text):
|
35 |
harassment_detection = classifier(transcribed_text)[0]["label"]
|
36 |
return harassment_detection
|
37 |
|
38 |
#Defining a function which outputs audio transcription and the output of harassment detection module
|
39 |
def asr_and_harassment_detection(input_file):
|
40 |
transcribed_text = speech_to_text(input_file)
|
41 |
+
harassment_detection = harassment_detector(transcribed_text)
|
42 |
return harassment_detection
|
43 |
|
44 |
|