ThirdFourthFifth commited on
Commit
fa64a09
·
verified ·
1 Parent(s): 68c9ca9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ pipe = pipeline(task="text-classification", model="TostAI/nsfw-text-detection-la
6
 
7
  def predict(input_txt):
8
  predictions = pipe(input_txt)
9
- return predictions[0]
10
 
11
  gradio_app = gr.Interface(
12
  predict,
 
6
 
7
  def predict(input_txt):
8
  predictions = pipe(input_txt)
9
+ return {'safe': predictions[0]['score'], 'questionable': predictions[0]['score'], 'unsafe': predictions[0]['score']}
10
 
11
  gradio_app = gr.Interface(
12
  predict,