openfree commited on
Commit
c8e0eb9
ยท
verified ยท
1 Parent(s): 428a5c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +76 -31
app.py CHANGED
@@ -456,37 +456,82 @@ def html(cards, pg, total):
456
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 7. Gradio Blocks UI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
457
  def build():
458
  _init_best()
459
- with gr.Blocks(title="Vibe Game Craft", css="""
460
- footer {display: none !important;}
461
-
462
- .button-row {
463
- position: fixed !important;
464
- bottom: 0 !important;
465
- left: 0 !important;
466
- right: 0 !important;
467
- height: 60px !important;
468
- background: #f0f0f0 !important;
469
- padding: 10px !important;
470
- text-align: center !important;
471
- box-shadow: 0 -2px 10px rgba(0,0,0,0.05) !important;
472
- margin: 0 !important;
473
- z-index: 1000 !important;
474
- }
475
-
476
- .button-row button {
477
- margin: 0 10px !important;
478
- padding: 10px 20px !important;
479
- font-size: 16px !important;
480
- font-weight: bold !important;
481
- border-radius: 50px !important;
482
- }
483
-
484
- /* Allow scrolling in the HTML component */
485
- #component-0 {
486
- overflow-y: auto !important;
487
- height: calc(100vh - 60px) !important;
488
- }
489
- """) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  # ์ƒํƒœ ๋ฐ ์ถœ๋ ฅ
491
  bp = gr.State(1)
492
  out = gr.HTML()
 
456
  # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 7. Gradio Blocks UI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
457
  def build():
458
  _init_best()
459
+
460
+ # --- 1) ํ—ค๋”์šฉ HTML ์ •์˜ ---------------------------------
461
+ header_html_snippet = """
462
+ <style>
463
+ .app-header{ text-align:center; margin-bottom:24px; }
464
+ .badge-row{
465
+ display:inline-flex; /* ๊ฐ€๋กœ ์ •๋ ฌ */
466
+ gap:8px; /* ๋ฐฐ์ง€ ์‚ฌ์ด ์—ฌ๋ฐฑ */
467
+ margin:8px 0;
468
+ }
469
+ </style>
470
+
471
+ <div class="app-header">
472
+ <h1>๐ŸŽฎ Vibe Game Craft</h1>
473
+
474
+ <div class="badge-row">
475
+ <!-- โ‘  Vibe-Game ๊ณต๊ฐ„ ๋ฐฐ์ง€ -->
476
+ <a href="https://huggingface.co/spaces/openfree/Vibe-Game" target="_blank">
477
+ <img src="https://img.shields.io/static/v1?label=huggingface&message=Vibe%20Game%20Craft&color=%23800080&labelColor=%23ffa500&logo=huggingface&logoColor=%23ffff00&style=for-the-badge" alt="HF Vibe badge">
478
+ </a>
479
+
480
+ <!-- โ‘ก Game Gallery ๋ฐฐ์ง€ -->
481
+ <a href="https://huggingface.co/spaces/openfree/Game-Gallery" target="_blank">
482
+ <img src="https://img.shields.io/static/v1?label=huggingface&message=Game%20Gallery&color=%23800080&labelColor=%23ffa500&logo=huggingface&logoColor=%23ffff00&style=for-the-badge" alt="HF Gallery badge">
483
+ </a>
484
+
485
+ <!-- โ‘ข Discord ๋ฐฐ์ง€ -->
486
+ <a href="https://discord.gg/openfreeai" target="_blank">
487
+ <img src="https://img.shields.io/static/v1?label=Discord&message=Openfree%20AI&color=%230000ff&labelColor=%23800080&logo=discord&logoColor=white&style=for-the-badge" alt="Discord badge">
488
+ </a>
489
+ </div>
490
+
491
+ <p>ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋งŒ์œผ๋กœ ์ตœ์‹  LLM๋“ค๊ณผ Agent๊ฐ€ ํ˜‘์—…ํ•˜์—ฌ ์›น ๊ธฐ๋ฐ˜ HTML5, JavaScript, CSS ๊ฒŒ์ž„์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์‹ค์‹œ๊ฐ„ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์™€ ๋ฐฐํฌ ๊ธฐ๋Šฅ๋„ ์ง€์›๋ฉ๋‹ˆ๋‹ค.</p>
492
+ </div>
493
+ """
494
+
495
+ # --- 2) Gradio Blocks ์‹œ์ž‘ --------------------------------
496
+ with gr.Blocks(
497
+ title="Vibe Game Craft",
498
+ css="""
499
+ footer{display:none !important;}
500
+
501
+ .button-row{
502
+ position:fixed !important;
503
+ bottom:0 !important;
504
+ left:0 !important;
505
+ right:0 !important;
506
+ height:60px !important;
507
+ background:#f0f0f0 !important;
508
+ padding:10px !important;
509
+ text-align:center !important;
510
+ box-shadow:0 -2px 10px rgba(0,0,0,0.05) !important;
511
+ margin:0 !important;
512
+ z-index:1000 !important;
513
+ }
514
+
515
+ .button-row button{
516
+ margin:0 10px !important;
517
+ padding:10px 20px !important;
518
+ font-size:16px !important;
519
+ font-weight:bold !important;
520
+ border-radius:50px !important;
521
+ }
522
+
523
+ /* Allow scrolling in the HTML component */
524
+ #component-0{
525
+ overflow-y:auto !important;
526
+ height:calc(100vh - 60px) !important;
527
+ }
528
+ """
529
+ ) as demo:
530
+
531
+ # (1) โœจ ํ—ค๋”๋ฅผ ๊ฐ€์žฅ ๋จผ์ € ๋ Œ๋”๋ง
532
+ gr.HTML(header_html_snippet)
533
+
534
+
535
  # ์ƒํƒœ ๋ฐ ์ถœ๋ ฅ
536
  bp = gr.State(1)
537
  out = gr.HTML()