Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
d4cf9bd
1
Parent(s):
b45a391
Refactor Proto Assist accordion to absorb mess
Browse files
app.py
CHANGED
@@ -774,7 +774,7 @@ with gr.Blocks() as demo:
|
|
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
|
778 |
|
779 |
@gr.render(inputs=game_structure_output_text_with_media)
|
780 |
def update(game_structure_output_text_with_media):
|
@@ -782,6 +782,21 @@ 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 |
with gr.Accordion("Prompt Engineering as basis for ideation process", open=False):
|
786 |
gr.HTML("Current Assited workflow idea - Story timeline events suggestions (LLM / Premade List) | Merging events with premade mermaid structures (LLM + Story Text + Mermaid Text) | Edit mermaid till satisfied (LLM + Story Text) | Ask LLM to convert to config (LLM + JSON Text) | Edit config (LLM / User with format assistance or not) | Playtest and go back to mermaaid or config if there are problems")
|
787 |
gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
|
@@ -877,20 +892,7 @@ with gr.Blocks() as demo:
|
|
877 |
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
878 |
for key, item in mermaidstorystructures.items():
|
879 |
gr.Code(item, label=key)
|
880 |
-
|
881 |
-
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
882 |
-
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
883 |
-
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
884 |
-
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
885 |
-
timeline_generate_button = gr.Button("Generate Random Suggestions")
|
886 |
-
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
887 |
-
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
888 |
-
|
889 |
-
timeline_generate_button.click(
|
890 |
-
timeline_get_random_suggestions,
|
891 |
-
inputs=[timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer],
|
892 |
-
outputs=[timeline_output_text, timeline_selected_lists_text]
|
893 |
-
)
|
894 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
895 |
gr.Markdown("Asset Generation")
|
896 |
gr.HTML("Splits by new line - The idea here was to allow for saving the file ")
|
|
|
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)
|
780 |
def update(game_structure_output_text_with_media):
|
|
|
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 |
+
with gr.Row():
|
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]
|
798 |
+
)
|
799 |
+
|
800 |
with gr.Accordion("Prompt Engineering as basis for ideation process", open=False):
|
801 |
gr.HTML("Current Assited workflow idea - Story timeline events suggestions (LLM / Premade List) | Merging events with premade mermaid structures (LLM + Story Text + Mermaid Text) | Edit mermaid till satisfied (LLM + Story Text) | Ask LLM to convert to config (LLM + JSON Text) | Edit config (LLM / User with format assistance or not) | Playtest and go back to mermaaid or config if there are problems")
|
802 |
gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
|
|
|
892 |
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
893 |
for key, item in mermaidstorystructures.items():
|
894 |
gr.Code(item, label=key)
|
895 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
897 |
gr.Markdown("Asset Generation")
|
898 |
gr.HTML("Splits by new line - The idea here was to allow for saving the file ")
|