Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ from open_ai import run_openai
|
|
| 6 |
from prompt_loader import get_prompt
|
| 7 |
|
| 8 |
from dotenv import load_dotenv
|
|
|
|
| 9 |
|
| 10 |
load_dotenv()
|
| 11 |
|
|
@@ -244,23 +245,22 @@ def process_lang(selected_lang, isGenerateLyrics, isGenerateStyle):
|
|
| 244 |
with gr.Blocks(title="Suno PromptGen", fill_height=True,
|
| 245 |
theme=gr.themes.Default(primary_hue=gr.themes.colors.sky, secondary_hue=gr.themes.colors.indigo),
|
| 246 |
analytics_enabled=False, css="footer{display:none !important}") as demo:
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
gr.Image(label="header AiCave",
|
| 250 |
-
value="splash.webp",
|
| 251 |
-
width=100,
|
| 252 |
-
height=100,
|
| 253 |
-
show_label=False,
|
| 254 |
-
interactive=False,
|
| 255 |
-
show_download_button=False,
|
| 256 |
-
show_fullscreen_button=False,
|
| 257 |
-
show_share_button=False,
|
| 258 |
-
elem_id="logo"
|
| 259 |
-
)
|
| 260 |
-
|
| 261 |
-
with gr.Column(scale=90,):
|
| 262 |
-
gr.Markdown(f"# {TS['title']}\n## by <a href='https://boosty.to/aicave/donate'>AiCave</a>")
|
| 263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
with gr.Column(scale=5):
|
| 265 |
radio_lang = gr.Radio(choices = ["RU", "EN"], show_label = False, container = False, type = "value", value=lang)
|
| 266 |
with gr.Column(scale=5):
|
|
@@ -317,4 +317,4 @@ demo.css = """
|
|
| 317 |
"""
|
| 318 |
|
| 319 |
if __name__ == "__main__":
|
| 320 |
-
demo.launch(quiet =
|
|
|
|
| 6 |
from prompt_loader import get_prompt
|
| 7 |
|
| 8 |
from dotenv import load_dotenv
|
| 9 |
+
import sys
|
| 10 |
|
| 11 |
load_dotenv()
|
| 12 |
|
|
|
|
| 245 |
with gr.Blocks(title="Suno PromptGen", fill_height=True,
|
| 246 |
theme=gr.themes.Default(primary_hue=gr.themes.colors.sky, secondary_hue=gr.themes.colors.indigo),
|
| 247 |
analytics_enabled=False, css="footer{display:none !important}") as demo:
|
| 248 |
+
logo_info = demo.serve_static_file("splash.webp")
|
| 249 |
+
logo_url = logo_info["url"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
|
| 251 |
+
with gr.Row(elem_id="header", equal_height=True):
|
| 252 |
+
with gr.Column(scale=90, min_width=200):
|
| 253 |
+
gr.HTML(f"""
|
| 254 |
+
<div style='display: flex; align-items: center; gap: 16px;'>
|
| 255 |
+
<img src='{logo_url}' alt='AiCave logo'
|
| 256 |
+
width='100' height='100'
|
| 257 |
+
style='background: transparent; display: block;' />
|
| 258 |
+
<div style='line-height: 1.2;'>
|
| 259 |
+
<h3 style='margin: 0; font-weight: 600;'>SUNO style generator and lyrics format</h3>
|
| 260 |
+
<p style='margin: 4px 0 0 0; font-size: 0.9em;'>by <a href='https://boosty.to/aicave/donate' style='color: #60a5fa;'>AiCave</a></p>
|
| 261 |
+
</div>
|
| 262 |
+
</div>
|
| 263 |
+
""")
|
| 264 |
with gr.Column(scale=5):
|
| 265 |
radio_lang = gr.Radio(choices = ["RU", "EN"], show_label = False, container = False, type = "value", value=lang)
|
| 266 |
with gr.Column(scale=5):
|
|
|
|
| 317 |
"""
|
| 318 |
|
| 319 |
if __name__ == "__main__":
|
| 320 |
+
demo.launch(quiet=False, share=False, server_name="0.0.0.0", server_port=7860)
|