Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
16eaa95
1
Parent(s):
e1c091b
editing placeholder debug
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def generate_story_and_timeline(include_media=True):
|
|
120 |
|
121 |
game_structure_with_media, game_structure_without_media = generate_game_structures(formatted_timeline, no_media_formatted_timeline)
|
122 |
|
123 |
-
return formatted_timeline, no_media_formatted_timeline, story, json.dumps(game_structure_with_media, indent=2), json.dumps(game_structure_without_media, indent=2)
|
124 |
|
125 |
media_file_types = ["image", "video", "audio"]
|
126 |
|
@@ -614,26 +614,24 @@ with gr.Blocks() as demo:
|
|
614 |
gr.Markdown("# Story and Timeline Generator")
|
615 |
gr.Markdown("Click the button to generate a random timeline and story based on UI elements and story events. <br>Ask an LLM to use this to write a story around")
|
616 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
617 |
-
with gr.
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
626 |
|
627 |
-
|
628 |
-
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
629 |
-
timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
630 |
-
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
631 |
-
#gr.Textbox("Do all fit on same row")
|
632 |
-
|
633 |
-
generate_button = gr.Button("Generate Story and Timeline")
|
634 |
-
generate_button.click(generate_story_and_timeline, inputs=[], outputs=[timeline_output_with_assets, timeline_output, story_output, game_structure_output_text_with_media, game_structure_output_text, json_input_game_structure_output_text_with_media])
|
635 |
|
636 |
-
gr.HTML("Splits by new line")
|
637 |
input_text = gr.Textbox(label="Input Text", lines=10)
|
638 |
output_group = gr.Group()
|
639 |
|
|
|
120 |
|
121 |
game_structure_with_media, game_structure_without_media = generate_game_structures(formatted_timeline, no_media_formatted_timeline)
|
122 |
|
123 |
+
return formatted_timeline, no_media_formatted_timeline, story, json.dumps(game_structure_with_media, indent=2), json.dumps(game_structure_without_media, indent=2) #, game_structure_with_media
|
124 |
|
125 |
media_file_types = ["image", "video", "audio"]
|
126 |
|
|
|
614 |
gr.Markdown("# Story and Timeline Generator")
|
615 |
gr.Markdown("Click the button to generate a random timeline and story based on UI elements and story events. <br>Ask an LLM to use this to write a story around")
|
616 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
617 |
+
with gr.Accordion("JSON with no edits"):
|
618 |
+
with gr.Row():
|
619 |
+
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
620 |
+
timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
621 |
+
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
622 |
+
with gr.Row():
|
623 |
+
game_structure_output_text_with_media = gr.Code(language="json")
|
624 |
+
game_structure_output_text = gr.Code(language="json")
|
625 |
+
|
626 |
+
generate_button = gr.Button("Generate Story and Timeline")
|
627 |
+
gr.HTML("Editing placeholder")
|
628 |
+
@gr.render(inputs=game_structure_output_text_with_media)
|
629 |
+
def update(game_structure_output_text_with_media):
|
630 |
+
return show_elements_json_input(game_structure_output_text_with_media)
|
631 |
|
632 |
+
generate_button.click(generate_story_and_timeline, inputs=[], outputs=[timeline_output_with_assets, timeline_output, story_output, game_structure_output_text_with_media, game_structure_output_text])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
|
634 |
+
gr.HTML("Splits by new line - The idea here was to allow for saving the file ")
|
635 |
input_text = gr.Textbox(label="Input Text", lines=10)
|
636 |
output_group = gr.Group()
|
637 |
|