openfree commited on
Commit
0818a07
ยท
verified ยท
1 Parent(s): 338adec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -30,7 +30,7 @@ def generate_dummy_spaces(count):
30
  return spaces
31
 
32
  # Function to fetch Zero-GPU (CPU-based) Spaces from Huggingface with pagination
33
- def fetch_trending_spaces(offset=0, limit=72):
34
  """
35
  hardware=cpu ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ
36
  GPU๊ฐ€ ์—†๋Š”(=CPU ์ „์šฉ) ์ŠคํŽ˜์ด์Šค๋งŒ ํ•„ํ„ฐ๋ง
@@ -214,7 +214,7 @@ def trending_spaces():
214
  """
215
  search_query = request.args.get('search', '').lower()
216
  offset = int(request.args.get('offset', 0))
217
- limit = int(request.args.get('limit', 72)) # Default 72
218
 
219
  # Fetch zero-gpu (cpu) spaces
220
  spaces_data = fetch_trending_spaces(offset, limit)
@@ -1005,7 +1005,7 @@ if __name__ == '__main__':
1005
  isLoading: false,
1006
  spaces: [],
1007
  currentPage: 0,
1008
- itemsPerPage: 72,
1009
  totalItems: 0,
1010
  loadingTimeout: null,
1011
  staticModeAttempted: {},
@@ -1378,8 +1378,6 @@ if __name__ == '__main__':
1378
  // ์™ผ์ชฝ: (์ค‘๋ณต rank ์ œ๊ฑฐ)
1379
  const leftMeta = document.createElement('div');
1380
 
1381
- // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ† rankBadge2 ๋ถ€๋ถ„ ์ œ๊ฑฐ๋จ
1382
-
1383
  const authorSpan = document.createElement('span');
1384
  authorSpan.className = 'author-name';
1385
  authorSpan.style.marginLeft = '8px';
 
30
  return spaces
31
 
32
  # Function to fetch Zero-GPU (CPU-based) Spaces from Huggingface with pagination
33
+ def fetch_trending_spaces(offset=0, limit=24):
34
  """
35
  hardware=cpu ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ
36
  GPU๊ฐ€ ์—†๋Š”(=CPU ์ „์šฉ) ์ŠคํŽ˜์ด์Šค๋งŒ ํ•„ํ„ฐ๋ง
 
214
  """
215
  search_query = request.args.get('search', '').lower()
216
  offset = int(request.args.get('offset', 0))
217
+ limit = int(request.args.get('limit', 24)) # Default changed to 24
218
 
219
  # Fetch zero-gpu (cpu) spaces
220
  spaces_data = fetch_trending_spaces(offset, limit)
 
1005
  isLoading: false,
1006
  spaces: [],
1007
  currentPage: 0,
1008
+ itemsPerPage: 24, // Changed from 72 to 24
1009
  totalItems: 0,
1010
  loadingTimeout: null,
1011
  staticModeAttempted: {},
 
1378
  // ์™ผ์ชฝ: (์ค‘๋ณต rank ์ œ๊ฑฐ)
1379
  const leftMeta = document.createElement('div');
1380
 
 
 
1381
  const authorSpan = document.createElement('span');
1382
  authorSpan.className = 'author-name';
1383
  authorSpan.style.marginLeft = '8px';