lalital's picture
Create app.py
81d462a verified
raw
history blame
408 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("text-classification",
model="airesearch/wangchanbart-large",
tokenizer="airesearch/wangchanbart-large"
revision="finetuned@wisesight_sentiment"
)
def predict(text):
return pipe(text)
demo = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
)
demo.launch()