Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
53451fe
1
Parent(s):
fae3ef9
Story Prompts as front end test
Browse files- app.py +10 -9
- relatively_constant_variables.py +5 -0
app.py
CHANGED
@@ -757,14 +757,14 @@ with gr.Blocks() as demo:
|
|
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 |
with gr.Accordion("Prompt Engineering as basis for ideation process"):
|
761 |
gr.HTML("Can use song lyrics as thematic source")
|
762 |
gr.HTML("Placeholder for each below prompt getting a Textbox")
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
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)")
|
768 |
|
769 |
with gr.Accordion("Old Ideas to merge", open=False):
|
770 |
gr.HTML("Random Scenario / Song to 'full game' manual or auto is end goal ")
|
@@ -849,10 +849,11 @@ Great, Next for each sentence make decisions for a player in a text game""")
|
|
849 |
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
850 |
for key, item in mermaidstorystructures.items():
|
851 |
gr.Code(item, label=key)
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
|
|
856 |
timeline_generate_button = gr.Button("Generate Random Suggestions")
|
857 |
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
858 |
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
|
|
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("")
|
767 |
+
outputbtn = gr.Button(item).click(fn=llmguide_generate_response, inputs=item, outputs=output)
|
|
|
768 |
|
769 |
with gr.Accordion("Old Ideas to merge", open=False):
|
770 |
gr.HTML("Random Scenario / Song to 'full game' manual or auto is end goal ")
|
|
|
849 |
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
850 |
for key, item in mermaidstorystructures.items():
|
851 |
gr.Code(item, label=key)
|
852 |
+
with gr.Row():
|
853 |
+
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
854 |
+
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
855 |
+
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
856 |
+
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
857 |
timeline_generate_button = gr.Button("Generate Random Suggestions")
|
858 |
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
859 |
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
relatively_constant_variables.py
CHANGED
@@ -190,6 +190,11 @@ FAQAllprompts = {
|
|
190 |
],
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
193 |
# Sample knowledge base (replace with your own data)
|
194 |
knowledge_base = [
|
195 |
{"id": "doc1", "content": "The capital of France is Paris."},
|
|
|
190 |
],
|
191 |
}
|
192 |
|
193 |
+
Storycraftprompts = ["Write a 3 sentence story",
|
194 |
+
"Great, Lets rewrite the story (keep as much of it as possible) with F1 as our thematic source",
|
195 |
+
"Great, Next for each sentence make decisions for a player in a text game"]
|
196 |
+
|
197 |
+
|
198 |
# Sample knowledge base (replace with your own data)
|
199 |
knowledge_base = [
|
200 |
{"id": "doc1", "content": "The capital of France is Paris."},
|