Bittar commited on
Commit
a19509f
1 Parent(s): aaa9850

requirements

Browse files
Files changed (2) hide show
  1. app.py +3 -4
  2. requirements.txt +3 -0
app.py CHANGED
@@ -2,14 +2,13 @@ import gradio as gr
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
  import torch
4
 
5
- model_name = "rafaelcarvalhoj/emotion-classifier"
6
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
 
9
  mapping = {
10
- 0: 'anger',
11
- 1: 'joy',
12
- 2: 'fear'
13
  }
14
 
15
  def predict(text):
 
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
  import torch
4
 
5
+ model_name = "Bittar/NLP_Emotions"
6
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
 
9
  mapping = {
10
+ 0: 'negative',
11
+ 1: 'positive'
 
12
  }
13
 
14
  def predict(text):
requirements.txt CHANGED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ transformers
3
+ torch