openfree commited on
Commit
86994a7
β€’
1 Parent(s): 8c9d551

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
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
- user_spaces = spaces_data
 
 
 
 
 
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"""