naman1102 commited on
Commit
b60c631
·
1 Parent(s): 93d47b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -14
app.py CHANGED
@@ -1036,19 +1036,12 @@ def create_ui() -> gr.Blocks:
1036
  return gr.update(visible=False), hf_url
1037
  return gr.update(visible=False), ""
1038
 
1039
- def handle_explore_repo(repo_id: str) -> Tuple[Any, Any, Any]:
1040
- """Handle navigating to the repo explorer and populating the ID."""
1041
- if repo_id and repo_id.strip():
1042
- logger.info(f"User chose to explore: {repo_id.strip()}")
1043
- return (
1044
- gr.update(visible=False), # close modal
1045
- gr.update(selected="repo_explorer_tab"), # switch tab
1046
- gr.update(value=repo_id.strip()) # update input field
1047
- )
1048
  return (
1049
- gr.update(visible=False),
1050
- gr.update(),
1051
- gr.update()
1052
  )
1053
 
1054
  def handle_cancel_modal() -> Any:
@@ -1199,8 +1192,7 @@ def create_ui() -> gr.Blocks:
1199
  inputs=[selected_repo_display],
1200
  outputs=[
1201
  repo_action_modal,
1202
- tabs,
1203
- repo_components["repo_explorer_input"]
1204
  ],
1205
  js="() => { setTimeout(() => { window.scrollTo({top: 0, behavior: 'smooth'}); window.dispatchEvent(new Event('repoExplorerNavigation')); }, 150); }"
1206
  )
 
1036
  return gr.update(visible=False), hf_url
1037
  return gr.update(visible=False), ""
1038
 
1039
+ def handle_explore_repo(repo_id: str) -> Tuple[Any, Any]:
1040
+ """Handle navigating to the repo explorer - simple version."""
1041
+ logger.info(f"Switching to repo explorer tab")
 
 
 
 
 
 
1042
  return (
1043
+ gr.update(visible=False), # close modal
1044
+ gr.update(selected="repo_explorer_tab") # switch tab
 
1045
  )
1046
 
1047
  def handle_cancel_modal() -> Any:
 
1192
  inputs=[selected_repo_display],
1193
  outputs=[
1194
  repo_action_modal,
1195
+ tabs
 
1196
  ],
1197
  js="() => { setTimeout(() => { window.scrollTo({top: 0, behavior: 'smooth'}); window.dispatchEvent(new Event('repoExplorerNavigation')); }, 150); }"
1198
  )