AlekseyKorshuk's picture
Update app.py
3d3e0b2
raw
history blame
No virus
322 Bytes
import gradio as gr
from transformers import pipeline
import os
token = os.environ.get("HF_TOKEN")
pipe = pipeline("text-classification", model="herzlicemi/37a0-5klk-3rla-0", token=token)
def predict(text):
return str(pipe(text))
demo = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
)
demo.launch()