Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,17 @@ def format_timestamp(timestamp):
|
|
11 |
return dt.strftime('%Y-%m-%d %H:%M')
|
12 |
return 'N/A'
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
def get_pastel_color(index):
|
15 |
"""Generate unique pastel colors based on index"""
|
16 |
pastel_colors = [
|
@@ -182,7 +193,12 @@ def get_user_spaces():
|
|
182 |
return f"Error: Failed to fetch spaces (Status Code: {response.status_code})"
|
183 |
|
184 |
spaces_data = response.json()
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
if not user_spaces:
|
188 |
return f"""
|
|
|
11 |
return dt.strftime('%Y-%m-%d %H:%M')
|
12 |
return 'N/A'
|
13 |
|
14 |
+
def should_exclude_space(space_name):
|
15 |
+
"""νΉμ μ€νμ΄μ€λ₯Ό μ μΈνλ νν° ν¨μ"""
|
16 |
+
exclude_keywords = [
|
17 |
+
'mixgen3', 'ginid', 'mouse', 'flxtrainlora',
|
18 |
+
'vidslicegpu', 'stickimg', 'ultpixgen', 'SORA',
|
19 |
+
'badassgi', 'newsplus', 'chargen', 'news',
|
20 |
+
'testhtml'
|
21 |
+
]
|
22 |
+
|
23 |
+
return any(keyword.lower() in space_name.lower() for keyword in exclude_keywords)
|
24 |
+
|
25 |
def get_pastel_color(index):
|
26 |
"""Generate unique pastel colors based on index"""
|
27 |
pastel_colors = [
|
|
|
193 |
return f"Error: Failed to fetch spaces (Status Code: {response.status_code})"
|
194 |
|
195 |
spaces_data = response.json()
|
196 |
+
|
197 |
+
# μ μΈν μ€νμ΄μ€ νν°λ§
|
198 |
+
user_spaces = [
|
199 |
+
space for space in spaces_data
|
200 |
+
if not should_exclude_space(space.get('id', '').split('/')[-1])
|
201 |
+
]
|
202 |
|
203 |
if not user_spaces:
|
204 |
return f"""
|