Marmoot's picture
Update app.py
329d2d4
raw history blame
No virus
467 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("text-classification", model="hackathon-pln-es/electricidad-base-generator-fake-news")
def predict(text):
return pipe(text)[0]["text-classification_text"]
title = "Detección de FakeNews en Español"
iface = gr.Interface(
fn=predict,
inputs=[gr.inputs.Textbox(label="text", lines=3)],
outputs='text',
title=title,
examples=[["España desaparece"]]
)
iface.launch(debug=True)