kwabs22 commited on
Commit
b19b854
1 Parent(s): c6fa314

Adding some links

Browse files
Files changed (1) hide show
  1. app.py +110 -84
app.py CHANGED
@@ -33,113 +33,138 @@ def add_target(targets_items, name, x, y, collisionType, collisiontext):
33
  return targets_items
34
 
35
  with gr.Blocks() as demo:
36
- gr.HTML("Companion Space for zerogpu / client api workflow planning for a way to send a zip to the Basic Game Engine at the bottom of https://huggingface.co/spaces/KwabsHug/TestSvelteStatic")
37
- gr.HTML("Experiment for https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py inplementation with gradio client api")
38
- gr.HTML("Some conderations for future integration: https://huggingface.co/spaces/dylanebert/3d-arena, https://github.com/fudan-generative-vision/hallo")
39
  with gr.Tab("Config Creator"):
40
- inventory_items = gr.State([])
41
- skills_items = gr.State([])
42
- objectives_items = gr.State([])
43
- targets_items = gr.State([])
44
-
45
- with gr.Tabs():
46
- with gr.TabItem("Inventory"):
47
- inventory_type = gr.Textbox(label="Type")
48
- inventory_name = gr.Textbox(label="Name")
49
- inventory_description = gr.Textbox(label="Description")
50
- add_inventory = gr.Button("Add Inventory Item")
51
- inventory_textbox = gr.JSON(label="Inventory Items", value=[])
52
-
53
- with gr.TabItem("Skills"):
54
- skills_branch = gr.Textbox(label="Branch")
55
- skills_name = gr.Textbox(label="Name")
56
- skills_learned = gr.Dropdown(choices=["True", "False"], label="Learned")
57
- add_skill_button = gr.Button("Add Skill")
58
- skills_textbox = gr.JSON(label="Skills", value=[])
59
-
60
- with gr.TabItem("Objectives"):
61
- objectives_id = gr.Textbox(label="ID")
62
- objectives_name = gr.Textbox(label="Name")
63
- objectives_complete = gr.Dropdown(choices=["True", "False"], label="Complete")
64
- add_objective_button = gr.Button("Add Objective")
65
- objectives_textbox = gr.JSON(label="Objectives", value=[])
66
-
67
- with gr.TabItem("Targets"):
68
- targets_name = gr.Textbox(label="Name")
69
- targets_x = gr.Textbox(label="X Coordinate")
70
- targets_y = gr.Textbox(label="Y Coordinate")
71
- targets_collisionType = gr.Textbox(label="Collision Type")
72
- targets_collisiontext = gr.Textbox(label="Collision Text")
73
- add_target_button = gr.Button("Add Target")
74
- targets_textbox = gr.JSON(label="Targets", value=[])
75
-
76
- with gr.TabItem("Placeholders for Modal Target"):
77
- gr.HTML("Placeholder")
78
-
79
- with gr.TabItem("Placeholders for State Machine Modal Target"):
80
- gr.HTML("Placeholder")
81
-
82
- with gr.TabItem("Placeholders for Background"):
83
- gr.HTML("Placeholder")
84
-
85
- config_output = gr.JSON(label="Updated Configuration")
86
-
87
- @gr.render(inputs=[inventory_items, skills_items, objectives_items, targets_items]) #, outputs=config_output)
88
- def aggregate_config(inventory, skills, objectives, targets):
89
- config = default_config.copy()
90
- config['inventory'] = inventory
91
- config['skills'] = skills
92
- config['objectives'] = objectives
93
- config['targets'] = targets
94
- return config
95
-
96
- add_inventory.click(add_inventory_item, inputs=[inventory_items, inventory_type, inventory_name, inventory_description], outputs=inventory_textbox)
97
- add_inventory.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
98
-
99
- add_skill_button.click(add_skill, inputs=[skills_items, skills_branch, skills_name, skills_learned], outputs=skills_textbox)
100
- add_skill_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
101
-
102
- add_objective_button.click(add_objective, inputs=[objectives_items, objectives_id, objectives_name, objectives_complete], outputs=objectives_textbox)
103
- add_objective_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
104
-
105
- add_target_button.click(add_target, inputs=[targets_items, targets_name, targets_x, targets_y, targets_collisionType, targets_collisiontext], outputs=targets_textbox)
106
- add_target_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
107
-
 
 
 
 
108
  with gr.Tab("Skeleton and Asset Generation"):
