charliebaby2023 commited on
Commit
4a26907
·
verified ·
1 Parent(s): b8ebaf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,8 +25,10 @@ api = HfApi()
25
  user_info = whoami(token=HF_TOKEN)
26
  username = user_info["name"]
27
  # Get all models owned by the user
28
- models = api.list_models(author=username, token=HF_TOKEN)
 
29
  model_ids = [m.modelId for m in models]
 
30
  if not model_ids:
31
  raise ValueError(f"No models found for user '{username}'")
32
  # --- Step 3: Build Gradio UI
 
25
  user_info = whoami(token=HF_TOKEN)
26
  username = user_info["name"]
27
  # Get all models owned by the user
28
+ #models = api.list_models(author=username, token=HF_TOKEN)
29
+ models = list(api.list_models(author=username, token=HF_TOKEN))
30
  model_ids = [m.modelId for m in models]
31
+
32
  if not model_ids:
33
  raise ValueError(f"No models found for user '{username}'")
34
  # --- Step 3: Build Gradio UI