File size: 525 Bytes
17831ec
38d7836
17831ec
2e0ac74
ed5f602
 
 
 
2e0ac74
38d7836
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
from transformers import AutoModelForSequenceClassification, AutoTokenizer

def processInput(name): 
    #model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
    #tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
    #inputs = tokenizer(data, return_tensors="pt")
    #outputs = model(**inputs)
    return 'hello' + name

app = gr.Interface(fn=processInput, inputs="text", outputs="text")

app.launch()