Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
c333908
1
Parent(s):
d4cf9bd
Refactor Proto Assist accordion to absorb mess
Browse files
app.py
CHANGED
@@ -759,6 +759,7 @@ with gr.Blocks() as demo:
|
|
759 |
|
760 |
with gr.Accordion("Config and Asset Assistance - Click to open", open=False):
|
761 |
with gr.Accordion("Proto Config Assist", open=False):
|
|
|
762 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
763 |
gr.Markdown("# Story and Timeline Generator")
|
764 |
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")
|
@@ -768,12 +769,20 @@ with gr.Blocks() as demo:
|
|
768 |
with gr.Accordion("JSON with no edits"):
|
769 |
with gr.Row():
|
770 |
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
771 |
-
timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
|
|
|
|
|
|
772 |
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
773 |
with gr.Row():
|
774 |
generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
775 |
generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
776 |
generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
|
|
|
|
|
|
|
|
|
|
777 |
generate_button = gr.Button("Generate Story and Timeline (Click to get UI that will assist with JSON formatting)")
|
778 |
|
779 |
@gr.render(inputs=game_structure_output_text_with_media)
|
@@ -782,16 +791,7 @@ with gr.Blocks() as demo:
|
|
782 |
|
783 |
generate_button.click(generate_story_and_timeline, inputs=[generate_no_ui_timeline_points], outputs=[timeline_output_with_assets, story_output, game_structure_output_text_with_media]) #, generate_no_media_timeline_points, generate_with_media_check], outputs=[timeline_output_with_assets, timeline_output, story_output, game_structure_output_text_with_media, game_structure_output_text])
|
784 |
|
785 |
-
|
786 |
-
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
787 |
-
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
788 |
-
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
789 |
-
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
790 |
-
timeline_generate_button = gr.Button("Generate Random Suggestions")
|
791 |
-
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
792 |
-
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
793 |
-
|
794 |
-
timeline_generate_button.click(
|
795 |
timeline_get_random_suggestions,
|
796 |
inputs=[timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer],
|
797 |
outputs=[timeline_output_text, timeline_selected_lists_text]
|
|
|
759 |
|
760 |
with gr.Accordion("Config and Asset Assistance - Click to open", open=False):
|
761 |
with gr.Accordion("Proto Config Assist", open=False):
|
762 |
+
gr.HTML("UI can be media and all items can have media")
|
763 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
764 |
gr.Markdown("# Story and Timeline Generator")
|
765 |
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")
|
|
|
769 |
with gr.Accordion("JSON with no edits"):
|
770 |
with gr.Row():
|
771 |
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
772 |
+
#timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
773 |
+
with gr.Column():
|
774 |
+
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
775 |
+
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
776 |
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
777 |
with gr.Row():
|
778 |
generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
779 |
generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
780 |
generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
781 |
+
with gr.Row():
|
782 |
+
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
783 |
+
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
784 |
+
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
785 |
+
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
786 |
generate_button = gr.Button("Generate Story and Timeline (Click to get UI that will assist with JSON formatting)")
|
787 |
|
788 |
@gr.render(inputs=game_structure_output_text_with_media)
|
|
|
791 |
|
792 |
generate_button.click(generate_story_and_timeline, inputs=[generate_no_ui_timeline_points], outputs=[timeline_output_with_assets, story_output, game_structure_output_text_with_media]) #, generate_no_media_timeline_points, generate_with_media_check], outputs=[timeline_output_with_assets, timeline_output, story_output, game_structure_output_text_with_media, game_structure_output_text])
|
793 |
|
794 |
+
timeline_generate_button = gr.Button("Generate Random Suggestions").click(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
timeline_get_random_suggestions,
|
796 |
inputs=[timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer],
|
797 |
outputs=[timeline_output_text, timeline_selected_lists_text]
|