Update app.py
Browse files
app.py
CHANGED
|
@@ -24,8 +24,11 @@ def get_all_spaces():
|
|
| 24 |
if not spaces:
|
| 25 |
return "No Spaces found."
|
| 26 |
|
| 27 |
-
# Formatting Spaces into a grid
|
| 28 |
-
space_info = [
|
|
|
|
|
|
|
|
|
|
| 29 |
return "\n\n".join(space_info)
|
| 30 |
|
| 31 |
# Creating the Gradio interface
|
|
|
|
| 24 |
if not spaces:
|
| 25 |
return "No Spaces found."
|
| 26 |
|
| 27 |
+
# Formatting Spaces into a grid, handling missing keys with .get()
|
| 28 |
+
space_info = [
|
| 29 |
+
f"Name: {space.get('name', 'N/A')}\nSDK: {space.get('sdk', 'N/A')}\nStatus: {space.get('status', 'N/A')}"
|
| 30 |
+
for space in spaces
|
| 31 |
+
]
|
| 32 |
return "\n\n".join(space_info)
|
| 33 |
|
| 34 |
# Creating the Gradio interface
|