Update app.py
Browse files
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,
|