kwabs22 commited on
Commit
da445d4
·
1 Parent(s): 9bc2564

Refactor Proto Assist accordion to absorb mess

Browse files
Files changed (2) hide show
  1. app.py +29 -29
  2. relatively_constant_variables.py +1 -1
app.py CHANGED
@@ -754,17 +754,40 @@ with gr.Blocks() as demo:
754
  </div>""")
755
 
756
  with gr.Accordion("Config and Asset Assistance - Click to open", open=False):
757
- 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")
758
- gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
759
- gr.HTML("Things that can change the workflow - Asset First (Make Asset and make the transitions using LLM), Export First (Custom JS config, Playcanvas, Unreal Engine reverse engineered to this spaces config?) Game Mechanics First (eg. Player Stats, Inventory and NPCS not implemented yet, so traversal type games best aka graph like structures)")
760
- gr.HTML("Config writing = Remix old one, Ask LLM to make one, Endless combination testing using the prompt engineering above or writing by hand (prompt engineering on yourself)")
761
- with gr.Accordion("Prompt Engineering as basis for ideation process"):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  gr.HTML("Can use song lyrics as thematic source")
763
  gr.HTML("Placeholder for each below prompt getting a Textbox")
764
  for item in Storycraftprompts:
765
  input = gr.State(item)
766
  output = gr.Textbox("", label=item)
767
- print(type(item))
768
  outputbtn = gr.Button(item).click(fn=llmguide_generate_response, inputs=input, outputs=output)
769
 
770
  with gr.Accordion("Old Ideas to merge", open=False):
@@ -873,29 +896,6 @@ with gr.Blocks() as demo:
873
  @gr.render(inputs=input_text)
874
  def update(text):
875
  return show_elements(text)
876
- with gr.Accordion("Proto Config Assist"):
877
- with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
878
- gr.Markdown("# Story and Timeline Generator")
879
- 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")
880
- with gr.Row():
881
- game_structure_output_text_with_media = gr.Code(language="json")
882
- game_structure_output_text = gr.Code(language="json")
883
- with gr.Accordion("JSON with no edits"):
884
- with gr.Row():
885
- timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
886
- timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
887
- story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
888
- with gr.Row():
889
- generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
890
- generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
891
- generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
892
- generate_button = gr.Button("Generate Story and Timeline")
893
-
894
- @gr.render(inputs=game_structure_output_text_with_media)
895
- def update(game_structure_output_text_with_media):
896
- return show_elements_json_input(game_structure_output_text_with_media)
897
-
898
- generate_button.click(generate_story_and_timeline, inputs=[generate_no_ui_timeline_points, 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])
899
 
900
  with gr.Accordion("Existing Config Crafting Progression - click to open", open=False):
901
  with gr.Tab("Quick Ways to evaluate current config"):
 
754
  </div>""")
755
 
756
  with gr.Accordion("Config and Asset Assistance - Click to open", open=False):
757
+ with gr.Accordion("Proto Config Assist", open=False):
758
+ with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
759
+ gr.Markdown("# Story and Timeline Generator")
760
+ 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")
761
+ with gr.Row():
762
+ game_structure_output_text_with_media = gr.Code(language="json")
763
+ game_structure_output_text = gr.Code(language="json")
764
+ with gr.Accordion("JSON with no edits"):
765
+ with gr.Row():
766
+ timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
767
+ timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
768
+ story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
769
+ with gr.Row():
770
+ generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
771
+ generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
772
+ generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
773
+ generate_button = gr.Button("Generate Story and Timeline")
774
+
775
+ @gr.render(inputs=game_structure_output_text_with_media)
776
+ def update(game_structure_output_text_with_media):
777
+ return show_elements_json_input(game_structure_output_text_with_media)
778
+
779
+ generate_button.click(generate_story_and_timeline, inputs=[generate_no_ui_timeline_points, 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])
780
+
781
+ with gr.Accordion("Prompt Engineering as basis for ideation process", open=False):
782
+ 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")
783
+ gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
784
+ gr.HTML("Things that can change the workflow - Asset First (Make Asset and make the transitions using LLM), Export First (Custom JS config, Playcanvas, Unreal Engine reverse engineered to this spaces config?) Game Mechanics First (eg. Player Stats, Inventory and NPCS not implemented yet, so traversal type games best aka graph like structures)")
785
+ gr.HTML("Config writing = Remix old one, Ask LLM to make one, Endless combination testing using the prompt engineering above or writing by hand (prompt engineering on yourself)")
786
  gr.HTML("Can use song lyrics as thematic source")
787
  gr.HTML("Placeholder for each below prompt getting a Textbox")
788
  for item in Storycraftprompts:
789
  input = gr.State(item)
790
  output = gr.Textbox("", label=item)
 
791
  outputbtn = gr.Button(item).click(fn=llmguide_generate_response, inputs=input, outputs=output)
792
 
793
  with gr.Accordion("Old Ideas to merge", open=False):
 
896
  @gr.render(inputs=input_text)
897
  def update(text):
898
  return show_elements(text)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
899
 
900
  with gr.Accordion("Existing Config Crafting Progression - click to open", open=False):
901
  with gr.Tab("Quick Ways to evaluate current config"):
relatively_constant_variables.py CHANGED
@@ -1,6 +1,6 @@
1
  """ Variables moved to make reading a bit easier
2
  ctrl+f - #-------------------------#-------------------------#-------------------------#-------------------------
3
- FAQ and RAG data
4
  Default Config - JS config
5
  Autostructure suggestor?
6
  Initial Game Config
 
1
  """ Variables moved to make reading a bit easier
2
  ctrl+f - #-------------------------#-------------------------#-------------------------#-------------------------
3
+ FAQ and RAG data and prompt engineering
4
  Default Config - JS config
5
  Autostructure suggestor?
6
  Initial Game Config