matiss's picture
Add application file
52a4bf1
raw
history blame
339 Bytes
import gradio as gr
from transformers import pipeline
model_path="matiss/Latvian-Twitter-Sentiment-Analysis"
sentiment_task = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
def classify(text):
return sentiment_task(text)
demo = gr.Interface(fn=classify, inputs="text", outputs="text")
demo.launch()