109
  gr.HTML("With some ideas from gemini-1.5-flash-api-0514 and reka-flash-preview-20240611")
110
  with gr.Tab("Skeleton Generator"):
111
- gr.HTML("Some Kinds of game skeletons ideas - Timelines, Graph as State machine paths")
112
- gr.HTML("")
113
 
114
  with gr.Tab("Save files"):
115
- gr.HTML("")
 
 
116
 
117
  with gr.Tab("Images"):
118
- gr.HTML("")
119
- gr.HTML("Images = https://huggingface.co/spaces/microsoft/Promptist ")
 
 
 
 
 
120
 
121
  with gr.Tab("Audio"):
122
- gr.HTML("Music - Background, Interactive, Cutscene, Menu <br>Sound Effects - Environment, character, action (environmental triggered by user eg. gun), UI <br>Speech - Dialouge, narration, voiceover <br>")
123
  gr.HTML("Placeholder for huggingface spaces that can assist")
 
 
124
 
125
  with gr.Tab("Video"):
126
- gr.HTML("")
 
 
127
 
128
  with gr.Tab("3D"):
129
- gr.HTML("")
 
 
130
 
131
- with gr.Tab("Animations"):
132
- gr.HTML("")
 
 
133
 
134
  with gr.Tab("Fonts"):
135
- gr.HTML("")
 
 
136
 
137
  with gr.Tab("Shaders and related"):
138
- gr.HTML("")
139
-
 
 
140
 
141
  with gr.Tab("Other Considerations"):
142
  with gr.Tab("General"):
 
 
 
143
  gr.HTML("Useful Spaces and links: https://huggingface.co/spaces/artificialguybr/Stable-Audio-Open-Zero https://huggingface.co/spaces/stabilityai/TripoSR https://huggingface.co/spaces/wangfuyun/AnimateLCM-SVD https://huggingface.co/spaces/multimodalart/face-to-all https://huggingface.co/spaces/facebook/MusicGen https://huggingface.co/spaces/Doubiiu/tooncrafter")
144
 
145
  gr.HTML("https://huggingface.co/spaces/linoyts/scribble-sdxl-flash as map planner")
@@ -150,5 +175,6 @@ with gr.Blocks() as demo:
150
  gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
151
  gr.HTML("GPU (Data privacy) = No Rate limits? - https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints")
152
  gr.HTML("Speed - Groq, SambaNova, ")
 
153
 
154
  demo.launch()
 
33
  return targets_items
34
 
35
  with gr.Blocks() as demo:
36
+ gr.HTML("Companion Space for zerogpu / client api workflow planning for a way to send a zip to the Basic Game Engine at the bottom of https://huggingface.co/spaces/KwabsHug/TestSvelteStatic (Also to test how much can be done majority on cpu)")
37
+ gr.HTML("Main ideas for this space is: <br>A program exist around data <br>We can generate almost any media data and more <br>llms good at short questions <br>Time moves in a straight so all considerations are flattend by the nature of time <br>HF + Gradio allows for api use so this my prototype tool for tool use test")
 
38
  with gr.Tab("Config Creator"):
