import gradio as gr | |
from transformers import pipeline | |
classifier = pipeline("sentiment-analysis") | |
def sentimental(text): | |
return classifier(text) | |
iface = gr.Interface(fn=sentimental, inputs="text", outputs="text") | |
iface.launch() |
import gradio as gr | |
from transformers import pipeline | |
classifier = pipeline("sentiment-analysis") | |
def sentimental(text): | |
return classifier(text) | |
iface = gr.Interface(fn=sentimental, inputs="text", outputs="text") | |
iface.launch() |