multimodalart HF Staff commited on
Commit
c225762
·
1 Parent(s): aa18265

Replace H1 title with theme-aware logo (600px, centered)

Browse files
Files changed (3) hide show
  1. app.py +15 -1
  2. logo_dark.png +0 -0
  3. logo_light.png +0 -0
app.py CHANGED
@@ -1550,12 +1550,26 @@ CSS = """
1550
  #col-container { max-width: 1300px; margin: 0 auto; }
1551
  .dark .gradio-container { color: var(--body-text-color); }
1552
  .html-container{padding: 0}
 
 
 
 
1553
  """
1554
 
 
 
 
 
 
1555
  with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
1556
  with gr.Column(elem_id="col-container"):
 
 
 
 
 
 
1557
  gr.Markdown(
1558
- "# MiniMax Music 3\n"
1559
  "MiniMax Music 3.0 is a music generation model designed to support the creation of full-length songs. "
1560
  "[[model]](https://huggingface.co/MiniMaxAI/MiniMax-Music3) "
1561
  "[[project]](https://minimax-ai.github.io/music3-demo/) "
 
1550
  #col-container { max-width: 1300px; margin: 0 auto; }
1551
  .dark .gradio-container { color: var(--body-text-color); }
1552
  .html-container{padding: 0}
1553
+ .mm3-logo { display: block; margin: 8px auto 0; width: 600px; max-width: 100%; }
1554
+ .mm3-logo-dark { display: none; }
1555
+ .dark .mm3-logo-light { display: none; }
1556
+ .dark .mm3-logo-dark { display: block; }
1557
  """
1558
 
1559
+ import base64
1560
+
1561
+ _LOGO_LIGHT_B64 = base64.b64encode(open("logo_light.png", "rb").read()).decode()
1562
+ _LOGO_DARK_B64 = base64.b64encode(open("logo_dark.png", "rb").read()).decode()
1563
+
1564
  with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
1565
  with gr.Column(elem_id="col-container"):
1566
+ gr.HTML(
1567
+ '<img src="data:image/png;base64,' + _LOGO_LIGHT_B64 + '" class="mm3-logo mm3-logo-light" alt="MiniMax Music 3">'
1568
+ '<img src="data:image/png;base64,' + _LOGO_DARK_B64 + '" class="mm3-logo mm3-logo-dark" alt="MiniMax Music 3">',
1569
+ container=False,
1570
+ padding=False,
1571
+ )
1572
  gr.Markdown(
 
1573
  "MiniMax Music 3.0 is a music generation model designed to support the creation of full-length songs. "
1574
  "[[model]](https://huggingface.co/MiniMaxAI/MiniMax-Music3) "
1575
  "[[project]](https://minimax-ai.github.io/music3-demo/) "
logo_dark.png ADDED
logo_light.png ADDED