Spaces:
Sleeping
Sleeping
kwabs22
commited on
Commit
·
fea8c78
1
Parent(s):
7522136
Passing variables in workflow
Browse files- app.py +31 -27
- relatively_constant_variables.py +3 -3
app.py
CHANGED
@@ -860,7 +860,7 @@ with gr.Blocks() as demo:
|
|
860 |
)
|
861 |
|
862 |
with gr.Accordion("New Config Proto Assist - Trying to abstract the process into one worflow is beyond me so multiple paths to goal (config) is the aim now", open=False):
|
863 |
-
with gr.Tab("Linear - List to Empty Config with Edit support"):
|
864 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
865 |
gr.Markdown("# Story and Timeline Generator")
|
866 |
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")
|
@@ -874,7 +874,7 @@ with gr.Blocks() as demo:
|
|
874 |
#timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
875 |
with gr.Column():
|
876 |
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
877 |
-
timeline_selected_lists_text = gr.Textbox(label="Selected Lists", lines=2)
|
878 |
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
879 |
with gr.Row():
|
880 |
generate_no_story_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of story timeline points")
|
@@ -1128,6 +1128,13 @@ Creating more diverse paths through the game""")
|
|
1128 |
|
1129 |
with gr.Tab("Semi-Auto - Edit config while playing game"):
|
1130 |
gr.HTML("-- Incomplete -- (also generate_story_and_timeline refactored) Issue here is updating all variables <br> Current problem is passing values from rendered items to the config box <br>Generate Timline also makes config without mmedia key <br>Need a way have dropdowns for the filelist and transitions eg. changing transitions must auto update choices <br>Config to components has hardcoded variables based on the auto gen so changes break it")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1131 |
with gr.Row():
|
1132 |
with gr.Column(scale=1):
|
1133 |
with gr.Group():
|
@@ -1159,32 +1166,29 @@ Creating more diverse paths through the game""")
|
|
1159 |
inputs=[ewpwachoices, ewpwagame_session, ewpwamediabool],
|
1160 |
outputs=[ewpwadescription, ewpwachoices, ewpwagame_log, ewpwagame_session, ewpwamedia]
|
1161 |
)
|
1162 |
-
with gr.Column(scale=1):
|
1163 |
-
gr.Markdown("# Debugging")
|
1164 |
-
ewpwaerror_box = gr.Textbox(label="Path Errors", lines=4, value=path_errors)
|
1165 |
-
ewpwacustom_config = gr.Textbox(label="Custom Configuration (JSON)", value=json.dumps(all_states, default=lambda o: o.__dict__, indent=2), lines=8)
|
1166 |
-
ewpwacustom_configbtn = gr.Button("Load Custom Config")
|
1167 |
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
gr.
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1179 |
with gr.Row():
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
ewpgenerate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
1185 |
-
ewpgenerate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
1186 |
-
ewpgenerate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
1187 |
-
ewpgenerate_button = gr.Button("Generate Story and Timeline")
|
1188 |
|
1189 |
@gr.render(inputs=ewpwacustom_config) #ewpgame_structure_output_text_with_media
|
1190 |
def update(ewpwacustom_config):
|
@@ -1442,7 +1446,7 @@ Creating more diverse paths through the game""")
|
|
1442 |
gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
|
1443 |
gr.HTML("Price - Coding - https://aider.chat/docs/leaderboards/ - https://www.deepseek.com/ 0.3 per million - is this per token or chinese character as that means converting code to chinese if possible can save api cost?")
|
1444 |
with gr.Tab("Asset loading test"):
|
1445 |
-
gr.HTML("SDXL (linoyts/scribble-sdxl-flash), SVD and Stable Audio used for the test assets (For commercial use need a licence)")
|
1446 |
with gr.Row():
|
1447 |
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
1448 |
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
|
|
860 |
)
|
861 |
|
862 |
with gr.Accordion("New Config Proto Assist - Trying to abstract the process into one worflow is beyond me so multiple paths to goal (config) is the aim now", open=False):
|
863 |
+
with gr.Tab("Linear - Player List to Empty Config with Edit support"):
|
864 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
865 |
gr.Markdown("# Story and Timeline Generator")
|
866 |
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")
|
|
|
874 |
#timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
875 |
with gr.Column():
|
876 |
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
877 |
+
timeline_selected_lists_text = gr.Textbox(label="Selected Idea Lists for Inspiration", lines=2)
|
878 |
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
879 |
with gr.Row():
|
880 |
generate_no_story_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of story timeline points")
|
|
|
1128 |
|
1129 |
with gr.Tab("Semi-Auto - Edit config while playing game"):
|
1130 |
gr.HTML("-- Incomplete -- (also generate_story_and_timeline refactored) Issue here is updating all variables <br> Current problem is passing values from rendered items to the config box <br>Generate Timline also makes config without mmedia key <br>Need a way have dropdowns for the filelist and transitions eg. changing transitions must auto update choices <br>Config to components has hardcoded variables based on the auto gen so changes break it")
|
1131 |
+
with gr.Column(scale=1):
|
1132 |
+
gr.Markdown("# Debugging")
|
1133 |
+
with gr.Row():
|
1134 |
+
ewpwaerror_box = gr.Textbox(label="Path Errors", lines=4, value=path_errors)
|
1135 |
+
ewpwacustom_config = gr.Textbox(label="Custom Configuration (JSON)", value=json.dumps(all_states, default=lambda o: o.__dict__, indent=2), lines=4)
|
1136 |
+
ewpwacustom_configbtn = gr.Button("Load Custom Config")
|
1137 |
+
|
1138 |
with gr.Row():
|
1139 |
with gr.Column(scale=1):
|
1140 |
with gr.Group():
|
|
|
1166 |
inputs=[ewpwachoices, ewpwagame_session, ewpwamediabool],
|
1167 |
outputs=[ewpwadescription, ewpwachoices, ewpwagame_log, ewpwagame_session, ewpwamedia]
|
1168 |
)
|
|
|
|
|
|
|
|
|
|
|
1169 |
|
1170 |
+
ewpwacustom_configbtn.click(
|
1171 |
+
load_game,
|
1172 |
+
inputs=[ewpwacustom_config, ewpwamediabool],
|
1173 |
+
outputs=[ewpwaerror_box, ewpwagame_log, ewpwadescription, ewpwachoices, ewpwacustom_config, ewpwagame_session, ewpwamedia]
|
1174 |
+
)
|
1175 |
+
|
1176 |
+
with gr.Accordion("Generate a new config", open=False):
|
1177 |
+
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
1178 |
+
gr.Markdown("# Story and Timeline Generator")
|
1179 |
+
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")
|
1180 |
+
with gr.Row():
|
1181 |
+
ewpgame_structure_output_text_with_media = gr.Code(language="json")
|
1182 |
+
ewpgame_structure_output_text = gr.Code(language="json")
|
1183 |
+
with gr.Row():
|
1184 |
+
ewptimeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
1185 |
+
ewptimeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
1186 |
+
ewpstory_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
1187 |
with gr.Row():
|
1188 |
+
ewpgenerate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
1189 |
+
ewpgenerate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
1190 |
+
ewpgenerate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
1191 |
+
ewpgenerate_button = gr.Button("Generate Story and Timeline")
|
|
|
|
|
|
|
|
|
1192 |
|
1193 |
@gr.render(inputs=ewpwacustom_config) #ewpgame_structure_output_text_with_media
|
1194 |
def update(ewpwacustom_config):
|
|
|
1446 |
gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
|
1447 |
gr.HTML("Price - Coding - https://aider.chat/docs/leaderboards/ - https://www.deepseek.com/ 0.3 per million - is this per token or chinese character as that means converting code to chinese if possible can save api cost?")
|
1448 |
with gr.Tab("Asset loading test"):
|
1449 |
+
gr.HTML("SDXL (linoyts/scribble-sdxl-flash), SVD and Stable Audio used for the test assets (For commercial use need a licence) <br>testmedia/")
|
1450 |
with gr.Row():
|
1451 |
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
1452 |
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
relatively_constant_variables.py
CHANGED
@@ -1239,9 +1239,9 @@ all_idea_lists = [
|
|
1239 |
|
1240 |
# List names for reference
|
1241 |
list_names = [
|
1242 |
-
"GTA Heists
|
1243 |
-
"Cyberpunk RED
|
1244 |
-
"Survival Mechanics
|
1245 |
]
|
1246 |
|
1247 |
#-------------------------#-------------------------#-------------------------#-------------------------
|
|
|
1239 |
|
1240 |
# List names for reference
|
1241 |
list_names = [
|
1242 |
+
"GTA Heists observations", "Battlefront observations", "Tekken 'Casino' observations", "Tactics Games observations", "Chess observations",
|
1243 |
+
"Cyberpunk RED observations", "Community Playthrough observations", "Random Item Hunt observations",
|
1244 |
+
"Survival Mechanics observations", "Bonus Features observations", "Multiplayer Features observations"
|
1245 |
]
|
1246 |
|
1247 |
#-------------------------#-------------------------#-------------------------#-------------------------
|