Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
659c0ce
1
Parent(s):
4a5b186
Each Work = Linear or Branching type for every step of the workflow
Browse files
app.py
CHANGED
@@ -866,8 +866,8 @@ with gr.Blocks() as demo:
|
|
866 |
gr.Interface(fn=TestGradioClientQwen270b, inputs="text", outputs="markdown", description="Single response test of gradio client - Qwen/Qwen2-72B-Instruct, Use for testing like using a space and duplicate for heavy testing")
|
867 |
with gr.Tab("Preview APIs"):
|
868 |
gr.HTML("July 2024 - Gemini, Cohere and Groq rate limit free APIs")
|
869 |
-
gr.Markdown("# Current Workflow = Mermaid Diagram to (1) Story to (2) JSON (through LLM and fix JSON by hand) to (
|
870 |
-
with gr.Tab("Workflow
|
871 |
with gr.Tab("Mermaid Diagram to (1) Story"):
|
872 |
gr.HTML("Below 70B seem to struggle here")
|
873 |
gr.Code(WFStage1prompt , label="Prompt Used")
|
@@ -880,10 +880,111 @@ with gr.Blocks() as demo:
|
|
880 |
with gr.Tab("Story to (2) JSON (through LLM and fix JSON by hand)"):
|
881 |
gr.HTML()
|
882 |
gr.Code(WFStage2prompt , label="Prompt Used")
|
883 |
-
with gr.Tab("JSON (through LLM and fix JSON by hand) to (3) Media prompts"):
|
884 |
-
gr.
|
885 |
-
with gr.Tab("
|
886 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
with gr.Tab("Main problem to solve - Concept combination / integration and non-linear progression planning"):
|
888 |
gr.HTML("The story and the gameplay dont have to occur at the same time - eg. ")
|
889 |
gr.Markdown("## Prompts / Mermaid diagrams to be made from the ideas for workflow")
|
@@ -901,103 +1002,6 @@ with gr.Blocks() as demo:
|
|
901 |
for key, item in examplemermaidconceptblendingstrutures.items():
|
902 |
gr.Code(item, label=key)
|
903 |
|
904 |
-
with gr.Tab("New Config Proto Assist"):
|
905 |
-
gr.HTML("Trying to abstract the process into one worflow is beyond me so multiple paths to goal (config) is the aim now")
|
906 |
-
with gr.Tab("Branching - Decisions / Timeline Creation to Story to Config Conversation"):
|
907 |
-
gr.HTML("Structures for interesting timeline progression")
|
908 |
-
gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
|
909 |
-
gr.HTML("Placeholder - Considerations - Story from the perspective of Main character or NPC in the LLM genereated story")
|
910 |
-
mermaideditoriframebtn = gr.Button("Load Mermaid Editor")
|
911 |
-
mermaideditoriframe = gr.HTML("")
|
912 |
-
mermaideditoriframebtn.click(fn=lambda x: "<iframe src='https://mermaid.live/' width='100%' height='1000px'></iframe>", outputs=mermaideditoriframe)
|
913 |
-
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
914 |
-
for key, item in mermaidstorystructures.items():
|
915 |
-
with gr.Accordion(key, open=False):
|
916 |
-
gr.Code(item, label=key)
|
917 |
-
|
918 |
-
with gr.Tab("Linear - Player List to Empty Config with Edit support"):
|
919 |
-
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
920 |
-
gr.Markdown("# Story and Timeline Generator")
|
921 |
-
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")
|
922 |
-
with gr.Row():
|
923 |
-
game_structure_output_text_with_media = gr.Code(language="json")
|
924 |
-
#game_structure_output_text = gr.Code(language="json")
|
925 |
-
with gr.Accordion("JSON with no edits"):
|
926 |
-
gr.HTML("A long game is a bunch of short games")
|
927 |
-
with gr.Row():
|
928 |
-
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered (gaps = side quests)", lines=25)
|
929 |
-
#timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
930 |
-
with gr.Column():
|
931 |
-
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
932 |
-
timeline_selected_lists_text = gr.Textbox(label="Selected Idea Lists for Inspiration", lines=2)
|
933 |
-
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
934 |
-
with gr.Row():
|
935 |
-
generate_no_story_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of story timeline points")
|
936 |
-
generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
937 |
-
#generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
938 |
-
#generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
939 |
-
with gr.Row():
|
940 |
-
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
941 |
-
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
942 |
-
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
943 |
-
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
944 |
-
# timeline_generate_button = gr.Button("Generate Random Suggestions").click(
|
945 |
-
# timeline_get_random_suggestions,
|
946 |
-
# inputs=[timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer],
|
947 |
-
# outputs=[timeline_output_text, timeline_selected_lists_text]
|
948 |
-
# )
|
949 |
-
generate_button = gr.Button("Generate Story and Timeline (Click to get UI that will assist with JSON formatting)")
|
950 |
-
|
951 |
-
@gr.render(inputs=game_structure_output_text_with_media)
|
952 |
-
def update(game_structure_output_text_with_media):
|
953 |
-
return show_elements_json_input(game_structure_output_text_with_media)
|
954 |
-
|
955 |
-
generate_button.click(generate_story_and_timeline, inputs=[generate_no_story_timeline_points, generate_no_ui_timeline_points, timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer], outputs=[timeline_output_with_assets, story_output, game_structure_output_text_with_media, timeline_output_text, timeline_selected_lists_text]) #, 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])
|
956 |
-
|
957 |
-
with gr.Tab("Linear - Machine Leaning Architectures as game maps"):
|
958 |
-
gr.HTML("Transformers, SSMs, Image and Video Generation Architectures, GANs, RNNS, etc.")
|
959 |
-
|
960 |
-
with gr.Tab("Linear - Prompt Engineering as basis for ideation process"):
|
961 |
-
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")
|
962 |
-
gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
|
963 |
-
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)")
|
964 |
-
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)")
|
965 |
-
gr.HTML("Can use song lyrics as thematic source")
|
966 |
-
gr.HTML("Placeholder for each below prompt getting a Textbox")
|
967 |
-
# for item in Storycraftprompts:
|
968 |
-
# input = gr.State(item)
|
969 |
-
# output = gr.Textbox("", label=item)
|
970 |
-
# outputbtn = gr.Button(item).click(fn=llmguide_generate_response, inputs=input, outputs=output)
|
971 |
-
for i, item in enumerate(Storycraftprompts, 1):
|
972 |
-
input = gr.State(item)
|
973 |
-
previous_input = gr.State(lambda: LinPEWFprevious_messages)
|
974 |
-
output = gr.Textbox("", label=f"Output {i}")
|
975 |
-
|
976 |
-
def LinPEWF_update_and_generate(prompt, prev_msgs):
|
977 |
-
prev_msgs.append(prompt)
|
978 |
-
formatted_prompt = LinPEWFformat_prompt(prompt, prev_msgs)
|
979 |
-
response = llmguide_generate_response(formatted_prompt)
|
980 |
-
full_response = ""
|
981 |
-
for chunk in response:
|
982 |
-
full_response += chunk
|
983 |
-
prev_msgs.append(f"Response: {full_response}")
|
984 |
-
return full_response
|
985 |
-
|
986 |
-
outputbtn = gr.Button(f"Generate {i}").click(
|
987 |
-
fn=LinPEWF_update_and_generate,
|
988 |
-
inputs=[input, previous_input],
|
989 |
-
outputs=output
|
990 |
-
)
|
991 |
-
|
992 |
-
LinPEWFprevious_messages.append(item)
|
993 |
-
|
994 |
-
#with gr.Accordion("Decisions / Timeline Creation to Story to Config Conversation", open=False):
|
995 |
-
with gr.Tab("Branching - Network analysis to Game config"):
|
996 |
-
gr.HTML("Placeholder for analysing multiple stories for their network structures and creating general rules for a strucutre generator based of named entity recognition and bias to locations or people - The extreme long way")
|
997 |
-
|
998 |
-
with gr.Tab("Linear - Chess PNG to Game config"):
|
999 |
-
gr.HTML("Any Chess match can serve as end of game final battle")
|
1000 |
-
|
1001 |
with gr.Tab("Existing Config Crafting Progression"):
|
1002 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
1003 |
gr.HTML("Placeholder for changing the render below to the one above for new config but with the ability to upload files aka the media field should be file uploader / dropdowns for all files that have been uploaded")
|
@@ -1266,7 +1270,7 @@ Creating more diverse paths through the game""")
|
|
1266 |
"--Multiple Models--", "https://lmsys-gpt-4o-mini-battles.hf.space", "https://labs.perplexity.ai/", "https://chat.lmsys.org", "https://sdk.vercel.ai/docs", "https://cyzgab-catch-me-if-you-can.hf.space",
|
1267 |
"--70B and above--", "https://llamameta-llama3-1-405b.static.hf.space", "https://qwen-qwen-max-0428.hf.space", "https://cohereforai-c4ai-command-r-plus.hf.space", "https://qwen-qwen1-5-110b-chat-demo.hf.space", "https://snowflake-snowflake-arctic-st-demo.hf.space", "https://databricks-dbrx-instruct.hf.space", "https://qwen-qwen1-5-72b-chat.hf.space",
|
1268 |
"--20B and above--", "https://gokaygokay-gemma-2-llamacpp.hf.space", "https://01-ai-yi-34b-chat.hf.space", "https://cohereforai-c4ai-command-r-v01.hf.space", "https://ehristoforu-mixtral-46-7b-chat.hf.space", "https://mosaicml-mpt-30b-chat.hf.space",
|
1269 |
-
"--7B and above--", "https://vilarin-mistral-nemo.hf.space", "https://vilarin-llama-3-1-8b-instruct.hf.space", "https://ysharma-chat-with-meta-llama3-8b.hf.space", "https://qwen-qwen1-5-moe-a2-7b-chat-demo.hf.space", "https://deepseek-ai-deepseek-coder-7b-instruct.hf.space", "https://osanseviero-mistral-super-fast.hf.space", "https://artificialguybr-qwen-14b-chat-demo.hf.space", "https://huggingface-projects-llama-2-7b-chat.hf.space",
|
1270 |
"--1B and above--", "https://huggingface.co/spaces/eswardivi/Phi-3-mini-128k-instruct", "https://eswardivi-phi-3-mini-4k-instruct.hf.space", "https://stabilityai-stablelm-2-1-6b-zephyr.hf.space",
|
1271 |
"--under 1B--", "unorganised", "https://ysharma-zephyr-playground.hf.space", "https://huggingfaceh4-zephyr-chat.hf.space", "https://ysharma-explore-llamav2-with-tgi.hf.space", "https://huggingfaceh4-falcon-chat.hf.space", "https://uwnlp-guanaco-playground-tgi.hf.space", "https://stabilityai-stablelm-tuned-alpha-chat.hf.space", "https://mosaicml-mpt-7b-storywriter.hf.space", "https://huggingfaceh4-starchat-playground.hf.space", "https://bigcode-bigcode-playground.hf.space", "https://mosaicml-mpt-7b-chat.hf.space", "https://huggingchat-chat-ui.hf.space", "https://togethercomputer-openchatkit.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
1272 |
chatspacebtn = gr.Button("Use the chosen URL to load interface with a chat model. For sdk.vercel click the chat button on the top left. For lymsys / chat arena copy the link and use a new tab")
|
|
|
866 |
gr.Interface(fn=TestGradioClientQwen270b, inputs="text", outputs="markdown", description="Single response test of gradio client - Qwen/Qwen2-72B-Instruct, Use for testing like using a space and duplicate for heavy testing")
|
867 |
with gr.Tab("Preview APIs"):
|
868 |
gr.HTML("July 2024 - Gemini, Cohere and Groq rate limit free APIs")
|
869 |
+
gr.Markdown("# Current Workflow = Mermaid Diagram to (1) Story to (2) Initial JSON (through LLM and fix JSON by hand) to JSON Corrections (through LLM and fix JSON by hand) to (4) Media prompts to (5) Asset Generation to (6) JSON Media field population")
|
870 |
+
with gr.Tab("Workflow Piplines"):
|
871 |
with gr.Tab("Mermaid Diagram to (1) Story"):
|
872 |
gr.HTML("Below 70B seem to struggle here")
|
873 |
gr.Code(WFStage1prompt , label="Prompt Used")
|
|
|
880 |
with gr.Tab("Story to (2) JSON (through LLM and fix JSON by hand)"):
|
881 |
gr.HTML()
|
882 |
gr.Code(WFStage2prompt , label="Prompt Used")
|
883 |
+
with gr.Tab("Initial JSON (through LLM and fix JSON by hand) to (3) Media prompts"):
|
884 |
+
gr.Code("Lets a make a list for the prompts we will use to make media objects in this JSON: ", label="prompt used")
|
885 |
+
with gr.Tab("JSON Corrections (through LLM and fix JSON by hand) to (4) Media prompts"):
|
886 |
+
gr.Code("Lets a make a list for the prompts we will use to make media objects in this JSON: ", label="prompt used")
|
887 |
+
with gr.Tab("Media prompts to (5) Asset Generation"):
|
888 |
+
gr.HTML("Model switch across modalities order to complete eg. ")
|
889 |
+
with gr.Tab("Asset Generation to (6) JSON Media field population"):
|
890 |
+
gr.HTML("Model switch across modalities order to complete eg. ")
|
891 |
+
with gr.Tab("New Config Proto Assist"):
|
892 |
+
gr.HTML("Trying to abstract the process into one worflow is beyond me so multiple paths to goal (config) is the aim now")
|
893 |
+
with gr.Tab("Branching - Decisions / Timeline Creation to Story to Config Conversation"):
|
894 |
+
gr.HTML("Structures for interesting timeline progression")
|
895 |
+
gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
|
896 |
+
gr.HTML("Placeholder - Considerations - Story from the perspective of Main character or NPC in the LLM genereated story")
|
897 |
+
mermaideditoriframebtn = gr.Button("Load Mermaid Editor")
|
898 |
+
mermaideditoriframe = gr.HTML("")
|
899 |
+
mermaideditoriframebtn.click(fn=lambda x: "<iframe src='https://mermaid.live/' width='100%' height='1000px'></iframe>", outputs=mermaideditoriframe)
|
900 |
+
with gr.Accordion("Mermaid Structures - click to open", open=False):
|
901 |
+
for key, item in mermaidstorystructures.items():
|
902 |
+
with gr.Accordion(key, open=False):
|
903 |
+
gr.Code(item, label=key)
|
904 |
+
|
905 |
+
with gr.Tab("Linear - Player List to Empty Config with Edit support"):
|
906 |
+
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now", open=False):
|
907 |
+
gr.Markdown("# Story and Timeline Generator")
|
908 |
+
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")
|
909 |
+
with gr.Row():
|
910 |
+
game_structure_output_text_with_media = gr.Code(language="json")
|
911 |
+
#game_structure_output_text = gr.Code(language="json")
|
912 |
+
with gr.Accordion("JSON with no edits"):
|
913 |
+
gr.HTML("A long game is a bunch of short games")
|
914 |
+
with gr.Row():
|
915 |
+
timeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered (gaps = side quests)", lines=25)
|
916 |
+
#timeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
917 |
+
with gr.Column():
|
918 |
+
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
919 |
+
timeline_selected_lists_text = gr.Textbox(label="Selected Idea Lists for Inspiration", lines=2)
|
920 |
+
story_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
921 |
+
with gr.Row():
|
922 |
+
generate_no_story_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of story timeline points")
|
923 |
+
generate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
924 |
+
#generate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
925 |
+
#generate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
926 |
+
with gr.Row():
|
927 |
+
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
928 |
+
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
929 |
+
timeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
930 |
+
timeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
931 |
+
# timeline_generate_button = gr.Button("Generate Random Suggestions").click(
|
932 |
+
# timeline_get_random_suggestions,
|
933 |
+
# inputs=[timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer],
|
934 |
+
# outputs=[timeline_output_text, timeline_selected_lists_text]
|
935 |
+
# )
|
936 |
+
generate_button = gr.Button("Generate Story and Timeline (Click to get UI that will assist with JSON formatting)")
|
937 |
+
|
938 |
+
@gr.render(inputs=game_structure_output_text_with_media)
|
939 |
+
def update(game_structure_output_text_with_media):
|
940 |
+
return show_elements_json_input(game_structure_output_text_with_media)
|
941 |
+
|
942 |
+
generate_button.click(generate_story_and_timeline, inputs=[generate_no_story_timeline_points, generate_no_ui_timeline_points, timeline_num_lists_slider, timeline_items_per_list_slider, timeline_include_existing_games, timeline_include_multiplayer], outputs=[timeline_output_with_assets, story_output, game_structure_output_text_with_media, timeline_output_text, timeline_selected_lists_text]) #, 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])
|
943 |
+
|
944 |
+
with gr.Tab("Linear - Machine Leaning Architectures as game maps"):
|
945 |
+
gr.HTML("Transformers, SSMs, Image and Video Generation Architectures, GANs, RNNS, etc.")
|
946 |
+
|
947 |
+
with gr.Tab("Linear - Prompt Engineering as basis for ideation process"):
|
948 |
+
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")
|
949 |
+
gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
|
950 |
+
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)")
|
951 |
+
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)")
|
952 |
+
gr.HTML("Can use song lyrics as thematic source")
|
953 |
+
gr.HTML("Placeholder for each below prompt getting a Textbox")
|
954 |
+
# for item in Storycraftprompts:
|
955 |
+
# input = gr.State(item)
|
956 |
+
# output = gr.Textbox("", label=item)
|
957 |
+
# outputbtn = gr.Button(item).click(fn=llmguide_generate_response, inputs=input, outputs=output)
|
958 |
+
for i, item in enumerate(Storycraftprompts, 1):
|
959 |
+
input = gr.State(item)
|
960 |
+
previous_input = gr.State(lambda: LinPEWFprevious_messages)
|
961 |
+
output = gr.Textbox("", label=f"Output {i}")
|
962 |
+
|
963 |
+
def LinPEWF_update_and_generate(prompt, prev_msgs):
|
964 |
+
prev_msgs.append(prompt)
|
965 |
+
formatted_prompt = LinPEWFformat_prompt(prompt, prev_msgs)
|
966 |
+
response = llmguide_generate_response(formatted_prompt)
|
967 |
+
full_response = ""
|
968 |
+
for chunk in response:
|
969 |
+
full_response += chunk
|
970 |
+
prev_msgs.append(f"Response: {full_response}")
|
971 |
+
return full_response
|
972 |
+
|
973 |
+
outputbtn = gr.Button(f"Generate {i}").click(
|
974 |
+
fn=LinPEWF_update_and_generate,
|
975 |
+
inputs=[input, previous_input],
|
976 |
+
outputs=output
|
977 |
+
)
|
978 |
+
|
979 |
+
LinPEWFprevious_messages.append(item)
|
980 |
+
|
981 |
+
#with gr.Accordion("Decisions / Timeline Creation to Story to Config Conversation", open=False):
|
982 |
+
with gr.Tab("Branching - Network analysis to Game config"):
|
983 |
+
gr.HTML("Placeholder for analysing multiple stories for their network structures and creating general rules for a strucutre generator based of named entity recognition and bias to locations or people - The extreme long way")
|
984 |
+
|
985 |
+
with gr.Tab("Linear - Chess PNG to Game config"):
|
986 |
+
gr.HTML("Any Chess match can serve as end of game final battle")
|
987 |
+
|
988 |
with gr.Tab("Main problem to solve - Concept combination / integration and non-linear progression planning"):
|
989 |
gr.HTML("The story and the gameplay dont have to occur at the same time - eg. ")
|
990 |
gr.Markdown("## Prompts / Mermaid diagrams to be made from the ideas for workflow")
|
|
|
1002 |
for key, item in examplemermaidconceptblendingstrutures.items():
|
1003 |
gr.Code(item, label=key)
|
1004 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1005 |
with gr.Tab("Existing Config Crafting Progression"):
|
1006 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
1007 |
gr.HTML("Placeholder for changing the render below to the one above for new config but with the ability to upload files aka the media field should be file uploader / dropdowns for all files that have been uploaded")
|
|
|
1270 |
"--Multiple Models--", "https://lmsys-gpt-4o-mini-battles.hf.space", "https://labs.perplexity.ai/", "https://chat.lmsys.org", "https://sdk.vercel.ai/docs", "https://cyzgab-catch-me-if-you-can.hf.space",
|
1271 |
"--70B and above--", "https://llamameta-llama3-1-405b.static.hf.space", "https://qwen-qwen-max-0428.hf.space", "https://cohereforai-c4ai-command-r-plus.hf.space", "https://qwen-qwen1-5-110b-chat-demo.hf.space", "https://snowflake-snowflake-arctic-st-demo.hf.space", "https://databricks-dbrx-instruct.hf.space", "https://qwen-qwen1-5-72b-chat.hf.space",
|
1272 |
"--20B and above--", "https://gokaygokay-gemma-2-llamacpp.hf.space", "https://01-ai-yi-34b-chat.hf.space", "https://cohereforai-c4ai-command-r-v01.hf.space", "https://ehristoforu-mixtral-46-7b-chat.hf.space", "https://mosaicml-mpt-30b-chat.hf.space",
|
1273 |
+
"--7B and above--", "https://vilarin-mistral-nemo.hf.space", "https://arcee-ai-arcee-scribe.hf.space", "https://vilarin-llama-3-1-8b-instruct.hf.space", "https://ysharma-chat-with-meta-llama3-8b.hf.space", "https://qwen-qwen1-5-moe-a2-7b-chat-demo.hf.space", "https://deepseek-ai-deepseek-coder-7b-instruct.hf.space", "https://osanseviero-mistral-super-fast.hf.space", "https://artificialguybr-qwen-14b-chat-demo.hf.space", "https://huggingface-projects-llama-2-7b-chat.hf.space",
|
1274 |
"--1B and above--", "https://huggingface.co/spaces/eswardivi/Phi-3-mini-128k-instruct", "https://eswardivi-phi-3-mini-4k-instruct.hf.space", "https://stabilityai-stablelm-2-1-6b-zephyr.hf.space",
|
1275 |
"--under 1B--", "unorganised", "https://ysharma-zephyr-playground.hf.space", "https://huggingfaceh4-zephyr-chat.hf.space", "https://ysharma-explore-llamav2-with-tgi.hf.space", "https://huggingfaceh4-falcon-chat.hf.space", "https://uwnlp-guanaco-playground-tgi.hf.space", "https://stabilityai-stablelm-tuned-alpha-chat.hf.space", "https://mosaicml-mpt-7b-storywriter.hf.space", "https://huggingfaceh4-starchat-playground.hf.space", "https://bigcode-bigcode-playground.hf.space", "https://mosaicml-mpt-7b-chat.hf.space", "https://huggingchat-chat-ui.hf.space", "https://togethercomputer-openchatkit.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
1276 |
chatspacebtn = gr.Button("Use the chosen URL to load interface with a chat model. For sdk.vercel click the chat button on the top left. For lymsys / chat arena copy the link and use a new tab")
|