39
+ with gr.Tab("Simple Config Creator"):
40
+ inventory_items = gr.State([])
41
+ skills_items = gr.State([])
42
+ objectives_items = gr.State([])
43
+ targets_items = gr.State([])
44
+
45
+ with gr.Tabs():
46
+ with gr.TabItem("Inventory"):
47
+ inventory_type = gr.Textbox(label="Type")
48
+ inventory_name = gr.Textbox(label="Name")
49
+ inventory_description = gr.Textbox(label="Description")
50
+ add_inventory = gr.Button("Add Inventory Item")
51
+ inventory_textbox = gr.JSON(label="Inventory Items", value=[])
52
+
53
+ with gr.TabItem("Skills"):
54
+ skills_branch = gr.Textbox(label="Branch")
55
+ skills_name = gr.Textbox(label="Name")
56
+ skills_learned = gr.Dropdown(choices=["True", "False"], label="Learned")
57
+ add_skill_button = gr.Button("Add Skill")
58
+ skills_textbox = gr.JSON(label="Skills", value=[])
59
+
60
+ with gr.TabItem("Objectives"):
61
+ objectives_id = gr.Textbox(label="ID")
62
+ objectives_name = gr.Textbox(label="Name")
63
+ objectives_complete = gr.Dropdown(choices=["True", "False"], label="Complete")
64
+ add_objective_button = gr.Button("Add Objective")
65
+ objectives_textbox = gr.JSON(label="Objectives", value=[])
66
+
67
+ with gr.TabItem("Targets"):
68
+ targets_name = gr.Textbox(label="Name")
69
+ targets_x = gr.Textbox(label="X Coordinate")
70
+ targets_y = gr.Textbox(label="Y Coordinate")
71
+ targets_collisionType = gr.Textbox(label="Collision Type")
72
+ targets_collisiontext = gr.Textbox(label="Collision Text")
73
+ add_target_button = gr.Button("Add Target")
74
+ targets_textbox = gr.JSON(label="Targets", value=[])
75
+
76
+ with gr.TabItem("Placeholders for Modal Target"):
77
+ gr.HTML("Placeholder")
78
+
79
+ with gr.TabItem("Placeholders for State Machine Modal Target"):
80
+ gr.HTML("Placeholder")
81
+
82
+ with gr.TabItem("Placeholders for Background"):
83
+ gr.HTML("Placeholder")
84
+
85
+ config_output = gr.JSON(label="Updated Configuration")
86
+
87
+ @gr.render(inputs=[inventory_items, skills_items, objectives_items, targets_items]) #, outputs=config_output)
88
+ def aggregate_config(inventory, skills, objectives, targets):
89
+ config = default_config.copy()
90
+ config['inventory'] = inventory
91
+ config['skills'] = skills
92
+ config['objectives'] = objectives
93
+ config['targets'] = targets
94
+ return config
95
+
96
+ add_inventory.click(add_inventory_item, inputs=[inventory_items, inventory_type, inventory_name, inventory_description], outputs=inventory_textbox)
97
+ add_inventory.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
98
+
99
+ add_skill_button.click(add_skill, inputs=[skills_items, skills_branch, skills_name, skills_learned], outputs=skills_textbox)
100
+ add_skill_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
101
+
102
+ add_objective_button.click(add_objective, inputs=[objectives_items, objectives_id, objectives_name, objectives_complete], outputs=objectives_textbox)
103
+ add_objective_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
104
+
105
+ add_target_button.click(add_target, inputs=[targets_items, targets_name, targets_x, targets_y, targets_collisionType, targets_collisiontext], outputs=targets_textbox)
106
+ add_target_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
107
+
108
+ with gr.Tab("Advanced Config Creator"):
109
+ gr.HTML("")
110
+
111
  with gr.Tab("Skeleton and Asset Generation"):
112
  gr.HTML("With some ideas from gemini-1.5-flash-api-0514 and reka-flash-preview-20240611")
113
  with gr.Tab("Skeleton Generator"):
114
+ gr.HTML("Some Kinds of game skeletons ideas - Timelines, Graph as State machine paths, Economy ecosystem")
115
+ gr.HTML("One prompt to be used to test models - <br>Please make 10 python lists for the types of media files and their purposes in a game and then use those lists to random generate a timeline of 20 items when the function is called <br>Great next suggest ways to improve this function to create better timelines")
116
 
117
  with gr.Tab("Save files"):
118
+ 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")
119
+ gr.HTML("Placeholder for huggingface spaces that can assist ")
120
+ 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, ")
121
 
