garrettbaber commited on
Commit
8ee74ad
1 Parent(s): 2e0ac74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import gradio as gr
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
 
4
- def processInput(name):
5
  #model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
6
- #tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
7
- #inputs = tokenizer(data, return_tensors="pt")
8
  #outputs = model(**inputs)
9
- return 'hello' + name
10
 
11
  app = gr.Interface(fn=processInput, inputs="text", outputs="text")
12
 
 
1
  import gradio as gr
2
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
 
4
+ def processInput(input):
5
  #model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
6
+ tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
7
+ tokens = tokenizer(input, return_tensors="pt")
8
  #outputs = model(**inputs)
9
+ return 'hello' + tokens
10
 
11
  app = gr.Interface(fn=processInput, inputs="text", outputs="text")
12