Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -126,12 +126,15 @@ def take_screenshot(url):
|
|
126 |
finally:
|
127 |
if wd:
|
128 |
wd.quit()
|
129 |
-
|
|
|
130 |
def create_ui():
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
135 |
|
136 |
css = """
|
137 |
footer {visibility: hidden;}
|
@@ -164,4 +167,18 @@ def create_ui():
|
|
164 |
outputs=[info_output, app_py_content, screenshot_output]
|
165 |
)
|
166 |
|
167 |
-
return demo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
finally:
|
127 |
if wd:
|
128 |
wd.quit()
|
129 |
+
|
130 |
+
|
131 |
def create_ui():
|
132 |
+
try:
|
133 |
+
spaces_list = get_most_liked_spaces()
|
134 |
+
print(f"Type of spaces_list: {type(spaces_list)}")
|
135 |
+
formatted_spaces = format_spaces(spaces_list)
|
136 |
+
print(f"Total spaces loaded: {len(formatted_spaces)}")
|
137 |
+
|
138 |
|
139 |
css = """
|
140 |
footer {visibility: hidden;}
|
|
|
167 |
outputs=[info_output, app_py_content, screenshot_output]
|
168 |
)
|
169 |
|
170 |
+
return demo
|
171 |
+
|
172 |
+
|
173 |
+
except Exception as e:
|
174 |
+
print(f"Error in create_ui: {str(e)}")
|
175 |
+
print(traceback.format_exc())
|
176 |
+
raise
|
177 |
+
|
178 |
+
if __name__ == "__main__":
|
179 |
+
try:
|
180 |
+
demo = create_ui()
|
181 |
+
demo.launch()
|
182 |
+
except Exception as e:
|
183 |
+
print(f"Error in main: {str(e)}")
|
184 |
+
print(traceback.format_exc())
|