122
  with gr.Tab("Images"):
123
+ gr.HTML("Concept Art, UI elements, Static/3D Characters, Environments and Objects")
124
+ gr.HTML("Image Caption = https://huggingface.co/spaces/microsoft/Promptist, https://huggingface.co/spaces/gokaygokay/SD3-Long-Captioner, https://huggingface.co/spaces/gokaygokay/Florence-2, ")
125
+ gr.HTML("Images Generation Portraits = https://huggingface.co/spaces/okaris/omni-zero")
126
+ gr.HTML("Images Generation General = ")
127
+ gr.HTML("Images Generation Posters with text - https://huggingface.co/spaces/GlyphByT5/Glyph-SDXL-v2")
128
+ gr.HTML("Placeholder for huggingface spaces that can assist <br> https://huggingface.co/spaces/gokaygokay/Florence-2 <br>")
129
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
130
 
131
  with gr.Tab("Audio"):
132
+ gr.HTML("Music - Background, Interactive, Cutscene, Menu <br>Sound Effects - Environment, character, action (environmental triggered by user eg. gun), UI <br>Speech - Dialouge, narration, voiceover <br>The new render function means the Config can be made and iframe/api functions can be ordered as neccessary based on the part of the config that needs it to streamline workflows based on current state of config ")
133
  gr.HTML("Placeholder for huggingface spaces that can assist")
134
+ gr.HTML("Audio Sound Effects - https://huggingface.co/spaces/artificialguybr/Stable-Audio-Open-Zero")
135
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
136
 
137
  with gr.Tab("Video"):
138
+ gr.HTML("Cutscenes, Tutorials, Trailers")
139
+ gr.HTML("Placeholder for huggingface spaces that can assist")
140
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
141
 
142
  with gr.Tab("3D"):
143
+ gr.HTML("Characters, Environments, Objects")
144
+ gr.HTML("Placeholder for huggingface spaces that can assist")
145
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
146
 
147
+ with gr.Tab("Animations (for lower resource use)"):
148
+ gr.HTML("Characters, Environments, Objects")
149
+ gr.HTML("Placeholder for huggingface spaces that can assist")
150
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
151
 
152
  with gr.Tab("Fonts"):
153
+ gr.HTML("Style of whole game, or locations, or characters")
154
+ gr.HTML("Placeholder for huggingface spaces that can assist")
155
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
156
 
157
  with gr.Tab("Shaders and related"):
158
+ gr.HTML("Post-processing Effects, material effects, Particle systems, visual feedback")
159
+ gr.HTML("Visual Effects - eg. explosion can turn all items white for a moment, losing conciousness blurs whole screen")
160
+ gr.HTML("Placeholder for huggingface spaces that can assist")
161
+ gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
162
 
163
  with gr.Tab("Other Considerations"):
164
  with gr.Tab("General"):
165
+ gr.HTML("Experiment for https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py inplementation with gradio client api")
166
+ gr.HTML("Some conderations for future integration: https://huggingface.co/spaces/dylanebert/3d-arena, https://github.com/fudan-generative-vision/hallo")
167
+
168
  gr.HTML("Useful Spaces and links: https://huggingface.co/spaces/artificialguybr/Stable-Audio-Open-Zero https://huggingface.co/spaces/stabilityai/TripoSR https://huggingface.co/spaces/wangfuyun/AnimateLCM-SVD https://huggingface.co/spaces/multimodalart/face-to-all https://huggingface.co/spaces/facebook/MusicGen https://huggingface.co/spaces/Doubiiu/tooncrafter")
169
 
170
  gr.HTML("https://huggingface.co/spaces/linoyts/scribble-sdxl-flash as map planner")
 
175
  gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
176
  gr.HTML("GPU (Data privacy) = No Rate limits? - https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints")
177
  gr.HTML("Speed - Groq, SambaNova, ")
178
+ gr.HTML("Price - Coding - https://www.deepseek.com/ 0.3 per million")
179
 
180
  demo.launch()