Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -289,6 +289,13 @@ with gr.Blocks(
|
|
| 289 |
box-shadow: 0 0 6px rgba(255, 105, 180, 0.3);
|
| 290 |
outline: none;
|
| 291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
|
| 293 |
/* π Scene Image Border */
|
| 294 |
.gr-image img {
|
|
@@ -489,26 +496,26 @@ with gr.Blocks(
|
|
| 489 |
gr.Markdown("### β¨ Describe Your Next Scene", elem_id="accordion1")
|
| 490 |
|
| 491 |
with gr.Group(elem_id = "accordion"):
|
| 492 |
-
with gr.Row(
|
| 493 |
char_count = gr.Number(label="π₯ Number of Characters", precision=0, value=2, elem_id="input")
|
| 494 |
character_names = gr.Textbox(label="π§ββοΈ Character Names", elem_id="textarea")
|
| 495 |
-
with gr.Row():
|
| 496 |
dialogue = gr.Textbox(label="π¬ Dialogue (optional)", placeholder="e.g. 'Protect the forest!'", elem_id="textarea")
|
| 497 |
dialogue_speaker = gr.Textbox(label="π£οΈ Who says the dialogue?", placeholder="e.g. Bramble", elem_id = "txtarea")
|
| 498 |
|
| 499 |
-
with gr.Row(
|
| 500 |
char_styles = gr.Textbox(label="π§₯ Outfit Descriptions", placeholder="e.g. Elora wears a leafy cloak, Bramble has a warrior vest", elem_id="textarea")
|
| 501 |
char_moods = gr.Textbox(label="π Character Moods", placeholder="e.g. Elora is cautious, Bramble is brave", elem_id="textarea")
|
| 502 |
bg_style = gr.Dropdown(label="π¨ Background Style", choices=["Realistic", "Cartoon", "Fantasy", "Dark Fantasy"], value="Fantasy", elem_id="select")
|
| 503 |
with gr.Group(elem_id="accordion"):
|
| 504 |
-
with gr.Row():
|
| 505 |
-
with gr.Row():
|
| 506 |
generate_btn = gr.Button("β Generate The Scene", elem_id="generate-btn")
|
| 507 |
ai_coauthor_btn = gr.Button("π€ Let AI Write This One", elem_id="ai-write-btn")
|
| 508 |
-
with gr.Row():
|
| 509 |
recreate_btn = gr.Button("π Recreate The Scene", elem_id="recreate-btn")
|
| 510 |
reset_btn = gr.Button("\nβοΈ Reset", elem_id="reset-btn")
|
| 511 |
-
with gr.Row():
|
| 512 |
recreate_scene_index = gr.Number(label="π’ Scene Number to Recreate", precision=0, value=1, elem_id="recreate_scene_index")
|
| 513 |
|
| 514 |
status = gr.Markdown(elem_classes="gr-image")
|
|
@@ -516,14 +523,14 @@ with gr.Blocks(
|
|
| 516 |
summary_output = gr.Markdown(label="π Scene Summary", elem_id = "output")
|
| 517 |
explanation_output = gr.Textbox(label="π Scene Explanation", lines=6, elem_id="output")
|
| 518 |
with gr.Group(elem_id="accordion"):
|
| 519 |
-
with gr.Row():
|
| 520 |
tts_btn = gr.Button("π Read Aloud", elem_id="tts-btn")
|
| 521 |
tts_audio = gr.Audio(label="Audio", autoplay=False,elem_classes="gr-audio")
|
| 522 |
|
| 523 |
done_btn = gr.Button("β
Done", visible=False, elem_id="done-btn")
|
| 524 |
|
| 525 |
with gr.Group(elem_id="accordion2"):
|
| 526 |
-
with gr.Row(elem_classes="
|
| 527 |
txt_file = gr.File(label="π Explanations (.txt)")
|
| 528 |
pdf_file = gr.File(label="π Scene PDF")
|
| 529 |
|
|
|
|
| 289 |
box-shadow: 0 0 6px rgba(255, 105, 180, 0.3);
|
| 290 |
outline: none;
|
| 291 |
}
|
| 292 |
+
|
| 293 |
+
.custom-rows{
|
| 294 |
+
background: #e1f5f5;
|
| 295 |
+
padding: 10px;
|
| 296 |
+
border-radius: 8px;
|
| 297 |
+
margin-bottom: 10px;
|
| 298 |
+
}
|
| 299 |
|
| 300 |
/* π Scene Image Border */
|
| 301 |
.gr-image img {
|
|
|
|
| 496 |
gr.Markdown("### β¨ Describe Your Next Scene", elem_id="accordion1")
|
| 497 |
|
| 498 |
with gr.Group(elem_id = "accordion"):
|
| 499 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 500 |
char_count = gr.Number(label="π₯ Number of Characters", precision=0, value=2, elem_id="input")
|
| 501 |
character_names = gr.Textbox(label="π§ββοΈ Character Names", elem_id="textarea")
|
| 502 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 503 |
dialogue = gr.Textbox(label="π¬ Dialogue (optional)", placeholder="e.g. 'Protect the forest!'", elem_id="textarea")
|
| 504 |
dialogue_speaker = gr.Textbox(label="π£οΈ Who says the dialogue?", placeholder="e.g. Bramble", elem_id = "txtarea")
|
| 505 |
|
| 506 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 507 |
char_styles = gr.Textbox(label="π§₯ Outfit Descriptions", placeholder="e.g. Elora wears a leafy cloak, Bramble has a warrior vest", elem_id="textarea")
|
| 508 |
char_moods = gr.Textbox(label="π Character Moods", placeholder="e.g. Elora is cautious, Bramble is brave", elem_id="textarea")
|
| 509 |
bg_style = gr.Dropdown(label="π¨ Background Style", choices=["Realistic", "Cartoon", "Fantasy", "Dark Fantasy"], value="Fantasy", elem_id="select")
|
| 510 |
with gr.Group(elem_id="accordion"):
|
| 511 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 512 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 513 |
generate_btn = gr.Button("β Generate The Scene", elem_id="generate-btn")
|
| 514 |
ai_coauthor_btn = gr.Button("π€ Let AI Write This One", elem_id="ai-write-btn")
|
| 515 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 516 |
recreate_btn = gr.Button("π Recreate The Scene", elem_id="recreate-btn")
|
| 517 |
reset_btn = gr.Button("\nβοΈ Reset", elem_id="reset-btn")
|
| 518 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 519 |
recreate_scene_index = gr.Number(label="π’ Scene Number to Recreate", precision=0, value=1, elem_id="recreate_scene_index")
|
| 520 |
|
| 521 |
status = gr.Markdown(elem_classes="gr-image")
|
|
|
|
| 523 |
summary_output = gr.Markdown(label="π Scene Summary", elem_id = "output")
|
| 524 |
explanation_output = gr.Textbox(label="π Scene Explanation", lines=6, elem_id="output")
|
| 525 |
with gr.Group(elem_id="accordion"):
|
| 526 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 527 |
tts_btn = gr.Button("π Read Aloud", elem_id="tts-btn")
|
| 528 |
tts_audio = gr.Audio(label="Audio", autoplay=False,elem_classes="gr-audio")
|
| 529 |
|
| 530 |
done_btn = gr.Button("β
Done", visible=False, elem_id="done-btn")
|
| 531 |
|
| 532 |
with gr.Group(elem_id="accordion2"):
|
| 533 |
+
with gr.Row(elem_classes="custom-rows"):
|
| 534 |
txt_file = gr.File(label="π Explanations (.txt)")
|
| 535 |
pdf_file = gr.File(label="π Scene PDF")
|
| 536 |
|