Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,10 @@ def use(input_text):
|
|
31 |
prediction = model.predict(sequences)[0]
|
32 |
|
33 |
# Print the prediction
|
34 |
-
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
iface = gr.Interface(fn=use, inputs="text", outputs="text")
|
|
|
31 |
prediction = model.predict(sequences)[0]
|
32 |
|
33 |
# Print the prediction
|
34 |
+
if prediction[0]<0.5:
|
35 |
+
return "That's mean! (" + str(round(1-prediction[0],2)*100) + "% confidence)"
|
36 |
+
if prediction[0]>0.5:
|
37 |
+
return "That's nice! (" + str(round(prediction[0],2)*100) + "% confidence)"
|
38 |
|
39 |
|
40 |
iface = gr.Interface(fn=use, inputs="text", outputs="text")
|