Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,13 @@ from detoxify import Detoxify
|
|
4 |
# each model takes in either a string or a list of strings
|
5 |
|
6 |
def greet(text):
|
7 |
-
|
|
|
8 |
|
9 |
-
return
|
|
|
|
|
|
|
10 |
|
11 |
-
iface = gr.Interface(fn=greet, inputs="Enter Text to Classify", outputs="
|
12 |
iface.launch(show_api='true')
|
|
|
4 |
# each model takes in either a string or a list of strings
|
5 |
|
6 |
def greet(text):
|
7 |
+
original = Detoxify('original').predict(text)
|
8 |
+
unbiased = Detoxify('unbiased').predict(text)
|
9 |
|
10 |
+
return {
|
11 |
+
'original':original,
|
12 |
+
'unbiased':unbiased
|
13 |
+
}
|
14 |
|
15 |
+
iface = gr.Interface(fn=greet, inputs="Enter Text to Classify", outputs="Classification",api_name='classify')
|
16 |
iface.launch(show_api='true')
|