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() |