Update app.py
Browse files
app.py
CHANGED
@@ -613,7 +613,53 @@ def create_ui() -> gr.Blocks:
|
|
613 |
pass
|
614 |
|
615 |
with gr.Tabs() as tabs:
|
616 |
-
# ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
with gr.TabItem("π Smart Search", id="input_tab"):
|
618 |
gr.Markdown("### π Intelligent Repository Discovery")
|
619 |
gr.Markdown("π‘ **Enter repository IDs (owner/repo) or keywords - I'll automatically detect which type and process accordingly!**")
|
@@ -636,7 +682,7 @@ def create_ui() -> gr.Blocks:
|
|
636 |
|
637 |
status_box_input = gr.Textbox(label="π Status", interactive=False, lines=2)
|
638 |
|
639 |
-
# --- Analysis Tab ---
|
640 |
with gr.TabItem("π¬ Analysis & Results", id="analysis_tab"):
|
641 |
gr.Markdown("### π§ͺ Repository Analysis Results")
|
642 |
|
@@ -710,53 +756,7 @@ def create_ui() -> gr.Blocks:
|
|
710 |
label="π Repository Quick Links"
|
711 |
)
|
712 |
|
713 |
-
# ---
|
714 |
-
with gr.TabItem("π€ AI Assistant", id="chatbot_tab"):
|
715 |
-
gr.Markdown("### π¬ Intelligent Repository Discovery Assistant")
|
716 |
-
gr.Markdown("π― **Tell me what you're building, and I'll automatically find the best repositories for you!**")
|
717 |
-
|
718 |
-
chatbot = gr.Chatbot(
|
719 |
-
label="π€ AI Assistant",
|
720 |
-
height=500,
|
721 |
-
type="messages",
|
722 |
-
avatar_images=(
|
723 |
-
"https://cdn-icons-png.flaticon.com/512/149/149071.png",
|
724 |
-
"https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.png"
|
725 |
-
),
|
726 |
-
show_copy_button=True
|
727 |
-
)
|
728 |
-
|
729 |
-
with gr.Row():
|
730 |
-
msg_input = gr.Textbox(
|
731 |
-
label="π Your Message",
|
732 |
-
placeholder="Tell me about your project...",
|
733 |
-
lines=1,
|
734 |
-
scale=5,
|
735 |
-
info="Describe what you're building and I'll find the perfect repositories"
|
736 |
-
)
|
737 |
-
send_btn = gr.Button("π€", variant="primary", scale=1)
|
738 |
-
|
739 |
-
with gr.Row():
|
740 |
-
extract_analyze_btn = gr.Button("π― Extract Keywords & Analyze Now", variant="secondary", size="lg")
|
741 |
-
|
742 |
-
# Status and extracted info (auto-updated, no manual buttons needed)
|
743 |
-
with gr.Row():
|
744 |
-
with gr.Column():
|
745 |
-
chat_status = gr.Textbox(
|
746 |
-
label="π― Chat Status",
|
747 |
-
interactive=False,
|
748 |
-
lines=2,
|
749 |
-
info="Conversation progress and auto-actions"
|
750 |
-
)
|
751 |
-
with gr.Column():
|
752 |
-
extracted_keywords_output = gr.Textbox(
|
753 |
-
label="π·οΈ Auto-Extracted Keywords",
|
754 |
-
interactive=False,
|
755 |
-
show_copy_button=True,
|
756 |
-
info="Keywords automatically extracted and used for search"
|
757 |
-
)
|
758 |
-
|
759 |
-
# --- Repo Explorer Tab ---
|
760 |
with gr.TabItem("π Repo Explorer", id="repo_explorer_tab"):
|
761 |
repo_components, repo_states = create_repo_explorer_tab()
|
762 |
|
|
|
613 |
pass
|
614 |
|
615 |
with gr.Tabs() as tabs:
|
616 |
+
# --- AI Assistant Tab (moved to first) ---
|
617 |
+
with gr.TabItem("π€ AI Assistant", id="chatbot_tab"):
|
618 |
+
gr.Markdown("### π¬ Intelligent Repository Discovery Assistant")
|
619 |
+
gr.Markdown("π― **Tell me what you're building, and I'll automatically find the best repositories for you!**")
|
620 |
+
|
621 |
+
chatbot = gr.Chatbot(
|
622 |
+
label="π€ AI Assistant",
|
623 |
+
height=500,
|
624 |
+
type="messages",
|
625 |
+
avatar_images=(
|
626 |
+
"https://cdn-icons-png.flaticon.com/512/149/149071.png",
|
627 |
+
"https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.png"
|
628 |
+
),
|
629 |
+
show_copy_button=True
|
630 |
+
)
|
631 |
+
|
632 |
+
with gr.Row():
|
633 |
+
msg_input = gr.Textbox(
|
634 |
+
label="π Your Message",
|
635 |
+
placeholder="Tell me about your project...",
|
636 |
+
lines=1,
|
637 |
+
scale=5,
|
638 |
+
info="Describe what you're building and I'll find the perfect repositories"
|
639 |
+
)
|
640 |
+
send_btn = gr.Button("π€", variant="primary", scale=1)
|
641 |
+
|
642 |
+
with gr.Row():
|
643 |
+
extract_analyze_btn = gr.Button("π― Extract Keywords & Analyze Now", variant="secondary", size="lg")
|
644 |
+
|
645 |
+
# Status and extracted info (auto-updated, no manual buttons needed)
|
646 |
+
with gr.Row():
|
647 |
+
with gr.Column():
|
648 |
+
chat_status = gr.Textbox(
|
649 |
+
label="π― Chat Status",
|
650 |
+
interactive=False,
|
651 |
+
lines=2,
|
652 |
+
info="Conversation progress and auto-actions"
|
653 |
+
)
|
654 |
+
with gr.Column():
|
655 |
+
extracted_keywords_output = gr.Textbox(
|
656 |
+
label="π·οΈ Auto-Extracted Keywords",
|
657 |
+
interactive=False,
|
658 |
+
show_copy_button=True,
|
659 |
+
info="Keywords automatically extracted and used for search"
|
660 |
+
)
|
661 |
+
|
662 |
+
# --- Smart Search Tab (moved to second) ---
|
663 |
with gr.TabItem("π Smart Search", id="input_tab"):
|
664 |
gr.Markdown("### π Intelligent Repository Discovery")
|
665 |
gr.Markdown("π‘ **Enter repository IDs (owner/repo) or keywords - I'll automatically detect which type and process accordingly!**")
|
|
|
682 |
|
683 |
status_box_input = gr.Textbox(label="π Status", interactive=False, lines=2)
|
684 |
|
685 |
+
# --- Analysis & Results Tab (moved to third) ---
|
686 |
with gr.TabItem("π¬ Analysis & Results", id="analysis_tab"):
|
687 |
gr.Markdown("### π§ͺ Repository Analysis Results")
|
688 |
|
|
|
756 |
label="π Repository Quick Links"
|
757 |
)
|
758 |
|
759 |
+
# --- Repo Explorer Tab (moved to fourth) ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
with gr.TabItem("π Repo Explorer", id="repo_explorer_tab"):
|
761 |
repo_components, repo_states = create_repo_explorer_tab()
|
762 |
|