Update app.py
Browse files
app.py
CHANGED
@@ -5,20 +5,19 @@ model_checkpoint = "MuntasirHossain/RoBERTa-base-finetuned-emotion"
|
|
5 |
|
6 |
model = pipeline("text-classification", model=model_checkpoint)
|
7 |
|
8 |
-
|
9 |
def classify(text):
|
10 |
label = model(text)[0]["label"]
|
11 |
return label
|
12 |
|
13 |
-
description = "This AI model is trained to classify texts expressing human emotion into six categories: sadness, joy, love, anger, fear, and surprise."
|
14 |
title = "Classify Texts Expressing Emotion"
|
15 |
-
examples=[["This is such a beautiful place"]]
|
16 |
|
17 |
gr.Interface(fn=classify,
|
18 |
inputs="textbox",
|
19 |
outputs="text",
|
20 |
title=title,
|
21 |
-
|
22 |
description=description,
|
23 |
examples=examples,
|
24 |
-
).launch()
|
|
|
5 |
|
6 |
model = pipeline("text-classification", model=model_checkpoint)
|
7 |
|
|
|
8 |
def classify(text):
|
9 |
label = model(text)[0]["label"]
|
10 |
return label
|
11 |
|
12 |
+
description = "This AI model is trained to classify texts expressing human emotion into six categories: sadness, joy, love, anger, fear, and surprise."
|
13 |
title = "Classify Texts Expressing Emotion"
|
14 |
+
examples = [["This is such a beautiful place"]]
|
15 |
|
16 |
gr.Interface(fn=classify,
|
17 |
inputs="textbox",
|
18 |
outputs="text",
|
19 |
title=title,
|
20 |
+
theme="dark",
|
21 |
description=description,
|
22 |
examples=examples,
|
23 |
+
).launch()
|