fizzarif7 commited on
Commit
ae540d4
Β·
verified Β·
1 Parent(s): 3002a09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +78 -26
app.py CHANGED
@@ -182,69 +182,121 @@ Only provide the raw values, no headers.
182
 
183
  # -------------------- UI --------------------
184
 
185
- with gr.Blocks(title="Scene-by-Scene Story Generator") as demo:
 
 
186
  gr.Markdown("## 🎬 AI Scene-by-Scene Story Creator")
187
  gr.Markdown("Describe your story one scene at a time, with AI-generated images, summaries, and explanations.")
188
  gr.HTML("""
189
  <style>
 
190
  body {
191
- background-color: #f5f7fa;
192
  font-family: 'Segoe UI', sans-serif;
 
193
  }
194
 
195
  .gradio-container {
196
  background-color: #ffffff;
197
  color: #2c3e50;
 
 
198
  }
199
 
200
- button, .gr-button {
201
- background-color: #2980b9 !important;
202
- color: #fff !important;
203
- border-radius: 8px !important;
204
- padding: 10px 16px;
205
- font-weight: 600;
206
- transition: background-color 0.3s ease;
207
- }
208
-
209
- button:hover, .gr-button:hover {
210
- background-color: #1f6692 !important;
211
- }
212
-
213
  input, textarea, select, .gr-textbox, .gr-number, .gr-dropdown {
214
- background-color: #ecf0f1 !important;
215
- border: 1px solid #bdc3c7 !important;
216
- border-radius: 6px !important;
217
  padding: 10px !important;
218
  }
219
 
 
220
  .gr-accordion .panel {
221
- background-color: #dce3ea !important;
222
- border-radius: 8px;
223
- border: 1px solid #aab7c4 !important;
 
224
  }
225
 
 
226
  .gr-markdown, label {
227
  color: #2c3e50;
228
  font-weight: 500;
229
  }
230
 
231
  h1, h2, h3 {
232
- color: #1f6692;
233
  }
234
 
 
235
  .audio-preview, .gr-image-preview {
236
- border-radius: 8px;
237
- border: 1px solid #c0cfd9;
 
238
  }
239
 
240
  .file-preview {
241
- border: 1px solid #95a5a6;
242
- background-color: #ecf0f1;
243
  border-radius: 8px;
244
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  </style>
246
  """)
247
 
 
248
  with gr.Accordion("🧩 Story Setup", open=True):
249
  scene_total = gr.Number(label="πŸ”’ Number of Scenes", precision=0, value=3)
250
  theme = gr.Textbox(label="🌍 Global Theme", placeholder="e.g. A magical forest full of glowing creatures")
 
182
 
183
  # -------------------- UI --------------------
184
 
185
+
186
+ with gr.Blocks(title="Comic Generator", css=".gradio-container { box-shadow: 0 2px 12px rgba(0,0,0,0.05); border-radius: 12px; }") as demo:
187
+
188
  gr.Markdown("## 🎬 AI Scene-by-Scene Story Creator")
189
  gr.Markdown("Describe your story one scene at a time, with AI-generated images, summaries, and explanations.")
190
  gr.HTML("""
191
  <style>
192
+ /* ===== Global Background & Fonts ===== */
193
  body {
194
+ background-color: #f2f6fa; /* light blue-grey */
195
  font-family: 'Segoe UI', sans-serif;
196
+ margin: 0;
197
  }
198
 
199
  .gradio-container {
200
  background-color: #ffffff;
201
  color: #2c3e50;
202
+ border-radius: 12px;
203
+ padding: 16px;
204
  }
205
 
206
+ /* ===== Input Boxes & Dropdowns ===== */
 
 
 
 
 
 
 
 
 
 
 
 
207
  input, textarea, select, .gr-textbox, .gr-number, .gr-dropdown {
208
+ background-color: #f7f9fb !important; /* very light grey-blue */
209
+ border: 1px solid #d0dae3 !important;
210
+ border-radius: 8px !important;
211
  padding: 10px !important;
212
  }
213
 
214
+ /* ===== Accordion Panels ===== */
215
  .gr-accordion .panel {
216
+ background-color: #e9f1f7 !important; /* soft blue-grey */
217
+ border-radius: 10px;
218
+ border: 1px solid #c6d2db !important;
219
+ padding: 10px;
220
  }
221
 
222
+ /* ===== Markdown Titles and Labels ===== */
223
  .gr-markdown, label {
224
  color: #2c3e50;
225
  font-weight: 500;
226
  }
227
 
228
  h1, h2, h3 {
229
+ color: #1a5276;
230
  }
231
 
232
+ /* ===== Image & Audio Containers ===== */
233
  .audio-preview, .gr-image-preview {
234
+ border-radius: 10px;
235
+ border: 1px solid #d3dfe8;
236
+ background-color: #fefefe;
237
  }
238
 
239
  .file-preview {
240
+ border: 1px solid #cfd8dc;
241
+ background-color: #f4f6f7;
242
  border-radius: 8px;
243
  }
244
+
245
+ /* ===== Individual Button Styling ===== */
246
+
247
+ /* βž• Generate This Scene */
248
+ button:has-text("βž• Generate This Scene") {
249
+ background-color: #d6eaf8 !important;
250
+ color: #1a5276 !important;
251
+ }
252
+
253
+ /* πŸ€– Let AI Write This One */
254
+ button:has-text("πŸ€– Let AI Write This One") {
255
+ background-color: #eafaf1 !important;
256
+ color: #117a65 !important;
257
+ }
258
+
259
+ /* πŸ”„ Recreate This Scene */
260
+ button:has-text("πŸ”„ Recreate This Scene") {
261
+ background-color: #fffbe6 !important;
262
+ color: #b7950b !important;
263
+ }
264
+
265
+ /* ⏭️ Next Scene */
266
+ button:has-text("⏭️ Next Scene") {
267
+ background-color: #f8ecf9 !important;
268
+ color: #7d3c98 !important;
269
+ }
270
+
271
+ /* βœ… Finalize Story & Export */
272
+ button:has-text("βœ… Finalize Story & Export") {
273
+ background-color: #e8f8f5 !important;
274
+ color: #1e8449 !important;
275
+ }
276
+
277
+ /* πŸ”Š Read Aloud */
278
+ button:has-text("πŸ”Š Read Aloud") {
279
+ background-color: #f0f3f4 !important;
280
+ color: #2c3e50 !important;
281
+ }
282
+
283
+ /* General Button Style */
284
+ button, .gr-button {
285
+ border-radius: 8px !important;
286
+ font-weight: 600;
287
+ transition: background-color 0.3s ease;
288
+ border: none;
289
+ padding: 10px 16px;
290
+ }
291
+
292
+ /* Hover Effect */
293
+ button:hover, .gr-button:hover {
294
+ filter: brightness(95%);
295
+ }
296
  </style>
297
  """)
298
 
299
+
300
  with gr.Accordion("🧩 Story Setup", open=True):
301
  scene_total = gr.Number(label="πŸ”’ Number of Scenes", precision=0, value=3)
302
  theme = gr.Textbox(label="🌍 Global Theme", placeholder="e.g. A magical forest full of glowing creatures")