Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app-backup.py
Browse files- app-backup.py +269 -55
app-backup.py
CHANGED
@@ -195,7 +195,7 @@ def get_space_card(space, index):
|
|
195 |
def get_vercel_deployments():
|
196 |
"""Vercel API๋ฅผ ํตํด ๋ฐฐํฌ๋ ์๋น์ค ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ"""
|
197 |
token = "A8IFZmgW2cqA4yUNlLPnci0N"
|
198 |
-
url = "https://api.vercel.com/v6/deployments"
|
199 |
|
200 |
headers = {
|
201 |
"Authorization": f"Bearer {token}",
|
@@ -223,23 +223,38 @@ def get_vercel_deployments():
|
|
223 |
print(f"Error fetching Vercel deployments: {str(e)}")
|
224 |
return []
|
225 |
|
|
|
226 |
def get_vercel_card(deployment, index):
|
227 |
"""Generate HTML card for a Vercel deployment with like button"""
|
228 |
raw_url = deployment.get('url', '')
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
|
232 |
created = format_timestamp(deployment.get('created'))
|
233 |
name = deployment.get('name', 'Unnamed Project')
|
234 |
state = deployment.get('state', 'N/A')
|
235 |
|
236 |
# ๊ณ ์ ID ์์ฑ (์นด๋ ์๋ณ์ฉ)
|
237 |
-
card_id = f"vercel-card-{
|
|
|
|
|
238 |
|
239 |
bg_color = get_pastel_color(index + 20)
|
240 |
tech_emojis = ['โก', '๐', '๐', 'โจ', '๐ซ', '๐ฅ', '๐', '๐ฏ', '๐จ', '๐ฎ']
|
241 |
random_emojis = random.sample(tech_emojis, 3)
|
242 |
-
|
|
|
243 |
return f"""
|
244 |
<div id="{card_id}" class="vercel-card"
|
245 |
data-likes="0"
|
@@ -254,28 +269,21 @@ def get_vercel_card(deployment, index):
|
|
254 |
overflow: hidden;'
|
255 |
onmouseover='this.style.transform="translateY(-5px) scale(1.02)"; this.style.boxShadow="0 8px 25px rgba(0,0,0,0.15)"'
|
256 |
onmouseout='this.style.transform="translateY(0) scale(1)"; this.style.boxShadow="0 4px 15px rgba(0,0,0,0.1)"'>
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
<span style='font-size: 1.3em'>{random_emojis[0]}</span>
|
273 |
-
<a href='https://{url}' target='_blank'
|
274 |
-
style='text-decoration: none; color: #2d2d2d;'>
|
275 |
-
{name}
|
276 |
-
</a>
|
277 |
-
<span style='font-size: 1.3em'>{random_emojis[1]}</span>
|
278 |
-
</h3>
|
279 |
<div style='margin: 15px 0; color: #444; background: rgba(255,255,255,0.5);
|
280 |
padding: 15px; border-radius: 12px;'>
|
281 |
<p style='margin: 8px 0;'>
|
@@ -288,35 +296,228 @@ def get_vercel_card(deployment, index):
|
|
288 |
<strong>URL:</strong> ๐ https://{url}
|
289 |
</p>
|
290 |
</div>
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
</div>
|
317 |
"""
|
318 |
|
319 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
def get_user_spaces():
|
321 |
# ๊ธฐ์กด Hugging Face ์คํ์ด์ค ๊ฐ์ ธ์ค๊ธฐ
|
322 |
url = f"https://huggingface.co/api/spaces?author={USERNAME}&limit=500"
|
@@ -338,6 +539,9 @@ def get_user_spaces():
|
|
338 |
|
339 |
# Vercel ๋ฐฐํฌ ๊ฐ์ ธ์ค๊ธฐ
|
340 |
vercel_deployments = get_vercel_deployments()
|
|
|
|
|
|
|
341 |
|
342 |
html_content = f"""
|
343 |
<div style='padding: 20px; background-color: #f5f5f5;'>
|
@@ -351,9 +555,17 @@ def get_user_spaces():
|
|
351 |
</a>
|
352 |
</p>
|
353 |
<p style='color: #666; margin: 0;'>
|
354 |
-
Found {
|
355 |
</p>
|
356 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
|
358 |
<!-- Vercel Deployments -->
|
359 |
<h3 style='color: #333; margin: 20px 0;'>โก Vercel Deployments</h3>
|
@@ -367,6 +579,7 @@ def get_user_spaces():
|
|
367 |
{"".join(get_space_card(space, idx) for idx, space in enumerate(user_spaces))}
|
368 |
</div>
|
369 |
</div>
|
|
|
370 |
<script>
|
371 |
document.addEventListener('DOMContentLoaded', function() {{
|
372 |
// ์ข์์ ์ํ ๋ก๋
|
@@ -420,6 +633,7 @@ def get_user_spaces():
|
|
420 |
</script>
|
421 |
"""
|
422 |
|
|
|
423 |
return html_content
|
424 |
|
425 |
except Exception as e:
|
@@ -431,7 +645,7 @@ def get_user_spaces():
|
|
431 |
<p>Please try again later.</p>
|
432 |
</div>
|
433 |
"""
|
434 |
-
|
435 |
# Creating the Gradio interface
|
436 |
demo = gr.Blocks()
|
437 |
|
|
|
195 |
def get_vercel_deployments():
|
196 |
"""Vercel API๋ฅผ ํตํด ๋ฐฐํฌ๋ ์๋น์ค ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ"""
|
197 |
token = "A8IFZmgW2cqA4yUNlLPnci0N"
|
198 |
+
url = "https://api.vercel.com/v6/deployments?limit=100" # limit ํ๋ผ๋ฏธํฐ ์ถ๊ฐ
|
199 |
|
200 |
headers = {
|
201 |
"Authorization": f"Bearer {token}",
|
|
|
223 |
print(f"Error fetching Vercel deployments: {str(e)}")
|
224 |
return []
|
225 |
|
226 |
+
|
227 |
def get_vercel_card(deployment, index):
|
228 |
"""Generate HTML card for a Vercel deployment with like button"""
|
229 |
raw_url = deployment.get('url', '')
|
230 |
+
|
231 |
+
# URL ์ฒ๋ฆฌ ๋ก์ง ์์
|
232 |
+
if raw_url.startswith('http'):
|
233 |
+
url = raw_url # ์ ์ฒด URL์ด ์ ๊ณต๋ ๊ฒฝ์ฐ ๊ทธ๋๋ก ์ฌ์ฉ
|
234 |
+
else:
|
235 |
+
project_name = raw_url[:6] if len(raw_url) >= 6 else raw_url
|
236 |
+
url = f"{project_name}.vercel.app"
|
237 |
+
|
238 |
+
# Hugging Face ์คํ์ด์ค URL์ธ ๊ฒฝ์ฐ ์ง์ ์ฌ์ฉ
|
239 |
+
if 'huggingface.co' in url:
|
240 |
+
final_url = url
|
241 |
+
else:
|
242 |
+
final_url = f"https://{url}" if not url.startswith('http') else url
|
243 |
|
244 |
created = format_timestamp(deployment.get('created'))
|
245 |
name = deployment.get('name', 'Unnamed Project')
|
246 |
state = deployment.get('state', 'N/A')
|
247 |
|
248 |
# ๊ณ ์ ID ์์ฑ (์นด๋ ์๋ณ์ฉ)
|
249 |
+
card_id = f"vercel-card-{url.replace('.', '-').replace('/', '-')}"
|
250 |
+
|
251 |
+
|
252 |
|
253 |
bg_color = get_pastel_color(index + 20)
|
254 |
tech_emojis = ['โก', '๐', '๐', 'โจ', '๐ซ', '๐ฅ', '๐', '๐ฏ', '๐จ', '๐ฎ']
|
255 |
random_emojis = random.sample(tech_emojis, 3)
|
256 |
+
|
257 |
+
|
258 |
return f"""
|
259 |
<div id="{card_id}" class="vercel-card"
|
260 |
data-likes="0"
|
|
|
269 |
overflow: hidden;'
|
270 |
onmouseover='this.style.transform="translateY(-5px) scale(1.02)"; this.style.boxShadow="0 8px 25px rgba(0,0,0,0.15)"'
|
271 |
onmouseout='this.style.transform="translateY(0) scale(1)"; this.style.boxShadow="0 4px 15px rgba(0,0,0,0.1)"'>
|
272 |
+
<!-- ... (์ด์ ์ฝ๋์ ๋์ผ) ... -->
|
273 |
+
<h3 style='color: #2d2d2d;
|
274 |
+
margin: 0 0 20px 0;
|
275 |
+
font-size: 1.4em;
|
276 |
+
display: flex;
|
277 |
+
align-items: center;
|
278 |
+
gap: 10px;'>
|
279 |
+
<span style='font-size: 1.3em'>{random_emojis[0]}</span>
|
280 |
+
<a href='{final_url}' target='_blank'
|
281 |
+
style='text-decoration: none; color: #2d2d2d;'>
|
282 |
+
{name}
|
283 |
+
</a>
|
284 |
+
<span style='font-size: 1.3em'>{random_emojis[1]}</span>
|
285 |
+
</h3>
|
286 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
<div style='margin: 15px 0; color: #444; background: rgba(255,255,255,0.5);
|
288 |
padding: 15px; border-radius: 12px;'>
|
289 |
<p style='margin: 8px 0;'>
|
|
|
296 |
<strong>URL:</strong> ๐ https://{url}
|
297 |
</p>
|
298 |
</div>
|
299 |
+
<div style='margin-top: 20px; display: flex; justify-content: space-between; align-items: center;'>
|
300 |
+
<div class="like-section" style="display: flex; align-items: center; gap: 10px;">
|
301 |
+
<button onclick="toggleLike('{card_id}')" class="like-button"
|
302 |
+
style="background: none; border: none; cursor: pointer; font-size: 1.5em; padding: 5px 10px;">
|
303 |
+
๐ค
|
304 |
+
</button>
|
305 |
+
<span class="like-count" style="font-size: 1.2em; color: #666;">0</span>
|
306 |
+
</div>
|
307 |
+
<a href='{final_url}' target='_blank'
|
308 |
+
style='background: linear-gradient(45deg, #0084ff, #00a3ff);
|
309 |
+
color: white;
|
310 |
+
padding: 10px 20px;
|
311 |
+
border-radius: 15px;
|
312 |
+
text-decoration: none;
|
313 |
+
display: inline-flex;
|
314 |
+
align-items: center;
|
315 |
+
gap: 8px;
|
316 |
+
font-weight: 500;
|
317 |
+
transition: all 0.3s;
|
318 |
+
box-shadow: 0 2px 8px rgba(0,132,255,0.3);'
|
319 |
+
onmouseover='this.style.transform="scale(1.05)"; this.style.boxShadow="0 4px 12px rgba(0,132,255,0.4)"'
|
320 |
+
onmouseout='this.style.transform="scale(1)"; this.style.boxShadow="0 2px 8px rgba(0,132,255,0.3)"'>
|
321 |
+
<span>View Deployment</span> ๐ {random_emojis[0]}
|
322 |
+
</a>
|
323 |
+
</div>
|
324 |
</div>
|
325 |
"""
|
326 |
|
327 |
+
# Top Best URLs ์ ์
|
328 |
+
TOP_BEST_URLS = [
|
329 |
+
|
330 |
+
{
|
331 |
+
"url": "dekvxz.vercel.app",
|
332 |
+
"name": "[๊ฒ์] ๋ค์ด์ดํธ ํํฐ",
|
333 |
+
"created": "2024-11-20 00:00",
|
334 |
+
"state": "READY"
|
335 |
+
},
|
336 |
+
{
|
337 |
+
"url": "jtufui.vercel.app",
|
338 |
+
"name": "[๊ฒ์] ํ
๋ฌ๋ฆฌ์คํธ",
|
339 |
+
"created": "2024-11-20 00:00",
|
340 |
+
"state": "READY"
|
341 |
+
},
|
342 |
+
{
|
343 |
+
"url": "https://huggingface.co/spaces/openfree/ggumim",
|
344 |
+
"name": "[MOUSE-II] ์ด๋ฏธ์ง์ ํ๊ธ ์ถ๋ ฅ",
|
345 |
+
"created": "2024-11-18 00:00",
|
346 |
+
"state": "READY"
|
347 |
+
},
|
348 |
+
{
|
349 |
+
"url": "xabtnc.vercel.app",
|
350 |
+
"name": "[ChatGPT] ๋๋ง์ LLM",
|
351 |
+
"created": "2024-11-18 00:00",
|
352 |
+
"state": "READY"
|
353 |
+
},
|
354 |
+
{
|
355 |
+
"url": "https://huggingface.co/spaces/openfree/ifbhdc",
|
356 |
+
"name": "[๊ฒ์] ๋ณด์ ํกํก",
|
357 |
+
"created": "2024-11-18 00:00",
|
358 |
+
"state": "READY"
|
359 |
+
},
|
360 |
+
{
|
361 |
+
"url": "nxhquk.vercel.app",
|
362 |
+
"name": "[๊ฒ์] ํ
ํธ๋ฆฌ์ค",
|
363 |
+
"created": "2024-11-18 00:00",
|
364 |
+
"state": "READY"
|
365 |
+
},
|
366 |
+
{
|
367 |
+
"url": "bydcnd.vercel.app",
|
368 |
+
"name": "[๋ชจ๋ธ] 3D ๋ถ์ ๋ชจํ",
|
369 |
+
"created": "2024-11-18 00:00",
|
370 |
+
"state": "READY"
|
371 |
+
},
|
372 |
+
{
|
373 |
+
"url": "ijhama.vercel.app",
|
374 |
+
"name": "ํฌ์ ํฌํธํด๋ฆฌ์ค ๋ถ์",
|
375 |
+
"created": "2024-11-18 00:00",
|
376 |
+
"state": "READY"
|
377 |
+
},
|
378 |
+
{
|
379 |
+
"url": "oschnl.vercel.app",
|
380 |
+
"name": "๋ก๋ ๋ฒํธ ๋ถ์/์ถ์ฒ",
|
381 |
+
"created": "2024-11-18 00:00",
|
382 |
+
"state": "READY"
|
383 |
+
},
|
384 |
+
{
|
385 |
+
"url": "rzwzrq.vercel.app",
|
386 |
+
"name": "์์
/CSV ๋ฐ์ดํฐ ๋ถ์",
|
387 |
+
"created": "2024-11-18 00:00",
|
388 |
+
"state": "READY"
|
389 |
+
},
|
390 |
+
{
|
391 |
+
"url": "twkqre.vercel.app",
|
392 |
+
"name": "[์ด์ธ] ํ๋ก์นด๋",
|
393 |
+
"created": "2024-11-18 00:00",
|
394 |
+
"state": "READY"
|
395 |
+
},
|
396 |
+
{
|
397 |
+
"url": "htwymz.vercel.app",
|
398 |
+
"name": "[๊ฒ์] ์๋ฐฉํฌ๊ธฐ",
|
399 |
+
"created": "2024-11-20 00:00",
|
400 |
+
"state": "READY"
|
401 |
+
},
|
402 |
+
{
|
403 |
+
"url": "mktmbn.vercel.app",
|
404 |
+
"name": "[๊ฒ์] ์ฐ์ฃผ์ ์",
|
405 |
+
"created": "2024-11-19 00:00",
|
406 |
+
"state": "READY"
|
407 |
+
},
|
408 |
+
{
|
409 |
+
"url": "euguwt.vercel.app",
|
410 |
+
"name": "[๊ฒ์] ํฌ์ธ์ด๋",
|
411 |
+
"created": "2024-11-19 00:00",
|
412 |
+
"state": "READY"
|
413 |
+
},
|
414 |
+
{
|
415 |
+
"url": "qmdzoh.vercel.app",
|
416 |
+
"name": "[๊ฒ์] ํ๋์ ์ง์ผ๋ผ",
|
417 |
+
"created": "2024-11-19 00:00",
|
418 |
+
"state": "READY"
|
419 |
+
},
|
420 |
+
{
|
421 |
+
"url": "kofaqo.vercel.app",
|
422 |
+
"name": "[๊ฒ์] ์ด์ ์ถฉ๋!",
|
423 |
+
"created": "2024-11-19 00:00",
|
424 |
+
"state": "READY"
|
425 |
+
},
|
426 |
+
{
|
427 |
+
"url": "qoqqkq.vercel.app",
|
428 |
+
"name": "[๊ฒ์] ๋๋์ฅ ์ก๊ธฐ",
|
429 |
+
"created": "2024-11-19 00:00",
|
430 |
+
"state": "READY"
|
431 |
+
},
|
432 |
+
{
|
433 |
+
"url": "nmznel.vercel.app",
|
434 |
+
"name": "[๊ฒ์] ๊ณ ์์ด ์ ์ฉ",
|
435 |
+
"created": "2024-11-19 00:00",
|
436 |
+
"state": "READY"
|
437 |
+
},
|
438 |
+
|
439 |
+
|
440 |
+
{
|
441 |
+
"url": "psrrtp.vercel.app",
|
442 |
+
"name": "[๋์๋ณด๋] ์ธ๊ณ ์ธ๊ตฌ",
|
443 |
+
"created": "2024-11-18 00:00",
|
444 |
+
"state": "READY"
|
445 |
+
},
|
446 |
+
{
|
447 |
+
"url": "xxloav.vercel.app",
|
448 |
+
"name": "[๊ฒ์] ๋ฒฝ๋ ๊นจ๊ธฐ",
|
449 |
+
"created": "2024-11-18 00:00",
|
450 |
+
"state": "READY"
|
451 |
+
},
|
452 |
+
{
|
453 |
+
"url": "https://huggingface.co/spaces/openfree/edpaje",
|
454 |
+
"name": "[๊ฒ์] ๊ธฐ์ต๋ ฅ ์นด๋",
|
455 |
+
"created": "2024-11-18 00:00",
|
456 |
+
"state": "READY"
|
457 |
+
},
|
458 |
+
{
|
459 |
+
"url": "https://huggingface.co/spaces/openfree/ixtidb",
|
460 |
+
"name": "AI ์๋ฆฌ์ฌ",
|
461 |
+
"created": "2024-11-18 00:00",
|
462 |
+
"state": "READY"
|
463 |
+
},
|
464 |
+
|
465 |
+
{
|
466 |
+
"url": "cnlzji.vercel.app",
|
467 |
+
"name": "๊ตญ๊ฐ ์ ๋ณด ๋น๊ต",
|
468 |
+
"created": "2024-11-18 00:00",
|
469 |
+
"state": "READY"
|
470 |
+
},
|
471 |
+
{
|
472 |
+
"url": "fazely.vercel.app",
|
473 |
+
"name": "Wikipedia ์ง์ ๋ถ์",
|
474 |
+
"created": "2024-11-18 00:00",
|
475 |
+
"state": "READY"
|
476 |
+
},
|
477 |
+
{
|
478 |
+
"url": "pkzhbo.vercel.app",
|
479 |
+
"name": "์ธ๊ณ ๊ตญ๊ฐ๋ณ ์๊ฐ๋",
|
480 |
+
"created": "2024-11-18 00:00",
|
481 |
+
"state": "READY"
|
482 |
+
},
|
483 |
+
{
|
484 |
+
"url": "pammgl.vercel.app",
|
485 |
+
"name": "๋ณด๋์๋ฃ ๋ฐฐํฌ ์๋น์ค",
|
486 |
+
"created": "2024-11-18 00:00",
|
487 |
+
"state": "READY"
|
488 |
+
},
|
489 |
+
|
490 |
+
|
491 |
+
{
|
492 |
+
"url": "https://ktduhm.vercel.app/",
|
493 |
+
"name": "์ํ์ ๊ทธ๋ํ๋ก ์ดํด",
|
494 |
+
"created": "2024-11-18 00:00",
|
495 |
+
"state": "READY"
|
496 |
+
},
|
497 |
+
|
498 |
+
|
499 |
+
{
|
500 |
+
"url": "vjmfoy.vercel.app",
|
501 |
+
"name": "[๊ฒ์] 3D ๋ฒฝ๋์๊ธฐ",
|
502 |
+
"created": "2024-11-18 00:00",
|
503 |
+
"state": "READY"
|
504 |
+
},
|
505 |
+
{
|
506 |
+
"url": "aodakf.vercel.app",
|
507 |
+
"name": "[๋ฒ์ถ์ผ] 3D ๊ฐ์ํ์ค",
|
508 |
+
"created": "2024-11-18 00:00",
|
509 |
+
"state": "READY"
|
510 |
+
},
|
511 |
+
{
|
512 |
+
"url": "mxoeue.vercel.app",
|
513 |
+
"name": "์์ฑ ์์ฑ(TTS),์กฐ์ ",
|
514 |
+
"created": "2024-11-18 00:00",
|
515 |
+
"state": "READY"
|
516 |
+
}
|
517 |
+
]
|
518 |
+
|
519 |
+
|
520 |
+
|
521 |
def get_user_spaces():
|
522 |
# ๊ธฐ์กด Hugging Face ์คํ์ด์ค ๊ฐ์ ธ์ค๊ธฐ
|
523 |
url = f"https://huggingface.co/api/spaces?author={USERNAME}&limit=500"
|
|
|
539 |
|
540 |
# Vercel ๋ฐฐํฌ ๊ฐ์ ธ์ค๊ธฐ
|
541 |
vercel_deployments = get_vercel_deployments()
|
542 |
+
|
543 |
+
# ์์ Vercel ๋ฐฐํฌ ์๋ง ์นด์ดํธ
|
544 |
+
vercel_count = len(vercel_deployments) if vercel_deployments else 0
|
545 |
|
546 |
html_content = f"""
|
547 |
<div style='padding: 20px; background-color: #f5f5f5;'>
|
|
|
555 |
</a>
|
556 |
</p>
|
557 |
<p style='color: #666; margin: 0;'>
|
558 |
+
Found {vercel_count} Vercel deployments and {len(user_spaces)} Hugging Face spaces
|
559 |
</p>
|
560 |
</div>
|
561 |
+
|
562 |
+
|
563 |
+
<!-- Top Best -->
|
564 |
+
<h3 style='color: #333; margin: 20px 0;'>๐ Top Best</h3>
|
565 |
+
<div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;'>
|
566 |
+
{"".join(get_vercel_card({"url": url["url"], "created": url["created"], "name": url["name"], "state": url["state"]}, idx)
|
567 |
+
for idx, url in enumerate(TOP_BEST_URLS))}
|
568 |
+
</div>
|
569 |
|
570 |
<!-- Vercel Deployments -->
|
571 |
<h3 style='color: #333; margin: 20px 0;'>โก Vercel Deployments</h3>
|
|
|
579 |
{"".join(get_space_card(space, idx) for idx, space in enumerate(user_spaces))}
|
580 |
</div>
|
581 |
</div>
|
582 |
+
|
583 |
<script>
|
584 |
document.addEventListener('DOMContentLoaded', function() {{
|
585 |
// ์ข์์ ์ํ ๋ก๋
|
|
|
633 |
</script>
|
634 |
"""
|
635 |
|
636 |
+
|
637 |
return html_content
|
638 |
|
639 |
except Exception as e:
|
|
|
645 |
<p>Please try again later.</p>
|
646 |
</div>
|
647 |
"""
|
648 |
+
|
649 |
# Creating the Gradio interface
|
650 |
demo = gr.Blocks()
|
651 |
|