awacke1 commited on
Commit
34210b1
·
verified ·
1 Parent(s): cf0448c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,8 +28,8 @@ default_users = {
28
  async def fetch_user_content(username):
29
  try:
30
  # Fetch models and datasets - the stars of our show! 🌟
31
- models = await asyncio.to_thread(api.list_models, author=username)
32
- datasets = await asyncio.to_thread(api.list_datasets, author=username)
33
 
34
  return {
35
  "username": username,
 
28
  async def fetch_user_content(username):
29
  try:
30
  # Fetch models and datasets - the stars of our show! 🌟
31
+ models = list(await asyncio.to_thread(api.list_models, author=username)) # Convert generator to list
32
+ datasets = list(await asyncio.to_thread(api.list_datasets, author=username)) # Convert generator to list
33
 
34
  return {
35
  "username": username,