taimoor61 commited on
Commit
f7c8f6a
·
1 Parent(s): b4838df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- gr.Interface(fn=fn, theme="dark",).launch()
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()