Spaces:
Runtime error
Runtime error
Commit
·
6988a7c
1
Parent(s):
6c9a6d0
Update app.py
Browse files
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
|
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
|
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 |
|