christinacdl commited on
Commit
6988a7c
1 Parent(s): 6c9a6d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ def text_classification(text):
7
  result= classifier(text)
8
  label = result[0]['label']
9
  score = result[0]['score']
10
- formatted_output = f"The label is {label} with the probability {score*100:.2f}%"
11
  return formatted_output
12
 
13
  examples=["Your Old Passport Will Be Replaced With Smart E-passport, Here Is Everything You Need To Know", "17 Things That Are Too Real For People Who Always Drop Their Phone"]
@@ -15,7 +15,7 @@ examples=["Your Old Passport Will Be Replaced With Smart E-passport, Here Is Eve
15
  gradio_app = gr.Interface(fn=text_classification,
16
  inputs= gr.Textbox(lines=2, label="Text", placeholder="Enter text here..."),
17
  outputs=gr.Textbox(lines=2, label="Text Classification Result"),
18
- title="Is it clickbait?",
19
  description="Enter a text to check if it is clickbait or not!",
20
  examples=examples)
21
 
 
7
  result= classifier(text)
8
  label = result[0]['label']
9
  score = result[0]['score']
10
+ formatted_output = f"The text is {label}. I am {score*100:.2f}% sure!"
11
  return formatted_output
12
 
13
  examples=["Your Old Passport Will Be Replaced With Smart E-passport, Here Is Everything You Need To Know", "17 Things That Are Too Real For People Who Always Drop Their Phone"]
 
15
  gradio_app = gr.Interface(fn=text_classification,
16
  inputs= gr.Textbox(lines=2, label="Text", placeholder="Enter text here..."),
17
  outputs=gr.Textbox(lines=2, label="Text Classification Result"),
18
+ title="Is It Clickbait?",
19
  description="Enter a text to check if it is clickbait or not!",
20
  examples=examples)
21