naman1102 commited on
Commit
2cbfda6
·
1 Parent(s): c641c76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,6 +14,7 @@ from analyzer import (
14
  analyze_combined_file,
15
  handle_load_repository
16
  )
 
17
  from hf_utils import download_filtered_space_files, search_top_spaces
18
  from chatbot_page import chat_with_user, extract_keywords_from_conversation
19
  from repo_explorer import create_repo_explorer_tab, setup_repo_explorer_events, initialize_repo_chatbot
@@ -1523,9 +1524,9 @@ def create_ui() -> gr.Blocks:
1523
  }"""
1524
  ).then(
1525
  # Auto-load the repository if the signal indicates to do so
1526
- fn=lambda repo_id, signal: handle_load_repository(repo_id) if signal == "auto_load" and repo_id else ("", ""),
1527
  inputs=[repo_states["current_repo_id"], status_box_input],
1528
- outputs=[repo_components["repo_status_display"], repo_states["repo_context_summary"]]
1529
  ).then(
1530
  # Initialize the chatbot with welcome message after auto-loading
1531
  fn=lambda repo_status, repo_id, repo_context, signal: (
 
14
  analyze_combined_file,
15
  handle_load_repository
16
  )
17
+ from repo_explorer import handle_load_repository_with_vectorization
18
  from hf_utils import download_filtered_space_files, search_top_spaces
19
  from chatbot_page import chat_with_user, extract_keywords_from_conversation
20
  from repo_explorer import create_repo_explorer_tab, setup_repo_explorer_events, initialize_repo_chatbot
 
1524
  }"""
1525
  ).then(
1526
  # Auto-load the repository if the signal indicates to do so
1527
+ fn=lambda repo_id, signal: handle_load_repository_with_vectorization(repo_id) if signal == "auto_load" and repo_id else ("", "", gr.update(value="", visible=False)),
1528
  inputs=[repo_states["current_repo_id"], status_box_input],
1529
+ outputs=[repo_components["repo_status_display"], repo_states["repo_context_summary"], repo_components["visit_hf_link"]]
1530
  ).then(
1531
  # Initialize the chatbot with welcome message after auto-loading
1532
  fn=lambda repo_status, repo_id, repo_context, signal: (