Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
f61b6ea
1
Parent(s):
e578809
Trying to simplify
Browse files
app.py
CHANGED
@@ -116,7 +116,12 @@ def generate_story_and_timeline(include_media=True):
|
|
116 |
|
117 |
game_structure_with_media, game_structure_without_media = generate_game_structures(formatted_timeline, no_media_formatted_timeline)
|
118 |
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
media_file_types = ["image", "video", "audio"]
|
122 |
|
@@ -474,7 +479,7 @@ initgameinfo = start_game()
|
|
474 |
|
475 |
with gr.Blocks() as demo:
|
476 |
gr.HTML("""Main ideas for this space is (June 2024):
|
477 |
-
<div style="display: flex; justify-content:
|
478 |
<div style="width: 20%;">A program exist around data </div>
|
479 |
<div style="width: 20%;">We can generate almost any media data and more </div>
|
480 |
<div style="width: 20%;">llms good at short questions </div>
|
@@ -496,16 +501,20 @@ with gr.Blocks() as demo:
|
|
496 |
generate_button = gr.Button("Generate Story and Timeline")
|
497 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now"):
|
498 |
media_checkbox = gr.Checkbox(label="Include Media", value=True)
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
|
|
|
|
|
|
|
|
509 |
# with gr.Row():
|
510 |
# gr.Textbox(value=timeline_with_media, lines=4)
|
511 |
# gr.Textbox(value=timeline_without_media, lines=4)
|
@@ -655,7 +664,7 @@ with gr.Blocks() as demo:
|
|
655 |
|
656 |
with gr.Tab("Save files"):
|
657 |
gr.HTML("For Dynamic events overnight or when player is not active what can LLMS edit? <br><br>eg. Waiting for a letter from a random npc can be decided by the llm <br>eg. Improved Stats on certain days (eg. bitrthday) <br>Privacy <br>User Directed DLC eg. Rockstar Editor with local llm guide")
|
658 |
-
gr.HTML("Placeholder for huggingface spaces that can assist
|
659 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist (9b and under) <br>initial floor for testing can be https://huggingface.co/spaces/Qwen/Qwen2-0.5B-Instruct, https://huggingface.co/spaces/Qwen/Qwen2-1.5b-instruct-demo, https://huggingface.co/spaces/stabilityai/stablelm-2-1_6b-zephyr, https://huggingface.co/spaces/IndexTeam/Index-1.9B, https://huggingface.co/microsoft/Phi-3-mini-4k-instruct")
|
660 |
|
661 |
with gr.Tab("Images"):
|
|
|
116 |
|
117 |
game_structure_with_media, game_structure_without_media = generate_game_structures(formatted_timeline, no_media_formatted_timeline)
|
118 |
|
119 |
+
# if include_media:
|
120 |
+
# return json.dumps(game_structure_with_media, indent=2)
|
121 |
+
# else:
|
122 |
+
# return json.dumps(game_structure_without_media, indent=2)
|
123 |
+
|
124 |
+
return formatted_timeline, no_media_formatted_timeline, story, json.dumps(game_structure_with_media, indent=2), json.dumps(game_structure_without_media, indent=2) #, game_structure_with_media
|
125 |
|
126 |
media_file_types = ["image", "video", "audio"]
|
127 |
|
|
|
479 |
|
480 |
with gr.Blocks() as demo:
|
481 |
gr.HTML("""Main ideas for this space is (June 2024):
|
482 |
+
<div style="display: flex; justify-content: center; margin-bottom: 20px; align-items: center;">
|
483 |
<div style="width: 20%;">A program exist around data </div>
|
484 |
<div style="width: 20%;">We can generate almost any media data and more </div>
|
485 |
<div style="width: 20%;">llms good at short questions </div>
|
|
|
501 |
generate_button = gr.Button("Generate Story and Timeline")
|
502 |
with gr.Accordion("Can copy in the Test Example State Machine tab - only linear path for now"):
|
503 |
media_checkbox = gr.Checkbox(label="Include Media", value=True)
|
504 |
+
with gr.Row():
|
505 |
+
game_structure_output_text_with_media = gr.Code(language="json")
|
506 |
+
game_structure_output_text = gr.Code(language="json")
|
507 |
+
# screen_game_structure_with_media = gr.State()
|
508 |
+
# screen_game_structure_without_media = gr.State()
|
509 |
+
|
510 |
+
# media_checkbox.change(
|
511 |
+
# fn=show_game_structure,
|
512 |
+
# inputs=[media_checkbox, screen_game_structure_with_media, screen_game_structure_without_media],
|
513 |
+
# outputs=[game_structure_output_text]
|
514 |
+
# )
|
515 |
+
|
516 |
+
|
517 |
+
generate_button.click(generate_story_and_timeline, inputs=[], outputs=[timeline_output_with_assets, timeline_output, story_output, game_structure_output_text_with_media, game_structure_output_text]) #screen_game_structure_with_media, screen_game_structure_without_media, game_structure_output_text])
|
518 |
# with gr.Row():
|
519 |
# gr.Textbox(value=timeline_with_media, lines=4)
|
520 |
# gr.Textbox(value=timeline_without_media, lines=4)
|
|
|
664 |
|
665 |
with gr.Tab("Save files"):
|
666 |
gr.HTML("For Dynamic events overnight or when player is not active what can LLMS edit? <br><br>eg. Waiting for a letter from a random npc can be decided by the llm <br>eg. Improved Stats on certain days (eg. bitrthday) <br>Privacy <br>User Directed DLC eg. Rockstar Editor with local llm guide")
|
667 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/nvidia/Nemotron-4-340B-Instruct (Purpose is supposed to be synthetic data generation) ")
|
668 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist (9b and under) <br>initial floor for testing can be https://huggingface.co/spaces/Qwen/Qwen2-0.5B-Instruct, https://huggingface.co/spaces/Qwen/Qwen2-1.5b-instruct-demo, https://huggingface.co/spaces/stabilityai/stablelm-2-1_6b-zephyr, https://huggingface.co/spaces/IndexTeam/Index-1.9B, https://huggingface.co/microsoft/Phi-3-mini-4k-instruct")
|
669 |
|
670 |
with gr.Tab("Images"):
|