Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def spam_detection(message):
|
|
| 16 |
prediction = model.predict(padded_sequence)[0, 0]
|
| 17 |
|
| 18 |
# Return the result
|
| 19 |
-
return "Spam" if prediction >= 0.
|
| 20 |
|
| 21 |
# Gradio Interface
|
| 22 |
ui = gr.Interface(
|
|
@@ -24,7 +24,6 @@ ui = gr.Interface(
|
|
| 24 |
inputs=gr.Textbox(label="Enter a message:",info='Check spam or not spam msg',lines=5),
|
| 25 |
outputs="text",
|
| 26 |
live=True,
|
| 27 |
-
theme="huggingface",
|
| 28 |
title='π« Spam Message Detection π΅οΈββοΈ',
|
| 29 |
description="""
|
| 30 |
Welcome to the Spam Message Detection appβa powerful demo designed for learning purposes. π This application employs advanced machine learning techniques to identify and flag spam messages with remarkable accuracy. π€ With a training set accuracy of 99.89% and a validation/test set accuracy of 98.39%, the model has been fine-tuned using a comprehensive dataset.
|
|
@@ -41,6 +40,7 @@ ui = gr.Interface(
|
|
| 41 |
3. Receive instant feedback on whether the input message is classified as spam or not.
|
| 42 |
|
| 43 |
**π Note: **
|
|
|
|
| 44 |
This app is a demonstration and educational tool. It showcases the effectiveness of machine learning in identifying spam messages. Enjoy exploring the world of spam detection with our highly accurate model! π"""
|
| 45 |
)
|
| 46 |
# Launch the app
|
|
|
|
| 16 |
prediction = model.predict(padded_sequence)[0, 0]
|
| 17 |
|
| 18 |
# Return the result
|
| 19 |
+
return "Spam" if prediction >= 0.4 else "Not Spam"
|
| 20 |
|
| 21 |
# Gradio Interface
|
| 22 |
ui = gr.Interface(
|
|
|
|
| 24 |
inputs=gr.Textbox(label="Enter a message:",info='Check spam or not spam msg',lines=5),
|
| 25 |
outputs="text",
|
| 26 |
live=True,
|
|
|
|
| 27 |
title='π« Spam Message Detection π΅οΈββοΈ',
|
| 28 |
description="""
|
| 29 |
Welcome to the Spam Message Detection appβa powerful demo designed for learning purposes. π This application employs advanced machine learning techniques to identify and flag spam messages with remarkable accuracy. π€ With a training set accuracy of 99.89% and a validation/test set accuracy of 98.39%, the model has been fine-tuned using a comprehensive dataset.
|
|
|
|
| 40 |
3. Receive instant feedback on whether the input message is classified as spam or not.
|
| 41 |
|
| 42 |
**π Note: **
|
| 43 |
+
|
| 44 |
This app is a demonstration and educational tool. It showcases the effectiveness of machine learning in identifying spam messages. Enjoy exploring the world of spam detection with our highly accurate model! π"""
|
| 45 |
)
|
| 46 |
# Launch the app
|