Spaces:
Paused
Paused
formatting
Browse files
app.py
CHANGED
@@ -251,7 +251,10 @@ def request_payload(query, language, exact_search, num_results=10):
|
|
251 |
return payload
|
252 |
|
253 |
|
254 |
-
|
|
|
|
|
|
|
255 |
The ROOTS corpus was developed during the [BigScience workshop](https://bigscience.huggingface.co/) for the purpose
|
256 |
of training the Multilingual Large Language Model [BLOOM](https://huggingface.co/bigscience/bloom). This tool allows
|
257 |
you to search through the ROOTS corpus. We serve a BM25 index for each language or group of languages included in
|
@@ -272,6 +275,8 @@ if __name__ == "__main__":
|
|
272 |
exact_search_state = gr.State(False)
|
273 |
lang_state = gr.State("")
|
274 |
|
|
|
|
|
275 |
with gr.Row():
|
276 |
gr.Markdown(value=description)
|
277 |
with gr.Row():
|
@@ -282,29 +287,30 @@ if __name__ == "__main__":
|
|
282 |
label="Query",
|
283 |
)
|
284 |
with gr.Row():
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
|
|
308 |
with gr.Row():
|
309 |
submit_btn = gr.Button("Submit")
|
310 |
with gr.Row(visible=False) as datasets_filter:
|
|
|
251 |
return payload
|
252 |
|
253 |
|
254 |
+
title = (
|
255 |
+
"""<p style="text-align: center; font-size:28px"> πΈ π ROOTS search tool π πΈ </p>"""
|
256 |
+
)
|
257 |
+
description = """
|
258 |
The ROOTS corpus was developed during the [BigScience workshop](https://bigscience.huggingface.co/) for the purpose
|
259 |
of training the Multilingual Large Language Model [BLOOM](https://huggingface.co/bigscience/bloom). This tool allows
|
260 |
you to search through the ROOTS corpus. We serve a BM25 index for each language or group of languages included in
|
|
|
275 |
exact_search_state = gr.State(False)
|
276 |
lang_state = gr.State("")
|
277 |
|
278 |
+
with gr.Row():
|
279 |
+
gr.Markdown(value=title)
|
280 |
with gr.Row():
|
281 |
gr.Markdown(value=description)
|
282 |
with gr.Row():
|
|
|
287 |
label="Query",
|
288 |
)
|
289 |
with gr.Row():
|
290 |
+
with gr.Column():
|
291 |
+
lang = gr.Dropdown(
|
292 |
+
choices=[
|
293 |
+
"ar",
|
294 |
+
"ca",
|
295 |
+
"code",
|
296 |
+
"en",
|
297 |
+
"es",
|
298 |
+
"eu",
|
299 |
+
"fr",
|
300 |
+
"id",
|
301 |
+
"indic",
|
302 |
+
"nigercongo",
|
303 |
+
"pt",
|
304 |
+
"vi",
|
305 |
+
"zh",
|
306 |
+
"detect_language",
|
307 |
+
"all",
|
308 |
+
],
|
309 |
+
value="en",
|
310 |
+
label="Language",
|
311 |
+
)
|
312 |
+
with gr.Column(scale=4):
|
313 |
+
k = gr.Slider(1, 100, value=10, step=1, label="Max Results")
|
314 |
with gr.Row():
|
315 |
submit_btn = gr.Button("Submit")
|
316 |
with gr.Row(visible=False) as datasets_filter:
|