Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,6 @@ def preload_models():
|
|
| 39 |
dummy_context = "Este es un contexto de prueba."
|
| 40 |
dummy_question = "驴Cu谩l es el prop贸sito de este contexto?"
|
| 41 |
|
| 42 |
-
# Run each model with a dummy input to initialize them
|
| 43 |
inputs = confli_tokenizer_spanish(dummy_question, dummy_context, return_tensors='tf')
|
| 44 |
_ = confli_model_spanish_qa(inputs)
|
| 45 |
|
|
@@ -207,26 +206,12 @@ css_styles = """
|
|
| 207 |
text-align: center;
|
| 208 |
font-size: 1.5em;
|
| 209 |
}
|
| 210 |
-
.description
|
| 211 |
-
color:
|
| 212 |
display: block;
|
| 213 |
font-size: 1em;
|
| 214 |
text-align: center;
|
| 215 |
}
|
| 216 |
-
.description-dark {
|
| 217 |
-
color: white;
|
| 218 |
-
display: none;
|
| 219 |
-
font-size: 1em;
|
| 220 |
-
text-align: center;
|
| 221 |
-
}
|
| 222 |
-
@media (prefers-color-scheme: dark) {
|
| 223 |
-
.description-light {
|
| 224 |
-
display: none;
|
| 225 |
-
}
|
| 226 |
-
.description-dark {
|
| 227 |
-
display: block;
|
| 228 |
-
}
|
| 229 |
-
}
|
| 230 |
.footer {
|
| 231 |
text-align: center;
|
| 232 |
margin-top: 10px;
|
|
@@ -253,10 +238,7 @@ demo = gr.Interface(
|
|
| 253 |
],
|
| 254 |
outputs=gr.HTML(label="Salida"),
|
| 255 |
title="<a href='https://eventdata.utdallas.edu/conflibert/' target='_blank'>ConfliBERT-Spanish-QA</a>",
|
| 256 |
-
description=""
|
| 257 |
-
<span class="description-light">Compare respuestas entre los modelos ConfliBERT, BETO, ConfliBERT SQAC, Beto SQAC, GPT-2 Small Spanish y BLOOM-1.7B para preguntas en espa帽ol.</span>
|
| 258 |
-
<span class="description-dark">Compare respuestas entre los modelos ConfliBERT, BETO, ConfliBERT SQAC, Beto SQAC, GPT-2 Small Spanish y BLOOM-1.7B para preguntas en espa帽ol.</span>
|
| 259 |
-
""",
|
| 260 |
css=css_styles,
|
| 261 |
allow_flagging="never",
|
| 262 |
# Footer HTML with centered, green links
|
|
|
|
| 39 |
dummy_context = "Este es un contexto de prueba."
|
| 40 |
dummy_question = "驴Cu谩l es el prop贸sito de este contexto?"
|
| 41 |
|
|
|
|
| 42 |
inputs = confli_tokenizer_spanish(dummy_question, dummy_context, return_tensors='tf')
|
| 43 |
_ = confli_model_spanish_qa(inputs)
|
| 44 |
|
|
|
|
| 206 |
text-align: center;
|
| 207 |
font-size: 1.5em;
|
| 208 |
}
|
| 209 |
+
.description {
|
| 210 |
+
color: inherit;
|
| 211 |
display: block;
|
| 212 |
font-size: 1em;
|
| 213 |
text-align: center;
|
| 214 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
.footer {
|
| 216 |
text-align: center;
|
| 217 |
margin-top: 10px;
|
|
|
|
| 238 |
],
|
| 239 |
outputs=gr.HTML(label="Salida"),
|
| 240 |
title="<a href='https://eventdata.utdallas.edu/conflibert/' target='_blank'>ConfliBERT-Spanish-QA</a>",
|
| 241 |
+
description="<span class='description'>Compare respuestas entre los modelos ConfliBERT, BETO, ConfliBERT SQAC, Beto SQAC, GPT-2 Small Spanish y BLOOM-1.7B para preguntas en espa帽ol.</span>",
|
|
|
|
|
|
|
|
|
|
| 242 |
css=css_styles,
|
| 243 |
allow_flagging="never",
|
| 244 |
# Footer HTML with centered, green links
|