Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -301,9 +301,12 @@ list_tags = get_tags()
|
|
| 301 |
|
| 302 |
# --- Interface Gradio ---
|
| 303 |
with gr.Blocks(title="Search articles", css=custom_css) as demo:
|
| 304 |
-
gr.
|
| 305 |
-
|
| 306 |
-
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
with gr.Row():
|
| 309 |
status_btn = gr.Button("Check / restart API", elem_id="mini_btn")
|
|
@@ -354,9 +357,8 @@ with gr.Blocks(title="Search articles", css=custom_css) as demo:
|
|
| 354 |
|
| 355 |
msg.submit(get_answer_with_query, inputs=[msg, use_rerank2, chatbot],
|
| 356 |
outputs=[msg, chatbot, html_details])
|
| 357 |
-
clear.click(lambda: [None, False, None, None],
|
| 358 |
-
[msg, use_rerank2, chatbot, html_details]
|
| 359 |
-
[msg, use_rerank2, chatbot, html_details])
|
| 360 |
|
| 361 |
### Launch the app
|
| 362 |
demo.queue().launch(debug=True)
|
|
|
|
| 301 |
|
| 302 |
# --- Interface Gradio ---
|
| 303 |
with gr.Blocks(title="Search articles", css=custom_css) as demo:
|
| 304 |
+
with gr.Row():
|
| 305 |
+
with gr.Columns():
|
| 306 |
+
gr.Image(value="dataset-cover.jpg", type="filepath")
|
| 307 |
+
with gr.Columns():
|
| 308 |
+
gr.HTML("<h1 style='text-align: center; font-weight: bold;'>190k+ Medium Articles</h1>")
|
| 309 |
+
gr.Markdown("## 🔎 Search in this dataset hosted in Kaggle ([Dataset details]({https://www.kaggle.com/datasets/fabiochiusano/medium-articles}))")
|
| 310 |
|
| 311 |
with gr.Row():
|
| 312 |
status_btn = gr.Button("Check / restart API", elem_id="mini_btn")
|
|
|
|
| 357 |
|
| 358 |
msg.submit(get_answer_with_query, inputs=[msg, use_rerank2, chatbot],
|
| 359 |
outputs=[msg, chatbot, html_details])
|
| 360 |
+
clear.click(lambda: [None, False, None, None], \
|
| 361 |
+
outputs=[msg, use_rerank2, chatbot, html_details])
|
|
|
|
| 362 |
|
| 363 |
### Launch the app
|
| 364 |
demo.queue().launch(debug=True)
|