Spaces:
Running
Running
JustHuggingFaces
commited on
Commit
•
2c7a90e
1
Parent(s):
0500fd7
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import soundfile as sf
|
|
4 |
from txtai.pipeline import TextToSpeech
|
5 |
|
6 |
# Load the text classification model pipeline, filter out the spam and leave the ham
|
7 |
-
classifier = pipeline("text-classification", model='JustHuggingFaces/OptimalSpamDetect'
|
8 |
to_speech = TextToSpeech("NeuML/ljspeech-jets-onnx")
|
9 |
# Streamlit application title
|
10 |
st.title("Reading Ham")
|
@@ -21,7 +21,9 @@ if st.button("Classify"):
|
|
21 |
if result['label'] == spam:
|
22 |
#st.write("Text:", text)
|
23 |
st.write("Spam!")
|
|
|
24 |
else:
|
25 |
st.write("Ham!")
|
|
|
26 |
speech = to_speech(text)
|
27 |
st.audio(speech, sample_rate=16000)
|
|
|
4 |
from txtai.pipeline import TextToSpeech
|
5 |
|
6 |
# Load the text classification model pipeline, filter out the spam and leave the ham
|
7 |
+
classifier = pipeline("text-classification", model='JustHuggingFaces/OptimalSpamDetect')
|
8 |
to_speech = TextToSpeech("NeuML/ljspeech-jets-onnx")
|
9 |
# Streamlit application title
|
10 |
st.title("Reading Ham")
|
|
|
21 |
if result['label'] == spam:
|
22 |
#st.write("Text:", text)
|
23 |
st.write("Spam!")
|
24 |
+
#st.write("Label: ", result['label'])
|
25 |
else:
|
26 |
st.write("Ham!")
|
27 |
+
#st.write("Label: ", result['label'])
|
28 |
speech = to_speech(text)
|
29 |
st.audio(speech, sample_rate=16000)
|