Spaces:
Runtime error
Runtime error
File size: 495 Bytes
cd5a9e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from transformers import pipeline
pipe = pipeline("text2text-generation", model="hackathon-somos-nlp-2023/bertin-gpt-j-6b-ner-es")
def predict(text):
return pipe(f"text: {text}, entities:")["generated_text"]
iface = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
examples=[["Yo hoy voy a hablar de mujeres en el mundo del arte, porque me ha leΓdo un libro fantΓ‘stico que se llama Historia del arte sin hombres, de Katie Hesel."]]
)
iface.launch()
|