fix: improve Download UI bump:minor (#352)

* fix: rerank test ui

* fix: improve download all UI
This commit is contained in:
Tuan Anh Nguyen Dang (Tadashi_Cin) 2024-10-01 12:03:19 +07:00 committed by GitHub
parent 53530e296f
commit 7ac8f0329a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 13 deletions

View File

@ -187,6 +187,20 @@ class FileIndexPage(BasePage):
)
with gr.Row():
self.is_zipped_state = gr.State(value=False)
self.download_single_button = gr.DownloadButton(
"Download file",
visible=False,
)
with gr.Row() as self.selection_info:
self.selected_file_id = gr.State(value=None)
with gr.Column(scale=2):
self.selected_panel = gr.Markdown(self.selected_panel_false)
self.chunks = gr.HTML(visible=False)
with gr.Accordion("Advance Options", open=False):
with gr.Row():
self.download_all_button = gr.DownloadButton(
"Download all files",
@ -204,18 +218,6 @@ class FileIndexPage(BasePage):
"Cancel", visible=False
)
self.download_single_button = gr.DownloadButton(
"Download file",
visible=False,
)
with gr.Row() as self.selection_info:
self.selected_file_id = gr.State(value=None)
with gr.Column(scale=2):
self.selected_panel = gr.Markdown(self.selected_panel_false)
self.chunks = gr.HTML(visible=False)
def on_subscribe_public_events(self):
"""Subscribe to the declared public event of the app"""
if self._app.f_user_management:

View File

@ -7,6 +7,8 @@ from ktem.app import BasePage
from ktem.utils.file import YAMLNoDateSafeLoader
from theflow.utils.modules import deserialize
from kotaemon.base import Document
from .manager import reranking_models_manager
@ -348,7 +350,7 @@ class RerankingManagement(BasePage):
log_content += "- Sending a message ([`Hello`], `Hi`)<br>"
yield log_content
_ = rerank(["Hello"], "Hi")
_ = rerank([Document(content="Hello")], "Hi")
log_content += (
"<mark style='background: green; color: white'>- Connection success. "