Spaces:
Sleeping
Sleeping
Remove redundant chat verification buttons
Browse files
src/interface/simplified_gradio_app.py
CHANGED
|
@@ -301,17 +301,9 @@ def create_simplified_interface():
|
|
| 301 |
with gr.Row():
|
| 302 |
download_json_btn = gr.DownloadButton("📥 Download JSON", scale=1, size="sm")
|
| 303 |
download_csv_btn = gr.DownloadButton("📊 Download CSV", scale=1, size="sm")
|
| 304 |
-
|
| 305 |
-
#
|
| 306 |
-
|
| 307 |
-
verify_conversation_btn = gr.Button("🔍 Verify Conversation", variant="secondary", scale=2, size="sm")
|
| 308 |
-
download_verification_json_btn = gr.DownloadButton(
|
| 309 |
-
"⬇️ Download Verification JSON",
|
| 310 |
-
scale=1,
|
| 311 |
-
size="sm"
|
| 312 |
-
)
|
| 313 |
-
|
| 314 |
-
verification_status = gr.HTML(value="", visible=False)
|
| 315 |
|
| 316 |
# Quick examples
|
| 317 |
gr.Markdown("### ⚡ Quick Start:")
|
|
@@ -2019,18 +2011,8 @@ To revert, use "Reset to Default" button.
|
|
| 2019 |
inputs=[session_data],
|
| 2020 |
outputs=[download_csv_btn]
|
| 2021 |
)
|
| 2022 |
-
|
| 2023 |
-
# Verification button
|
| 2024 |
-
verify_conversation_btn.click(
|
| 2025 |
-
open_verification_window,
|
| 2026 |
-
inputs=[session_data],
|
| 2027 |
-
outputs=[verification_status]
|
| 2028 |
-
).then(
|
| 2029 |
-
lambda: gr.HTML(visible=True),
|
| 2030 |
-
outputs=[verification_status]
|
| 2031 |
-
)
|
| 2032 |
|
| 2033 |
-
# Download
|
| 2034 |
def _download_latest_verification_json(session: SimplifiedSessionData):
|
| 2035 |
"""Return the most recently exported verification session JSON path (if present)."""
|
| 2036 |
# open_verification_window exports into ./verification_sessions
|
|
@@ -2047,12 +2029,8 @@ To revert, use "Reset to Default" button.
|
|
| 2047 |
reverse=True,
|
| 2048 |
)
|
| 2049 |
return candidates[0] if candidates else None
|
|
|
|
| 2050 |
|
| 2051 |
-
download_verification_json_btn.click(
|
| 2052 |
-
_download_latest_verification_json,
|
| 2053 |
-
inputs=[session_data],
|
| 2054 |
-
outputs=[download_verification_json_btn]
|
| 2055 |
-
)
|
| 2056 |
|
| 2057 |
# Embedded conversation verification (tab)
|
| 2058 |
def _render_conv_exchange(records: list, index: int):
|
|
|
|
| 301 |
with gr.Row():
|
| 302 |
download_json_btn = gr.DownloadButton("📥 Download JSON", scale=1, size="sm")
|
| 303 |
download_csv_btn = gr.DownloadButton("📊 Download CSV", scale=1, size="sm")
|
| 304 |
+
|
| 305 |
+
# Conversation verification is available in the dedicated
|
| 306 |
+
# "🧾 Conversation Verification" tab.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
# Quick examples
|
| 309 |
gr.Markdown("### ⚡ Quick Start:")
|
|
|
|
| 2011 |
inputs=[session_data],
|
| 2012 |
outputs=[download_csv_btn]
|
| 2013 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2014 |
|
| 2015 |
+
# Download helper (used by embedded Conversation Verification tab)
|
| 2016 |
def _download_latest_verification_json(session: SimplifiedSessionData):
|
| 2017 |
"""Return the most recently exported verification session JSON path (if present)."""
|
| 2018 |
# open_verification_window exports into ./verification_sessions
|
|
|
|
| 2029 |
reverse=True,
|
| 2030 |
)
|
| 2031 |
return candidates[0] if candidates else None
|
| 2032 |
+
|
| 2033 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2034 |
|
| 2035 |
# Embedded conversation verification (tab)
|
| 2036 |
def _render_conv_exchange(records: list, index: int):
|