Spaces:
Runtime error
Runtime error
mariagrandury
commited on
Commit
•
4205958
1
Parent(s):
ccd9641
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
title = "BERTIN, tengo una pregunta"
|
4 |
+
description = "BERTIN large fine-tuned con el corpus SQAC (Spanish Question-Answering Corpus)"
|
5 |
+
examples = [
|
6 |
+
["BERTIN es un conjunto de modelos de NLP tipo RoBERTa entrenados durante el evento JAX/Flax organizado por Hugging Face.", "¿Qué es BERTIN?"],
|
7 |
+
["El corpus SQAC fue creado por un equipo del Barcelona Supercomputing Center y la sigla proviene de Spanish Question-Answering Corpus.", "¿Qué significa SQAC?"]
|
8 |
+
]
|
9 |
+
article = """
|
10 |
+
<p style='text-align: center'>
|
11 |
+
NLP en ES 🤗 | <a href='https://nlp-en-es.org'> nlp-en-es.org </a>
|
12 |
+
</p>
|
13 |
+
"""
|
14 |
+
|
15 |
+
gr.Interface.load(
|
16 |
+
name="huggingface/nlp-en-es/bertin-large-finetuned-sqac",
|
17 |
+
inputs=[gr.inputs.Textbox(label="Contexto"), gr.inputs.Textbox(label="Pregunta")],
|
18 |
+
outputs=gr.outputs.Textbox(label="Respuesta"),
|
19 |
+
title=title,
|
20 |
+
description=description,
|
21 |
+
article=article,
|
22 |
+
examples=examples,
|
23 |
+
theme="huggingface",
|
24 |
+
allow_screenshot=True,
|
25 |
+
allow_flagging=True,
|
26 |
+
flagging_dir="flagged",
|
27 |
+
enable_queue=True
|
28 |
+
).launch()
|