Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from toxic_detection import ToxicClassifier
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
# Create an instance of the FakeContentClassifier class
|
| 5 |
+
toxic_content_classifier = ToxicClassifier()
|
| 6 |
+
|
| 7 |
+
def Prediction(text):
|
| 8 |
+
return toxic_content_classifier.predict(text)
|
| 9 |
+
|
| 10 |
+
gr.Interface(fn=Prediction,inputs="text",outputs="text",share=True).launch()
|