Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ file.close()
|
|
12 |
def is_racism(sentence):
|
13 |
s = sentence_model.encode(sentence, show_progress_bar=True)
|
14 |
pred = model_gradio.predict([s])
|
15 |
-
if pred == 1: return '
|
16 |
-
else: return '
|
17 |
|
18 |
input = gradio.Textbox(label = "Input a Sentence")
|
19 |
app = gradio.Interface(fn = is_racism, inputs=[input], outputs="label")
|
|
|
12 |
def is_racism(sentence):
|
13 |
s = sentence_model.encode(sentence, show_progress_bar=True)
|
14 |
pred = model_gradio.predict([s])
|
15 |
+
if pred == 1: return 'Racist'
|
16 |
+
else: return 'Unracist'
|
17 |
|
18 |
input = gradio.Textbox(label = "Input a Sentence")
|
19 |
app = gradio.Interface(fn = is_racism, inputs=[input], outputs="label")
|