File size: 303 Bytes
85cbf6c
 
 
 
 
 
 
 
 
 
ae895b5
1
2
3
4
5
6
7
8
9
10
11
12

import gradio as gr
from transformers import pipeline

def sentiment_fn(sentences):
    model = pipeline("sentiment-analysis", model="panyqueso/my-cool-model")
    return model(sentences)

demo = gr.Interface(fn=sentiment_fn, inputs="textbox", outputs="textbox")

demo.launch(share=True, debug=True)