thushalya commited on
Commit
957c702
1 Parent(s): 7e2f91a

Add round for percentages

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -414,7 +414,7 @@ def greet(tweet):
414
  label = "Hate"
415
 
416
 
417
- return label,str(prediction_value)+"%",str(1-prediction_value)+"%",simple,personality_values
418
 
419
  # demo = gr.Interface(fn=greet, inputs="text", outputs="text")
420
  demo = gr.Interface(theme= gr.themes.Soft(),
 
414
  label = "Hate"
415
 
416
 
417
+ return label,str(round(prediction_value,2))+"%",str(round(1-prediction_value,2))+"%",simple,personality_values
418
 
419
  # demo = gr.Interface(fn=greet, inputs="text", outputs="text")
420
  demo = gr.Interface(theme= gr.themes.Soft(),