Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,50 +81,75 @@ def ui_build_pack(niche, style, bpm, tone, goal):
|
|
| 81 |
|
| 82 |
|
| 83 |
# --------------------------------------------------
|
| 84 |
-
#
|
| 85 |
# --------------------------------------------------
|
| 86 |
-
|
| 87 |
<style>
|
| 88 |
|
| 89 |
body {
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
}
|
| 92 |
|
|
|
|
| 93 |
#main-title {
|
| 94 |
-
font-size:
|
| 95 |
-
font-weight:
|
| 96 |
-
color: #
|
| 97 |
text-align: center;
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
button {
|
| 103 |
-
background: linear-gradient(90deg, #
|
| 104 |
-
color:
|
| 105 |
font-weight: bold !important;
|
| 106 |
border-radius: 10px !important;
|
| 107 |
-
|
| 108 |
-
padding: 10px 16px !important;
|
| 109 |
border: none !important;
|
| 110 |
-
|
| 111 |
-
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
button:hover {
|
| 115 |
-
transform: scale(1.
|
| 116 |
-
box-shadow: 0px 0px
|
| 117 |
}
|
| 118 |
|
|
|
|
| 119 |
input, textarea, select {
|
| 120 |
-
background
|
| 121 |
-
color: #
|
| 122 |
-
border: 1px solid #
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
|
| 126 |
label {
|
| 127 |
-
color: #
|
| 128 |
}
|
| 129 |
|
| 130 |
</style>
|
|
@@ -136,61 +161,50 @@ label {
|
|
| 136 |
# --------------------------------------------------
|
| 137 |
with gr.Blocks(title="304 Reaper AI Content + Beat Generator") as demo:
|
| 138 |
|
| 139 |
-
|
| 140 |
-
gr.HTML(
|
| 141 |
-
|
| 142 |
-
gr.HTML("<h1 id='main-title'>π₯ 304 REAPER β AI CONTENT & BEAT GENERATOR</h1>")
|
| 143 |
|
| 144 |
-
# ---------------------------
|
| 145 |
-
# BEAT GENERATOR
|
| 146 |
-
# ---------------------------
|
| 147 |
with gr.Tab("π΅ Beat Forge"):
|
| 148 |
-
gr.Markdown("###
|
| 149 |
|
| 150 |
style = gr.Dropdown(
|
| 151 |
["Country Rap", "Trap", "Dark Outlaw", "Drill", "BoomBap"],
|
| 152 |
label="Beat Style"
|
| 153 |
)
|
| 154 |
bpm = gr.Slider(60, 180, value=120, label="BPM")
|
| 155 |
-
loops = gr.Slider(1, 5, value=1, label="
|
| 156 |
|
| 157 |
-
|
| 158 |
-
audio_out = gr.Audio(label="
|
| 159 |
|
| 160 |
-
|
| 161 |
ui_generate_beats,
|
| 162 |
inputs=[style, bpm, loops],
|
| 163 |
outputs=audio_out
|
| 164 |
)
|
| 165 |
|
| 166 |
-
# ---------------------------
|
| 167 |
-
# CONTENT GENERATOR
|
| 168 |
-
# ---------------------------
|
| 169 |
with gr.Tab("π§ Content Lab"):
|
| 170 |
-
gr.Markdown("### Hooks,
|
| 171 |
|
| 172 |
niche = gr.Textbox(label="Niche")
|
| 173 |
tone = gr.Textbox(label="Tone")
|
| 174 |
goal = gr.Textbox(label="Goal")
|
| 175 |
|
| 176 |
-
|
| 177 |
|
| 178 |
hooks_out = gr.Textbox(label="Hooks")
|
| 179 |
captions_out = gr.Textbox(label="Captions")
|
| 180 |
ideas_out = gr.Textbox(label="Ideas")
|
| 181 |
scripts_out = gr.Textbox(label="Scripts")
|
| 182 |
|
| 183 |
-
|
| 184 |
ui_generate_content,
|
| 185 |
inputs=[niche, tone, goal],
|
| 186 |
outputs=[hooks_out, captions_out, ideas_out, scripts_out]
|
| 187 |
)
|
| 188 |
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
# ---------------------------
|
| 192 |
-
with gr.Tab("π¦ Full Creator Pack"):
|
| 193 |
-
gr.Markdown("### Build a Full Creator ZIP Pack")
|
| 194 |
|
| 195 |
niche2 = gr.Textbox(label="Niche")
|
| 196 |
style2 = gr.Dropdown(
|
|
@@ -201,8 +215,8 @@ with gr.Blocks(title="304 Reaper AI Content + Beat Generator") as demo:
|
|
| 201 |
tone2 = gr.Textbox(label="Tone")
|
| 202 |
goal2 = gr.Textbox(label="Goal")
|
| 203 |
|
| 204 |
-
build_btn = gr.Button("β‘ Build
|
| 205 |
-
zip_out = gr.File(label="Download")
|
| 206 |
|
| 207 |
build_btn.click(
|
| 208 |
ui_build_pack,
|
|
@@ -210,5 +224,4 @@ with gr.Blocks(title="304 Reaper AI Content + Beat Generator") as demo:
|
|
| 210 |
outputs=zip_out
|
| 211 |
)
|
| 212 |
|
| 213 |
-
|
| 214 |
demo.launch()
|
|
|
|
| 81 |
|
| 82 |
|
| 83 |
# --------------------------------------------------
|
| 84 |
+
# EMBEDDED BRUSHED GUNMETAL BACKGROUND (BASE64)
|
| 85 |
# --------------------------------------------------
|
| 86 |
+
gunmetal_bg = """
|
| 87 |
<style>
|
| 88 |
|
| 89 |
body {
|
| 90 |
+
margin: 0 !important;
|
| 91 |
+
padding: 0 !important;
|
| 92 |
+
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAYAAAA+j9gPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAABjBJREFUeJzt3b1u2kgQQNHTQF+giNBDbDE5jBqFaUGUcRgxN6E466+vWXTmFRrM8Nl1N8MPv+2MvmP0x+g6u40qGgfHdCqfpNNpJBWlAbIYWCA2PASi6DPd7OJbRRqtZIOSk5MTx0uvvZk90un0n0n0n0n0n0n0n0n0n0n8n2n2zcz5z7XnGO/czkRgZNpmjQqYh6gMPkTFogyXv3gZH/BqhGlywbn4T/6KrAE98FAd7iGouVp21HbQJseb3CidRubc4QpfAl8MwVzKhI6+w4n1vCLaYB9rqx8uxFazc2D/qKyfinBmMOPqlmkavRKu0kUQeFkCvhq/i323iDL49myIIZeF1P0uohsEiL/KZ8nfdXbra+XUl3Bd4mV9Ezg1QF/Nb+YPFQyu1HFDigONydMUuN1ZpFdEyAJ9MkdaZ7n0ANKPOuUMGAfJOyrUo9qeycGQ21MCH2RKDWE/YBYdz/BPZt6r9Ga6IpiObOqYkbKx2+Y8OobQIEkgyDAh9g0Rj62LF8oT+yQUwSWOSJyYwcmBHQYaWV7kngakdUSHcauD1ynjUTduVdJN9WewtG/XAIN5e8wZsM+dAf5BgC984wgKLF6t84yAogPSFqdtYY4cYNSeNBY0d5hDnzL2wv30IZHuZOKhHvJ3C0cFLbFhF38sZ4N2VNivg393XcX4Jt9V7H5P4xMIOKgHdwNwp0UrEGouGZWlznImPi0tLxe3LjXLp8dkUBaRdOy+nK8BPVKx/aRXefxWWEXUOYaL6VLdystD5nq2WEYLRh3SeDsICoZ6RiMUiP+6JGZveHFkNjEcNWef39/C4R2tQeM+c/37yHUsctNk6heAQ7Ez+KQEiC5EvhczHxMMz9Yx8RJWb1x1o1t4bm/FvGV8eK3opgDdBrYqYElw3ZTNhbmPDMv8YDn8ApX2HFqRSbVAAAAAElFTkSuQmCC');
|
| 93 |
+
background-size: cover !important;
|
| 94 |
+
background-position: center !important;
|
| 95 |
+
background-attachment: fixed !important;
|
| 96 |
}
|
| 97 |
|
| 98 |
+
/* HEADER */
|
| 99 |
#main-title {
|
| 100 |
+
font-size: 38px;
|
| 101 |
+
font-weight: 900;
|
| 102 |
+
color: #eeeeee;
|
| 103 |
text-align: center;
|
| 104 |
+
margin-bottom: 15px;
|
| 105 |
+
text-shadow:
|
| 106 |
+
0px 0px 18px #00f0ff,
|
| 107 |
+
0px 0px 28px #00f0ff,
|
| 108 |
+
0px 0px 18px #ff4800;
|
| 109 |
}
|
| 110 |
|
| 111 |
+
/* PANEL STYLING */
|
| 112 |
+
.gradio-container {
|
| 113 |
+
background: rgba(10, 10, 10, 0.55) !important;
|
| 114 |
+
backdrop-filter: blur(8px) !important;
|
| 115 |
+
border-radius: 14px !important;
|
| 116 |
+
border: 1px solid rgba(0,255,255,0.25) !important;
|
| 117 |
+
box-shadow: 0px 0px 22px rgba(0,255,255,0.35);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
/* BUTTONS */
|
| 121 |
button {
|
| 122 |
+
background: linear-gradient(90deg, #00eaff, #0088cc) !important;
|
| 123 |
+
color: black !important;
|
| 124 |
font-weight: bold !important;
|
| 125 |
border-radius: 10px !important;
|
| 126 |
+
padding: 12px !important;
|
|
|
|
| 127 |
border: none !important;
|
| 128 |
+
font-size: 18px !important;
|
| 129 |
+
box-shadow: 0px 0px 15px #00eaff;
|
| 130 |
+
transition: 0.15s ease-in-out;
|
| 131 |
}
|
| 132 |
|
| 133 |
button:hover {
|
| 134 |
+
transform: scale(1.06);
|
| 135 |
+
box-shadow: 0px 0px 25px #00ffff;
|
| 136 |
}
|
| 137 |
|
| 138 |
+
/* INPUTS */
|
| 139 |
input, textarea, select {
|
| 140 |
+
background: rgba(20,20,20,0.8) !important;
|
| 141 |
+
color: #e5e5e5 !important;
|
| 142 |
+
border: 1px solid #0099aa !important;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/* AUDIO PLAYER */
|
| 146 |
+
audio {
|
| 147 |
+
outline: 2px solid #00ffff !important;
|
| 148 |
+
border-radius: 8px;
|
| 149 |
}
|
| 150 |
|
| 151 |
label {
|
| 152 |
+
color: #e5e5e5 !important;
|
| 153 |
}
|
| 154 |
|
| 155 |
</style>
|
|
|
|
| 161 |
# --------------------------------------------------
|
| 162 |
with gr.Blocks(title="304 Reaper AI Content + Beat Generator") as demo:
|
| 163 |
|
| 164 |
+
gr.HTML(gunmetal_bg)
|
| 165 |
+
gr.HTML("<h1 id='main-title'>π₯ 304 REAPER β AI CONTENT & BEAT FORGE π₯</h1>")
|
|
|
|
|
|
|
| 166 |
|
|
|
|
|
|
|
|
|
|
| 167 |
with gr.Tab("π΅ Beat Forge"):
|
| 168 |
+
gr.Markdown("### Build outlaw beats with neon precision.")
|
| 169 |
|
| 170 |
style = gr.Dropdown(
|
| 171 |
["Country Rap", "Trap", "Dark Outlaw", "Drill", "BoomBap"],
|
| 172 |
label="Beat Style"
|
| 173 |
)
|
| 174 |
bpm = gr.Slider(60, 180, value=120, label="BPM")
|
| 175 |
+
loops = gr.Slider(1, 5, value=1, label="Number of Loops")
|
| 176 |
|
| 177 |
+
gen_btn = gr.Button("β‘ Generate Beat")
|
| 178 |
+
audio_out = gr.Audio(label="Beat Output", type="filepath")
|
| 179 |
|
| 180 |
+
gen_btn.click(
|
| 181 |
ui_generate_beats,
|
| 182 |
inputs=[style, bpm, loops],
|
| 183 |
outputs=audio_out
|
| 184 |
)
|
| 185 |
|
|
|
|
|
|
|
|
|
|
| 186 |
with gr.Tab("π§ Content Lab"):
|
| 187 |
+
gr.Markdown("### Hooks, captions, ideas, and scripts β outlaw branded.")
|
| 188 |
|
| 189 |
niche = gr.Textbox(label="Niche")
|
| 190 |
tone = gr.Textbox(label="Tone")
|
| 191 |
goal = gr.Textbox(label="Goal")
|
| 192 |
|
| 193 |
+
gen_btn2 = gr.Button("β‘ Generate Content")
|
| 194 |
|
| 195 |
hooks_out = gr.Textbox(label="Hooks")
|
| 196 |
captions_out = gr.Textbox(label="Captions")
|
| 197 |
ideas_out = gr.Textbox(label="Ideas")
|
| 198 |
scripts_out = gr.Textbox(label="Scripts")
|
| 199 |
|
| 200 |
+
gen_btn2.click(
|
| 201 |
ui_generate_content,
|
| 202 |
inputs=[niche, tone, goal],
|
| 203 |
outputs=[hooks_out, captions_out, ideas_out, scripts_out]
|
| 204 |
)
|
| 205 |
|
| 206 |
+
with gr.Tab("π¦ Creator Pack"):
|
| 207 |
+
gr.Markdown("### One click. Full outlaw creator pack.")
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
niche2 = gr.Textbox(label="Niche")
|
| 210 |
style2 = gr.Dropdown(
|
|
|
|
| 215 |
tone2 = gr.Textbox(label="Tone")
|
| 216 |
goal2 = gr.Textbox(label="Goal")
|
| 217 |
|
| 218 |
+
build_btn = gr.Button("β‘ Build Pack")
|
| 219 |
+
zip_out = gr.File(label="Download ZIP")
|
| 220 |
|
| 221 |
build_btn.click(
|
| 222 |
ui_build_pack,
|
|
|
|
| 224 |
outputs=zip_out
|
| 225 |
)
|
| 226 |
|
|
|
|
| 227 |
demo.launch()
|