garrettbaber
commited on
Commit
•
8ee74ad
1
Parent(s):
2e0ac74
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
3 |
|
4 |
-
def processInput(
|
5 |
#model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
|
6 |
-
|
7 |
-
|
8 |
#outputs = model(**inputs)
|
9 |
-
return 'hello' +
|
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 |
|