Update repo_explorer.py
Browse files- repo_explorer.py +3 -3
repo_explorer.py
CHANGED
@@ -293,10 +293,10 @@ Answer the user's question based on your comprehensive knowledge of this reposit
|
|
293 |
return history
|
294 |
|
295 |
def get_huggingface_url(repo_id: str) -> str:
|
296 |
-
"""Generate the Hugging Face URL for a repository."""
|
297 |
if not repo_id.strip():
|
298 |
return ""
|
299 |
-
return f"https://huggingface.co/{repo_id}"
|
300 |
|
301 |
def handle_load_repository_with_vectorization(repo_id: str) -> Tuple[str, str, gr.Button]:
|
302 |
"""Load repository and create both context summary and vector embeddings."""
|
@@ -379,7 +379,7 @@ def setup_repo_explorer_events(components: Dict[str, gr.components.Component], s
|
|
379 |
fn=None,
|
380 |
inputs=[states["current_repo_id"]],
|
381 |
outputs=[],
|
382 |
-
js="(repo_id) => { if(repo_id) window.open('https://huggingface.co/' + repo_id, '_blank'); }"
|
383 |
)
|
384 |
|
385 |
# Chat message submission events
|
|
|
293 |
return history
|
294 |
|
295 |
def get_huggingface_url(repo_id: str) -> str:
|
296 |
+
"""Generate the Hugging Face Spaces URL for a repository."""
|
297 |
if not repo_id.strip():
|
298 |
return ""
|
299 |
+
return f"https://huggingface.co/spaces/{repo_id}"
|
300 |
|
301 |
def handle_load_repository_with_vectorization(repo_id: str) -> Tuple[str, str, gr.Button]:
|
302 |
"""Load repository and create both context summary and vector embeddings."""
|
|
|
379 |
fn=None,
|
380 |
inputs=[states["current_repo_id"]],
|
381 |
outputs=[],
|
382 |
+
js="(repo_id) => { if(repo_id) window.open('https://huggingface.co/spaces/' + repo_id, '_blank'); }"
|
383 |
)
|
384 |
|
385 |
# Chat message submission events
|