Spaces:
Paused
Paused
apple muncy
commited on
Commit
·
ddb7ff9
1
Parent(s):
20c3a9f
adding button
Browse filesSigned-off-by: apple muncy <apple@llama-3.local>
app.py
CHANGED
|
@@ -528,12 +528,33 @@ def create_gradio_app():
|
|
| 528 |
return demo
|
| 529 |
#create dashboard interface
|
| 530 |
def create_dash_app():
|
| 531 |
-
"""Create
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 532 |
with gr.Blocks(title="HF Tagging Bot", theme=gr.themes.Soft()) as demo:
|
| 533 |
gr.Markdown("# 🏷️ HF Tagging Bot Dashboard")
|
| 534 |
gr.Markdown("*Tools found*")
|
| 535 |
-
|
| 536 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
return demo
|
| 538 |
|
| 539 |
|
|
|
|
| 528 |
return demo
|
| 529 |
#create dashboard interface
|
| 530 |
def create_dash_app():
|
| 531 |
+
"""Create Dashboard interface"""
|
| 532 |
+
def update_tools():
|
| 533 |
+
"""load tools"""
|
| 534 |
+
global g_tools
|
| 535 |
+
return g_tools
|
| 536 |
+
|
| 537 |
with gr.Blocks(title="HF Tagging Bot", theme=gr.themes.Soft()) as demo:
|
| 538 |
gr.Markdown("# 🏷️ HF Tagging Bot Dashboard")
|
| 539 |
gr.Markdown("*Tools found*")
|
| 540 |
+
sim_btn = gr.Button("🏷️ Test Tag Detection")
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
with gr.Column():
|
| 544 |
+
dash_result = gr.Textbox(label="Result", lines=8)
|
| 545 |
+
|
| 546 |
+
with gr.Column():
|
| 547 |
+
dash_repo = gr.Textbox(
|
| 548 |
+
label="Tools",
|
| 549 |
+
value="none",
|
| 550 |
+
placeholder="tool-name",
|
| 551 |
+
)
|
| 552 |
+
|
| 553 |
+
dash_btn.click(
|
| 554 |
+
fn=update_tools
|
| 555 |
+
inputs=[],
|
| 556 |
+
outputs=dash_result,
|
| 557 |
+
)
|
| 558 |
return demo
|
| 559 |
|
| 560 |
|