Wauplin HF staff commited on
Commit
f8a22a4
1 Parent(s): 2b21b92

remove debugging

Browse files
Files changed (1) hide show
  1. user_history.py +2 -4
user_history.py CHANGED
@@ -26,7 +26,7 @@ def render() -> None:
26
 
27
  # initialize with default config
28
  if not user_history.initialized:
29
- print("Initializing user history with default config. Use `user_history.setup(...)` to customize.")
30
  setup()
31
 
32
  # Render user history tab
@@ -286,8 +286,6 @@ def _admin_section() -> None:
286
 
287
  def _display_if_admin() -> Callable:
288
  def _inner(profile: gr.OAuthProfile | None) -> str:
289
- print(_admin_content())
290
-
291
  if profile is None:
292
  return ""
293
  if profile["preferred_username"] in _fetch_admins():
@@ -390,5 +388,5 @@ def _fetch_admins() -> List[str]:
390
  namespace = space_id.split("/")[0]
391
  response = requests.get(f"https://huggingface.co/api/organizations/{namespace}/members")
392
  if response.status_code == 200:
393
- return sorted(member["user"] for member in response.json())
394
  return [namespace]
 
26
 
27
  # initialize with default config
28
  if not user_history.initialized:
29
+ print("Initializing user history with default config. Use `user_history.setup(...)` to customize folder_path.")
30
  setup()
31
 
32
  # Render user history tab
 
286
 
287
  def _display_if_admin() -> Callable:
288
  def _inner(profile: gr.OAuthProfile | None) -> str:
 
 
289
  if profile is None:
290
  return ""
291
  if profile["preferred_username"] in _fetch_admins():
 
388
  namespace = space_id.split("/")[0]
389
  response = requests.get(f"https://huggingface.co/api/organizations/{namespace}/members")
390
  if response.status_code == 200:
391
+ return sorted((member["user"] for member in response.json()), key=lambda x: x.lower())
392
  return [namespace]