Spaces:
Runtime error
Runtime error
kwabs22
commited on
Commit
·
f9b9206
1
Parent(s):
db5d6aa
UI reorder test
Browse files
app.py
CHANGED
|
@@ -809,15 +809,18 @@ with gr.Blocks() as demo:
|
|
| 809 |
with gr.Tab("Themes"):
|
| 810 |
gr.HTML("")
|
| 811 |
with gr.Tab("General FAQ Attempt"):
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
with gr.
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
|
|
|
|
|
|
|
|
|
| 821 |
|
| 822 |
with gr.Tab("General RAG (Pathfinder?) Attempt"):
|
| 823 |
gr.HTML("https://huggingface.co/spaces/mteb/leaderboard - Source for SOTA - current using all-MiniLM-L6-v2")
|
|
@@ -950,6 +953,9 @@ with gr.Blocks() as demo:
|
|
| 950 |
for key, item in mermaidstorystructures.items():
|
| 951 |
gr.Code(item, label=key)
|
| 952 |
|
|
|
|
|
|
|
|
|
|
| 953 |
with gr.Accordion("Existing Config Crafting Progression - click to open", open=False):
|
| 954 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
| 955 |
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")
|
|
@@ -1048,425 +1054,400 @@ Creating more diverse paths through the game""")
|
|
| 1048 |
gr.HTML("Placeholder for Config parser to allow for current zerospace creation and placement into the config (LLM can give list of media but still have to figure out workflow from there)")
|
| 1049 |
|
| 1050 |
gr.HTML("Placeholder for clearing uploaded assets (public space and temporary persistence = sharing and space problems)")
|
| 1051 |
-
|
| 1052 |
-
with gr.
|
| 1053 |
-
|
| 1054 |
-
with gr.
|
| 1055 |
-
|
| 1056 |
-
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
|
| 1063 |
-
|
| 1064 |
-
|
| 1065 |
-
|
| 1066 |
-
|
| 1067 |
-
|
| 1068 |
-
|
| 1069 |
-
|
| 1070 |
-
|
| 1071 |
-
|
| 1072 |
-
|
| 1073 |
-
|
| 1074 |
-
|
| 1075 |
-
|
| 1076 |
-
|
| 1077 |
-
|
| 1078 |
-
|
| 1079 |
-
|
| 1080 |
-
|
| 1081 |
-
|
| 1082 |
-
|
| 1083 |
-
|
| 1084 |
-
|
| 1085 |
-
|
| 1086 |
-
|
| 1087 |
-
|
| 1088 |
-
|
| 1089 |
-
|
| 1090 |
-
|
| 1091 |
-
|
| 1092 |
-
|
| 1093 |
-
|
| 1094 |
-
|
| 1095 |
-
|
| 1096 |
-
|
| 1097 |
-
|
| 1098 |
-
with gr.Group() as wamediagrouping:
|
| 1099 |
-
gr.HTML("Placeholder to load all media tests - still need to test clearing media on ")
|
| 1100 |
-
if media_items == []:
|
| 1101 |
-
gr.Markdown("No media items to display.")
|
| 1102 |
-
else:
|
| 1103 |
-
for item in media_items:
|
| 1104 |
-
render = create_media_component(item)
|
| 1105 |
-
|
| 1106 |
-
return wamediagrouping
|
| 1107 |
|
| 1108 |
-
wachoices = gr.Radio(label="Your Choices", choices=initgameinfo[1])
|
| 1109 |
-
wasubmit_btn = gr.Button("Make Choice")
|
| 1110 |
-
wagame_log = gr.Textbox(label="Game Log", lines=20, value=initgameinfo[2])
|
| 1111 |
-
wagame_session = gr.State(value=initgameinfo[3])
|
| 1112 |
-
wasubmit_btn.click(
|
| 1113 |
-
make_choice,
|
| 1114 |
-
inputs=[wachoices, wagame_session, wamediabool],
|
| 1115 |
-
outputs=[wadescription, wachoices, wagame_log, wagame_session, wamedia]
|
| 1116 |
-
)
|
| 1117 |
-
with gr.Column(scale=1):
|
| 1118 |
-
gr.Markdown("# Debugging")
|
| 1119 |
-
waerror_box = gr.Textbox(label="Path Errors", lines=4, value=path_errors)
|
| 1120 |
-
with gr.Accordion("Config (Game Spoiler and Example for llm to remix)", open=False):
|
| 1121 |
-
wacustom_config = gr.Textbox(label="Custom Configuration (JSON)", value=json.dumps(all_states, default=lambda o: o.__dict__, indent=2), lines=8)
|
| 1122 |
-
wacustom_configbtn = gr.Button("Load Custom Config")
|
| 1123 |
-
|
| 1124 |
-
wacustom_configbtn.click(
|
| 1125 |
-
load_game,
|
| 1126 |
-
inputs=[wacustom_config, wamediabool],
|
| 1127 |
-
outputs=[waerror_box, wagame_log, wadescription, wachoices, wacustom_config, wagame_session, wamedia]
|
| 1128 |
-
)
|
| 1129 |
-
|
| 1130 |
-
with gr.Tab("Semi-Auto - Edit config while playing game"):
|
| 1131 |
-
with gr.Row():
|
| 1132 |
-
gr.HTML("Current main ")
|
| 1133 |
-
gr.HTML("-- Incomplete -- Current problem is passing values from rendered items to the config box <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")
|
| 1134 |
-
with gr.Column(scale=1):
|
| 1135 |
-
gr.Markdown("# Debugging")
|
| 1136 |
with gr.Row():
|
| 1137 |
-
with gr.Column():
|
| 1138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1140 |
|
| 1141 |
-
|
| 1142 |
-
|
| 1143 |
-
|
| 1144 |
-
|
| 1145 |
-
|
| 1146 |
-
|
| 1147 |
-
|
| 1148 |
-
|
| 1149 |
-
|
| 1150 |
-
|
| 1151 |
-
|
| 1152 |
-
|
| 1153 |
-
|
| 1154 |
-
|
| 1155 |
-
|
| 1156 |
-
|
| 1157 |
-
|
| 1158 |
-
|
| 1159 |
-
|
| 1160 |
-
|
| 1161 |
-
|
| 1162 |
-
|
| 1163 |
-
|
| 1164 |
-
|
| 1165 |
-
|
| 1166 |
-
|
| 1167 |
-
|
| 1168 |
-
|
| 1169 |
-
|
| 1170 |
-
|
| 1171 |
-
|
| 1172 |
-
|
| 1173 |
-
|
| 1174 |
-
|
| 1175 |
-
|
| 1176 |
-
|
| 1177 |
-
|
| 1178 |
-
|
| 1179 |
-
|
| 1180 |
-
|
| 1181 |
-
|
| 1182 |
-
|
| 1183 |
-
|
| 1184 |
-
|
| 1185 |
-
|
| 1186 |
-
|
| 1187 |
-
|
| 1188 |
-
|
| 1189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1190 |
|
| 1191 |
-
|
| 1192 |
-
|
| 1193 |
-
|
| 1194 |
-
|
| 1195 |
-
|
| 1196 |
-
|
| 1197 |
-
|
| 1198 |
-
|
| 1199 |
-
|
| 1200 |
-
|
| 1201 |
-
|
| 1202 |
-
|
| 1203 |
-
|
| 1204 |
-
load_game,
|
| 1205 |
-
inputs=[ewpwacustom_config, ewpwamediabool],
|
| 1206 |
-
outputs=[ewpwaerror_box, ewpwagame_log, ewpwadescription, ewpwachoices, ewpwacustom_config, ewpwagame_session, ewpwamedia]
|
| 1207 |
-
)
|
| 1208 |
-
with gr.Column(scale=1):
|
| 1209 |
-
@gr.render(inputs=ewpwacustom_config) #ewpgame_structure_output_text_with_media
|
| 1210 |
-
def update(ewpwacustom_config):
|
| 1211 |
-
return show_elements_json_input(ewpwacustom_config)
|
| 1212 |
|
| 1213 |
-
|
| 1214 |
-
|
| 1215 |
-
|
| 1216 |
-
|
| 1217 |
-
|
| 1218 |
-
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
|
| 1222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1223 |
with gr.Row():
|
| 1224 |
-
|
| 1225 |
-
|
| 1226 |
-
|
| 1227 |
-
|
| 1228 |
-
"--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",
|
| 1229 |
-
"--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)
|
| 1230 |
-
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")
|
| 1231 |
-
chatspace = gr.HTML("Chat Space Chosen will load here")
|
| 1232 |
-
chatspacebtn.click(display_website, inputs=linktochat, outputs=chatspace)
|
| 1233 |
-
with gr.Tab("NPCS"):
|
| 1234 |
-
gr.HTML("For ideas on NPCS check: https://lifearchitect.ai/leta/, ")
|
| 1235 |
-
with gr.Tab("Save files"):
|
| 1236 |
-
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")
|
| 1237 |
-
gr.HTML("Some ideas - In game websites eg. GTA esp stock markets, news; ")
|
| 1238 |
-
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), https://huggingface.co/spaces/gokaygokay/Gemma-2-llamacpp ")
|
| 1239 |
-
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")
|
| 1240 |
-
with gr.Tab("Diagrams"):
|
| 1241 |
-
gr.HTML("Claude 3.5 sonnet is very good with mermaid graphs - can used for maps, situational explanations")
|
| 1242 |
-
with gr.Tab("Maths"):
|
| 1243 |
-
gr.HTML("https://huggingface.co/spaces/AI-MO/math-olympiad-solver")
|
| 1244 |
-
|
| 1245 |
-
with gr.Tab("Media Understanding"):
|
| 1246 |
-
gr.HTML("NPC Response Engines? Camera, Shopkeeper, Companion, Enemies, etc.")
|
| 1247 |
-
with gr.Accordion("Media understanding model Spaces/Sites (Click Here to Open)", open=False):
|
| 1248 |
-
with gr.Row():
|
| 1249 |
-
linktomediaunderstandingspace = gr.Dropdown(choices=[ "--Weak Audio Understanding = Audio to text, Weak Video Understanding = Video to Image to Image Understanding", "https://skalskip-florence-2-video.hf.space", "https://kingnish-opengpt-4o.hf.space",
|
| 1250 |
-
"--Video Understanding--", "https://ivgsz-flash-vstream-demo.hf.space",
|
| 1251 |
-
"--Image Understanding--", "https://qnguyen3-nanollava.hf.space", "https://skalskip-better-florence-2.hf.space", ],
|
| 1252 |
-
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1253 |
-
mediaunderstandingspacebtn = gr.Button("Use the chosen URL to load interface with a media understanding space")
|
| 1254 |
-
mediaunderstandingspace = gr.HTML("Mdeia Understanding Space Chosen will load here")
|
| 1255 |
-
mediaunderstandingspacebtn.click(display_website, inputs=linktomediaunderstandingspace, outputs=mediaunderstandingspace)
|
| 1256 |
-
|
| 1257 |
-
|
| 1258 |
-
with gr.Tab("Images"):
|
| 1259 |
-
with gr.Accordion("Image Gen or Animation HF Spaces/Sites (Click Here to Open) - Have to download and upload at the the top", open=False):
|
| 1260 |
-
# with gr.Tabs("General"):
|
| 1261 |
-
with gr.Row():
|
| 1262 |
-
linktoimagegen = gr.Dropdown(choices=["Text-Interleaved", "https://ethanchern-anole.hf.space",
|
| 1263 |
-
"--General--", "https://pixart-alpha-pixart-sigma.hf.space", "https://stabilityai-stable-diffusion-3-medium.hf.space", "https://prodia-sdxl-stable-diffusion-xl.hf.space", "https://prodia-fast-stable-diffusion.hf.space", "https://bytedance-hyper-sdxl-1step-t2i.hf.space", "https://multimodalart-cosxl.hf.space", "https://cagliostrolab-animagine-xl-3-1.hf.space", "https://stabilityai-stable-diffusion.hf.space",
|
| 1264 |
-
"--Speed--", "https://radames-real-time-text-to-image-sdxl-lightning.hf.space", "https://ap123-sdxl-lightning.hf.space",
|
| 1265 |
-
"--LORA Support--", "https://artificialguybr-artificialguybr-demo-lora.hf.space", "https://artificialguybr-studio-ghibli-lora-sdxl.hf.space", "https://artificialguybr-pixel-art-generator.hf.space", "https://fffiloni-sdxl-control-loras.hf.space", "https://ehristoforu-dalle-3-xl-lora-v2.hf.space",
|
| 1266 |
-
"--Image to Image--", "https://lllyasviel-ic-light.hf.space", "https://gparmar-img2img-turbo-sketch.hf.space",
|
| 1267 |
-
"--Control of Pose--", "https://instantx-instantid.hf.space", "https://modelscope-transferanything.hf.space", "https://okaris-omni-zero.hf.space"
|
| 1268 |
-
"--Control of Shapes--", "https://linoyts-scribble-sdxl-flash.hf.space",
|
| 1269 |
-
"--Foreign Language Input--", "https://gokaygokay-kolors.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1270 |
-
imagegenspacebtn = gr.Button("Use the chosen URL to load interface with a image generation model")
|
| 1271 |
-
|
| 1272 |
-
imagegenspace = gr.HTML("Image Space Chosen will load here")
|
| 1273 |
-
imagegenspacebtn.click(display_website, inputs=linktoimagegen, outputs=imagegenspace)
|
| 1274 |
-
|
| 1275 |
-
linkstobecollectednoembed = "https://artgan-diffusion-api.hf.space", "https://multimodalart-stable-cascade.hf.space", "https://google-sdxl.hf.space", "https://visionmaze-magic-me.hf.space", "https://segmind-segmind-stable-diffusion.hf.space", "https://simianluo-latent-consistency-model.hf.space",
|
| 1276 |
-
gr.HTML("Concept Art, UI elements, Static/3D Characters, Environments and Objects")
|
| 1277 |
-
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, ")
|
| 1278 |
-
gr.HTML("Images Generation Portraits = https://huggingface.co/spaces/okaris/omni-zero")
|
| 1279 |
-
gr.HTML("Images Generation General (3rd Party) = https://www.craiyon.com/")
|
| 1280 |
-
gr.HTML("Images Generation Posters with text - https://huggingface.co/spaces/GlyphByT5/Glyph-SDXL-v2")
|
| 1281 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/EPFL-VILAB/4M, https://huggingface.co/spaces/EPFL-VILAB/MultiMAE ")
|
| 1282 |
-
gr.HTML("SVG Generation = Coding models / SOTA LLM ")
|
| 1283 |
-
gr.HTML("Images Generation - Upscaling - https://huggingface.co/spaces/gokaygokay/Tile-Upscaler")
|
| 1284 |
-
gr.HTML("Vision Models for descriptions <br> https://huggingface.co/spaces/gokaygokay/Florence-2 <br>https://huggingface.co/spaces/vilarin/VL-Chatbox - glm 4v 9b <br>")
|
| 1285 |
-
gr.HTML("Upscalers (save data transfer costs? highly detailed characters?) - https://huggingface.co/spaces/gokaygokay/AuraSR")
|
| 1286 |
-
gr.HTML("Placeholder for huggingface spaces that can assist ")
|
| 1287 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1288 |
-
|
| 1289 |
-
with gr.Tab("Video"):
|
| 1290 |
-
with gr.Accordion("Video Spaces/Sites (Click Here to Open)", open=False):
|
| 1291 |
-
with gr.Row():
|
| 1292 |
-
linktovideogenspace = gr.Dropdown(choices=["--Genral--", "https://kadirnar-open-sora.hf.space",
|
| 1293 |
-
"--Talking Portrait--", "https://fffiloni-tts-hallo-talking-portrait.hf.space",
|
| 1294 |
-
"--Gif / ImgtoImg based video--", "https://wangfuyun-animatelcm-svd.hf.space", "https://bytedance-animatediff-lightning.hf.space", "https://wangfuyun-animatelcm.hf.space", "https://guoyww-animatediff.hf.space",],
|
| 1295 |
-
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1296 |
-
videogenspacebtn = gr.Button("Use the chosen URL to load interface with video generation")
|
| 1297 |
-
videogenspace = gr.HTML("Video Space Chosen will load here")
|
| 1298 |
-
videogenspacebtn.click(display_website, inputs=linktovideogenspace, outputs=videogenspace)
|
| 1299 |
-
|
| 1300 |
-
gr.HTML("Cutscenes, Tutorials, Trailers")
|
| 1301 |
-
gr.HTML("Portrait Video eg. Solo Taking NPC - https://huggingface.co/spaces/fffiloni/tts-hallo-talking-portrait (Image + Audio and combination) https://huggingface.co/spaces/KwaiVGI/LivePortrait (Non verbal communication eg. in a library, when running from a pursuer)")
|
| 1302 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/KingNish/Instant-Video, https://huggingface.co/spaces/multimodalart/stable-video-diffusion, https://huggingface.co/spaces/multimodalart/stable-video-diffusion")
|
| 1303 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1304 |
-
gr.HTML("3rd Party / Closed Source - https://runwayml.com/ <br>")
|
| 1305 |
-
with gr.Tab("Animations (for lower resource use)"):
|
| 1306 |
-
gr.HTML("Characters, Environments, Objects")
|
| 1307 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - image as 3d object in video https://huggingface.co/spaces/ashawkey/LGM")
|
| 1308 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1309 |
-
|
| 1310 |
-
with gr.Tab("Audio"):
|
| 1311 |
-
with gr.Accordion("Audio Spaces/Sites (Click Here to Open)", open=False):
|
| 1312 |
-
with gr.Row():
|
| 1313 |
-
linktoaudiiogenspace = gr.Dropdown(choices=["General", "https://artificialguybr-stable-audio-open-zero.hf.space", "",
|
| 1314 |
-
"--Talking Portrait--","https://fffiloni-tts-hallo-talking-portrait.hf.space"],
|
| 1315 |
-
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1316 |
-
audiiogenspacebtn = gr.Button("Use the chosen URL to load interface with audio generation")
|
| 1317 |
-
audiiogenspace = gr.HTML("Audio Space Chosen will load here")
|
| 1318 |
-
audiiogenspacebtn.click(display_website, inputs=linktoaudiiogenspace, outputs=audiiogenspace)
|
| 1319 |
-
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 ")
|
| 1320 |
-
gr.HTML("Placeholder for huggingface spaces that can assist")
|
| 1321 |
-
gr.HTML("Audio Sound Effects - https://huggingface.co/spaces/artificialguybr/Stable-Audio-Open-Zero")
|
| 1322 |
-
gr.HTML("Voices - Voice clone eg. actors part of your project - https://huggingface.co/spaces/tonyassi/voice-clone")
|
| 1323 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1324 |
-
gr.HTML("3rd Party / Closed Source - https://suno.com/ <br>https://www.udio.com/")
|
| 1325 |
-
|
| 1326 |
-
with gr.Tab("3D"):
|
| 1327 |
-
with gr.Accordion("3D Model Spaces/Sites (Click Here to Open)", open=False):
|
| 1328 |
-
with gr.Row():
|
| 1329 |
-
linktoThreedModel = gr.Dropdown(choices=["--Image prompt--", "https://vast-ai-charactergen.hf.space"
|
| 1330 |
-
"--Video prompt--", "https://facebook-vggsfm.hf.space",
|
| 1331 |
-
"--Text prompt--", "https://wuvin-unique3d.hf.space", "https://stabilityai-triposr.hf.space", "https://hysts-shap-e.hf.space", "https://tencentarc-instantmesh.hf.space", "https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1332 |
-
ThreedModelspacebtn = gr.Button("Use the chosen URL to load interface with a 3D model")
|
| 1333 |
-
ThreedModelspace = gr.HTML("3D Space Chosen will load here")
|
| 1334 |
-
ThreedModelspacebtn.click(display_website, inputs=linktoThreedModel, outputs=ThreedModelspace)
|
| 1335 |
-
gr.HTML("Characters, Environments, Objects")
|
| 1336 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/dylanebert/3d-arena")
|
| 1337 |
-
gr.HTML("Closed Source - https://www.meshy.ai/")
|
| 1338 |
-
|
| 1339 |
-
with gr.Tab("Fonts"):
|
| 1340 |
-
gr.HTML("Style of whole game, or locations, or characters")
|
| 1341 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - there was a space that could make letter into pictures based on the prompt but I cant find it now")
|
| 1342 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1343 |
-
|
| 1344 |
-
with gr.Tab("Shaders and related"):
|
| 1345 |
-
gr.HTML("Any output that is not understood by the common person can be used as special effects eg. depth map filters on images etc.")
|
| 1346 |
-
gr.HTML("Post-processing Effects, material effects, Particle systems, visual feedback")
|
| 1347 |
-
gr.HTML("Visual Effects - eg. explosion can turn all items white for a moment, losing conciousness blurs whole screen")
|
| 1348 |
-
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/EPFL-VILAB/4M, https://huggingface.co/spaces/EPFL-VILAB/MultiMAE ")
|
| 1349 |
-
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1350 |
-
|
| 1351 |
-
with gr.Tab("Demos on Social Media for inspiration"):
|
| 1352 |
-
gr.HTML("Social media that shows possiblities")
|
| 1353 |
-
gr.HTML("https://www.reddit.com/r/aivideo/ https://www.reddit.com/r/StableDiffusion/ https://www.reddit.com/r/midjourney/ https://x.com/blizaine")
|
| 1354 |
-
|
| 1355 |
-
with gr.Tab("Basic Game Engine Mechanics"):
|
| 1356 |
-
gr.HTML("Placeholder for explanations of Player and Game Session")
|
| 1357 |
-
with gr.Tab("LLM play testing"):
|
| 1358 |
-
gr.HTML("LLM can read the contents in full and give critiques but they can also play the game if you make a api interface - gradio allows this in the form of gradio client but you can also reroute the user inputs to function calling")
|
| 1359 |
-
|
| 1360 |
-
with gr.Tab("Custom JS Config Creator"):
|
| 1361 |
-
gr.HTML("-- Incomplete -- 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)")
|
| 1362 |
-
with gr.Tab("Simple Config Creator"):
|
| 1363 |
-
inventory_items = gr.State([])
|
| 1364 |
-
skills_items = gr.State([])
|
| 1365 |
-
objectives_items = gr.State([])
|
| 1366 |
-
targets_items = gr.State([])
|
| 1367 |
-
|
| 1368 |
-
with gr.Tabs():
|
| 1369 |
-
with gr.TabItem("Inventory"):
|
| 1370 |
-
inventory_type = gr.Textbox(label="Type")
|
| 1371 |
-
inventory_name = gr.Textbox(label="Name")
|
| 1372 |
-
inventory_description = gr.Textbox(label="Description")
|
| 1373 |
-
add_inventory = gr.Button("Add Inventory Item")
|
| 1374 |
-
inventory_textbox = gr.JSON(label="Inventory Items", value=[])
|
| 1375 |
-
|
| 1376 |
-
with gr.TabItem("Skills"):
|
| 1377 |
-
skills_branch = gr.Textbox(label="Branch")
|
| 1378 |
-
skills_name = gr.Textbox(label="Name")
|
| 1379 |
-
skills_learned = gr.Dropdown(choices=["True", "False"], label="Learned")
|
| 1380 |
-
add_skill_button = gr.Button("Add Skill")
|
| 1381 |
-
skills_textbox = gr.JSON(label="Skills", value=[])
|
| 1382 |
-
|
| 1383 |
-
with gr.TabItem("Objectives"):
|
| 1384 |
-
objectives_id = gr.Textbox(label="ID")
|
| 1385 |
-
objectives_name = gr.Textbox(label="Name")
|
| 1386 |
-
objectives_complete = gr.Dropdown(choices=["True", "False"], label="Complete")
|
| 1387 |
-
add_objective_button = gr.Button("Add Objective")
|
| 1388 |
-
objectives_textbox = gr.JSON(label="Objectives", value=[])
|
| 1389 |
-
|
| 1390 |
-
with gr.TabItem("Targets"):
|
| 1391 |
-
targets_name = gr.Textbox(label="Name")
|
| 1392 |
-
targets_x = gr.Textbox(label="X Coordinate")
|
| 1393 |
-
targets_y = gr.Textbox(label="Y Coordinate")
|
| 1394 |
-
targets_collisionType = gr.Textbox(label="Collision Type")
|
| 1395 |
-
targets_collisiontext = gr.Textbox(label="Collision Text")
|
| 1396 |
-
add_target_button = gr.Button("Add Target")
|
| 1397 |
-
targets_textbox = gr.JSON(label="Targets", value=[])
|
| 1398 |
-
|
| 1399 |
-
with gr.TabItem("Placeholders for Modal Target"):
|
| 1400 |
-
gr.HTML("Placeholder")
|
| 1401 |
-
|
| 1402 |
-
with gr.TabItem("Placeholders for State Machine Modal Target"):
|
| 1403 |
-
gr.HTML("Placeholder")
|
| 1404 |
-
|
| 1405 |
-
with gr.TabItem("Placeholders for Background"):
|
| 1406 |
-
gr.HTML("Placeholder")
|
| 1407 |
-
|
| 1408 |
-
config_output = gr.JSON(label="Updated Configuration")
|
| 1409 |
-
|
| 1410 |
-
@gr.render(inputs=[inventory_items, skills_items, objectives_items, targets_items]) #, outputs=config_output)
|
| 1411 |
-
def aggregate_config(inventory, skills, objectives, targets):
|
| 1412 |
-
config = default_config.copy()
|
| 1413 |
-
config['inventory'] = inventory
|
| 1414 |
-
config['skills'] = skills
|
| 1415 |
-
config['objectives'] = objectives
|
| 1416 |
-
config['targets'] = targets
|
| 1417 |
-
return config
|
| 1418 |
-
|
| 1419 |
-
add_inventory.click(add_inventory_item, inputs=[inventory_items, inventory_type, inventory_name, inventory_description], outputs=inventory_textbox)
|
| 1420 |
-
add_inventory.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1421 |
-
|
| 1422 |
-
add_skill_button.click(add_skill, inputs=[skills_items, skills_branch, skills_name, skills_learned], outputs=skills_textbox)
|
| 1423 |
-
add_skill_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1424 |
-
|
| 1425 |
-
add_objective_button.click(add_objective, inputs=[objectives_items, objectives_id, objectives_name, objectives_complete], outputs=objectives_textbox)
|
| 1426 |
-
add_objective_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1427 |
-
|
| 1428 |
-
add_target_button.click(add_target, inputs=[targets_items, targets_name, targets_x, targets_y, targets_collisionType, targets_collisiontext], outputs=targets_textbox)
|
| 1429 |
-
add_target_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1430 |
-
|
| 1431 |
-
with gr.Tab("Advanced Config Creator"):
|
| 1432 |
-
gr.HTML("Config with More than text and images")
|
| 1433 |
-
|
| 1434 |
-
with gr.Tab("LLM/Robotics as custom controllers"):
|
| 1435 |
-
gr.HTML("Controls changed the scope of the game eg. mouse vs keyboard vs console controller vs remote vs touch screen <br>LLM can be vision/surveilance based controler (eg. MGS/GTA camera gauged by an actual camera in real life) or it can be a companion (offline/off console game progrssion ideas)")
|
| 1436 |
-
gr.HTML("https://huggingface.co/posts/thomwolf/809364796644704")
|
| 1437 |
-
gr.HTML("Robotics - https://github.com/OpenTeleVision/TeleVision https://www.stereolabs.com/")
|
| 1438 |
-
|
| 1439 |
-
with gr.Tab("Other Considerations"):
|
| 1440 |
-
with gr.Tab("General"):
|
| 1441 |
-
gr.HTML("Experiment for https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py inplementation with gradio client api")
|
| 1442 |
-
|
| 1443 |
-
gr.HTML("https://huggingface.co/spaces/HuggingFaceTB/SmolLM-135M-Instruct-WebGPU")
|
| 1444 |
-
|
| 1445 |
-
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")
|
| 1446 |
-
|
| 1447 |
-
gr.HTML("langchain docs as awareness for alot of the integration use cases and providers that are possible - https://python.langchain.com/v0.2/docs/integrations/tools/")
|
| 1448 |
-
|
| 1449 |
-
gr.HTML("https://huggingface.co/spaces/linoyts/scribble-sdxl-flash as map planner")
|
| 1450 |
-
|
| 1451 |
-
gr.HTML("---------------------------------------Gameplay Ideas-------------------------------")
|
| 1452 |
-
gr.HTML("https://huggingface.co/spaces/Lin-Chen/ShareCaptioner-Video - game use example police questions a event with multiple eye witnesses needs to give as close to the caption description to win")
|
| 1453 |
-
with gr.Tab("State management through huggingface?"):
|
| 1454 |
-
gr.HTML("Huggingface as the login provider? - https://huggingface.co/docs/hub/en/spaces-oauth https://huggingface.co/docs/hub/en/oauth, persistent storage - https://huggingface.co/docs/hub/en/spaces-storage")
|
| 1455 |
-
with gr.Tab("Finetuning options"):
|
| 1456 |
-
gr.HTML("Unsloth and Colab? - Mistral Nemo Base - https://huggingface.co/unsloth/Mistral-Nemo-Base-2407 - https://colab.research.google.com/drive/17d3U-CAIwzmbDRqbZ9NnpHxCkmXB6LZ0?usp=sharing <br>Llama 3 8B https://huggingface.co/unsloth/llama-3-8b-Instruct-bnb-4bit")
|
| 1457 |
-
gr.HTML("Price - https://openpipe.ai/pricing")
|
| 1458 |
-
with gr.Tab("Backend and/or Hosting?"):
|
| 1459 |
-
gr.HTML("Deployemnt options - https://huggingface.co/SpacesExamples", "https://huggingface.co/templates")
|
| 1460 |
-
gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
|
| 1461 |
-
gr.HTML("GPU (Data privacy) = No Rate limits? - https://replicate.com/pricing, https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints https://tensordock.com/cloud-gpus", "https://massedcompute.com/home/pricing/" )
|
| 1462 |
-
gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
|
| 1463 |
-
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?")
|
| 1464 |
-
with gr.Tab("Asset loading test"):
|
| 1465 |
-
gr.HTML("SDXL (linoyts/scribble-sdxl-flash), SVD and Stable Audio used for the test assets (For commercial use need a licence) <br>testmedia/")
|
| 1466 |
-
with gr.Row():
|
| 1467 |
-
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
| 1468 |
-
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
| 1469 |
-
gr.Audio(value="testmedia/Stable Audio - Raindrops, output.wav")
|
| 1470 |
-
gr.HTML(TestmedialoadinHTML) # imported from relatively_constant_variables
|
| 1471 |
|
| 1472 |
demo.queue().launch()
|
|
|
|
| 809 |
with gr.Tab("Themes"):
|
| 810 |
gr.HTML("")
|
| 811 |
with gr.Tab("General FAQ Attempt"):
|
| 812 |
+
with gr.Tab("Front end as FAQ"):
|
| 813 |
+
FAQMainOutput = gr.TextArea(placeholder='Output will show here', value='')
|
| 814 |
+
FAQCustomButtonInput = gr.TextArea(lines=1, placeholder='Prompt goes here')
|
| 815 |
+
|
| 816 |
+
for category_name, category_prompts in FAQAllprompts.items():
|
| 817 |
+
with gr.Accordion(f"General {category_name} Pattern based", open=False):
|
| 818 |
+
with gr.Group():
|
| 819 |
+
for index, (prompt, _) in enumerate(category_prompts):
|
| 820 |
+
button = gr.Button(prompt)
|
| 821 |
+
button.click(llmguide_generate_response, inputs=[FAQCustomButtonInput, gr.State(index), gr.State(category_name)], outputs=FAQMainOutput)
|
| 822 |
+
with gr.Tab("Function Call as FAQ"):
|
| 823 |
+
gr.HTML("Placeholder for media task query routing as dual purpose in workflow and for user queries as psuedo RAG engine")
|
| 824 |
|
| 825 |
with gr.Tab("General RAG (Pathfinder?) Attempt"):
|
| 826 |
gr.HTML("https://huggingface.co/spaces/mteb/leaderboard - Source for SOTA - current using all-MiniLM-L6-v2")
|
|
|
|
| 953 |
for key, item in mermaidstorystructures.items():
|
| 954 |
gr.Code(item, label=key)
|
| 955 |
|
| 956 |
+
with gr.Tab("Branching - Network analysis to Game config"):
|
| 957 |
+
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")
|
| 958 |
+
|
| 959 |
with gr.Accordion("Existing Config Crafting Progression - click to open", open=False):
|
| 960 |
with gr.Accordion("Test for config to gradio components order - ignore for now", open=False ):
|
| 961 |
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")
|
|
|
|
| 1054 |
gr.HTML("Placeholder for Config parser to allow for current zerospace creation and placement into the config (LLM can give list of media but still have to figure out workflow from there)")
|
| 1055 |
|
| 1056 |
gr.HTML("Placeholder for clearing uploaded assets (public space and temporary persistence = sharing and space problems)")
|
| 1057 |
+
|
| 1058 |
+
with gr.Row():
|
| 1059 |
+
with gr.Column(scale=1):
|
| 1060 |
+
with gr.Accordion("My Previous Quick Config Attempts", open=False):
|
| 1061 |
+
for experimetal_config_name, experimetal_config in ExampleGameConfigs.items():
|
| 1062 |
+
with gr.Tab(experimetal_config_name):
|
| 1063 |
+
gr.Code(json.dumps(experimetal_config, default=lambda o: o.__dict__, indent=2), label=experimetal_config_name) #str(experimetal_config)
|
| 1064 |
+
with gr.Column(scale=5):
|
| 1065 |
+
with gr.Tab("Test and Edit Config"):
|
| 1066 |
+
with gr.Tab("Semi-Auto - Edit config while playing game"):
|
| 1067 |
+
gr.HTML("-- Incomplete -- Current problem is passing values from rendered items to the config box <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")
|
| 1068 |
+
with gr.Column(scale=1):
|
| 1069 |
+
gr.Markdown("# Debugging")
|
| 1070 |
+
with gr.Row():
|
| 1071 |
+
with gr.Column():
|
| 1072 |
+
ewpwaerror_box = gr.Textbox(label="Path Errors", lines=4, value=path_errors)
|
| 1073 |
+
|
| 1074 |
+
|
| 1075 |
+
with gr.Accordion("Generate a new config"):
|
| 1076 |
+
with gr.Accordion("Lists for config - only linear path for now", open=False):
|
| 1077 |
+
gr.Markdown("# Story and Timeline Generator")
|
| 1078 |
+
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")
|
| 1079 |
+
#with gr.Row():
|
| 1080 |
+
#ewpgame_structure_output_text_with_media = gr.Code(language="json")
|
| 1081 |
+
#ewpgame_structure_output_text = gr.Code(language="json")
|
| 1082 |
+
with gr.Row():
|
| 1083 |
+
ewptimeline_output_with_assets = gr.Textbox(label="Timeline with Assets Considered", lines=20)
|
| 1084 |
+
#ewptimeline_output = gr.Textbox(label="Timeline (Order might be different for now)", lines=20)
|
| 1085 |
+
with gr.Column():
|
| 1086 |
+
ewptimeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
| 1087 |
+
ewptimeline_selected_lists_text = gr.Textbox(label="Selected Idea Lists for Inspiration", lines=2)
|
| 1088 |
+
ewpstory_output = gr.Textbox(label="Generated Story (Order might be different for now)", lines=20)
|
| 1089 |
+
with gr.Row():
|
| 1090 |
+
ewpgenerate_no_story_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of story timeline points")
|
| 1091 |
+
ewpgenerate_no_ui_timeline_points = gr.Slider(minimum=1, value=10, step=1, maximum=30, label="Choose the amount of ui timeline points")
|
| 1092 |
+
#ewpgenerate_no_media_timeline_points = gr.Slider(minimum=1, value=5, step=1, maximum=30, label="Choose the amount of media timeline points")
|
| 1093 |
+
#ewpgenerate_with_media_check = gr.Checkbox(label="Generate with media", value=True)
|
| 1094 |
+
with gr.Row():
|
| 1095 |
+
ewptimeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
| 1096 |
+
ewptimeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
| 1097 |
+
ewptimeline_include_existing_games = gr.Checkbox(label="Include Existing Game Inspirations", value=True)
|
| 1098 |
+
ewptimeline_include_multiplayer = gr.Checkbox(label="Include Multiplayer Features", value=True)
|
| 1099 |
+
|
| 1100 |
+
ewpgenerate_button = gr.Button("Generate Story and Timeline")
|
| 1101 |
+
|
| 1102 |
+
ewpwacustom_config = gr.Textbox(label="Custom Configuration (JSON)", lines=4) #value=json.dumps(all_states, default=lambda o: o.__dict__, indent=2), lines=4) #Commented out due to initial load issues
|
| 1103 |
+
ewpwacustom_configbtn = gr.Button("Load Custom Config")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1105 |
with gr.Row():
|
| 1106 |
+
with gr.Column(scale=1):
|
| 1107 |
+
with gr.Group():
|
| 1108 |
+
gr.Markdown("# Text-based Adventure Game")
|
| 1109 |
+
|
| 1110 |
+
ewpwadescription = gr.Textbox(label="Current Situation", lines=4, value=initgameinfo[0])
|
| 1111 |
+
ewpwamediabool = gr.State(value=True)
|
| 1112 |
+
ewpwamedia = gr.State(["testmedia/Stable Audio - Raindrops, output.wav"])
|
| 1113 |
+
|
| 1114 |
+
@gr.render(inputs=ewpwamedia)
|
| 1115 |
+
def dynamic_with_media(media_items):
|
| 1116 |
+
print(media_items)
|
| 1117 |
+
with gr.Group() as ewpwamediagrouping:
|
| 1118 |
+
gr.HTML("Placeholder to load all media tests - still need to test clearing media on ")
|
| 1119 |
+
if media_items == []:
|
| 1120 |
+
gr.Markdown("No media items to display.")
|
| 1121 |
+
else:
|
| 1122 |
+
for item in media_items:
|
| 1123 |
+
render = create_media_component(item)
|
| 1124 |
+
|
| 1125 |
+
return ewpwamediagrouping
|
| 1126 |
+
|
| 1127 |
+
ewpwachoices = gr.Radio(label="Your Choices", choices=initgameinfo[1])
|
| 1128 |
+
ewpwasubmit_btn = gr.Button("Make Choice")
|
| 1129 |
+
ewpwagame_log = gr.Textbox(label="Game Log", lines=20, value=initgameinfo[2])
|
| 1130 |
+
ewpwagame_session = gr.State(value=initgameinfo[3])
|
| 1131 |
+
ewpwasubmit_btn.click(
|
| 1132 |
+
make_choice,
|
| 1133 |
+
inputs=[ewpwachoices, ewpwagame_session, ewpwamediabool],
|
| 1134 |
+
outputs=[ewpwadescription, ewpwachoices, ewpwagame_log, ewpwagame_session, ewpwamedia]
|
| 1135 |
+
)
|
| 1136 |
+
|
| 1137 |
+
ewpwacustom_configbtn.click(
|
| 1138 |
+
load_game,
|
| 1139 |
+
inputs=[ewpwacustom_config, ewpwamediabool],
|
| 1140 |
+
outputs=[ewpwaerror_box, ewpwagame_log, ewpwadescription, ewpwachoices, ewpwacustom_config, ewpwagame_session, ewpwamedia]
|
| 1141 |
+
)
|
| 1142 |
+
with gr.Column(scale=1):
|
| 1143 |
+
@gr.render(inputs=ewpwacustom_config) #ewpgame_structure_output_text_with_media
|
| 1144 |
+
def update(ewpwacustom_config):
|
| 1145 |
+
return show_elements_json_input(ewpwacustom_config)
|
| 1146 |
|
| 1147 |
+
ewpgenerate_button.click(generate_story_and_timeline, inputs=[ewpgenerate_no_story_timeline_points, ewpgenerate_no_ui_timeline_points, ewptimeline_num_lists_slider, ewptimeline_items_per_list_slider, ewptimeline_include_existing_games, ewptimeline_include_multiplayer], outputs=[ewptimeline_output_with_assets, ewpstory_output, ewpwacustom_config, ewptimeline_output_text, ewptimeline_selected_lists_text]) #ewptimeline_output_with_assets, ewptimeline_output, ewpstory_output, ewpwacustom_config, ewpgame_structure_output_text]) #ewpgame_structure_output_text_with_media, ewpgame_structure_output_text])
|
| 1148 |
+
|
| 1149 |
+
with gr.Tab("Manual - Config With Assets"):
|
| 1150 |
+
gr.HTML("Placeholder as not complete yet (3D not supported, and time (esp need for audio)")
|
| 1151 |
+
with gr.Row():
|
| 1152 |
+
with gr.Column(scale=2):
|
| 1153 |
+
gr.Markdown("# Text-based Adventure Game")
|
| 1154 |
+
|
| 1155 |
+
wadescription = gr.Textbox(label="Current Situation", lines=4, value=initgameinfo[0])
|
| 1156 |
+
wamediabool = gr.State(value=True)
|
| 1157 |
+
wamedia = gr.State(["testmedia/Stable Audio - Raindrops, output.wav"])
|
| 1158 |
+
|
| 1159 |
+
@gr.render(inputs=wamedia)
|
| 1160 |
+
def dynamic_with_media(media_items):
|
| 1161 |
+
print(media_items)
|
| 1162 |
+
with gr.Group() as wamediagrouping:
|
| 1163 |
+
gr.HTML("Placeholder to load all media tests - still need to test clearing media on ")
|
| 1164 |
+
if media_items == []:
|
| 1165 |
+
gr.Markdown("No media items to display.")
|
| 1166 |
+
else:
|
| 1167 |
+
for item in media_items:
|
| 1168 |
+
render = create_media_component(item)
|
| 1169 |
+
|
| 1170 |
+
return wamediagrouping
|
| 1171 |
|
| 1172 |
+
wachoices = gr.Radio(label="Your Choices", choices=initgameinfo[1])
|
| 1173 |
+
wasubmit_btn = gr.Button("Make Choice")
|
| 1174 |
+
wagame_log = gr.Textbox(label="Game Log", lines=20, value=initgameinfo[2])
|
| 1175 |
+
wagame_session = gr.State(value=initgameinfo[3])
|
| 1176 |
+
wasubmit_btn.click(
|
| 1177 |
+
make_choice,
|
| 1178 |
+
inputs=[wachoices, wagame_session, wamediabool],
|
| 1179 |
+
outputs=[wadescription, wachoices, wagame_log, wagame_session, wamedia]
|
| 1180 |
+
)
|
| 1181 |
+
with gr.Column(scale=1):
|
| 1182 |
+
gr.Markdown("# Debugging")
|
| 1183 |
+
waerror_box = gr.Textbox(label="Path Errors", lines=4, value=path_errors)
|
| 1184 |
+
with gr.Accordion("Config (Game Spoiler and Example for llm to remix)", open=False):
|
| 1185 |
+
wacustom_config = gr.Textbox(label="Custom Configuration (JSON)", value=json.dumps(all_states, default=lambda o: o.__dict__, indent=2), lines=8)
|
| 1186 |
+
wacustom_configbtn = gr.Button("Load Custom Config")
|
| 1187 |
+
|
| 1188 |
+
wacustom_configbtn.click(
|
| 1189 |
+
load_game,
|
| 1190 |
+
inputs=[wacustom_config, wamediabool],
|
| 1191 |
+
outputs=[waerror_box, wagame_log, wadescription, wachoices, wacustom_config, wagame_session, wamedia]
|
| 1192 |
+
)
|
| 1193 |
+
|
| 1194 |
+
|
| 1195 |
+
with gr.Tab("Asset Generation Considerations"):
|
| 1196 |
+
with gr.Row():
|
| 1197 |
+
gr.HTML("Licenses for the spaces still to be evaluated - June 2024 <br> Users to follow with cool spaces - <br>https://huggingface.co/osanseviero - https://huggingface.co/spaces/osanseviero/TheMLGame <br>https://huggingface.co/jbilcke-hf <br>https://huggingface.co/dylanebert <br>https://huggingface.co/fffiloni <br>https://huggingface.co/artificialguybr <br>https://huggingface.co/radames <br>https://huggingface.co/multimodalart, ")
|
| 1198 |
+
gr.HTML("Some Youtube Channels to keep up with updates <br><br>https://www.youtube.com/@lev-selector <br>https://www.youtube.com/@fahdmirza/videos")
|
| 1199 |
+
gr.HTML("Whole game engine in a space? - https://huggingface.co/spaces/thomwolf/test_godot_editor <br><br> https://huggingface.co/godot-demo https://huggingface.co/spaces/thomwolf/test_godot")
|
| 1200 |
+
with gr.Tab("Text-based"):
|
| 1201 |
+
gr.HTML("Some Benchmark Leaderboards - https://huggingface.co/spaces/allenai/ZebraLogic | https://huggingface.co/spaces/allenai/WildBench")
|
| 1202 |
+
with gr.Accordion("LLM HF Spaces/Sites (Click Here to Open) - Ask for a story and suggestions based on the autoconfig", open=False):
|
| 1203 |
+
with gr.Row():
|
| 1204 |
+
linktochat = gr.Dropdown(choices=["--Multiple Models--", "https://labs.perplexity.ai/", "https://chat.lmsys.org", "https://sdk.vercel.ai/docs", "https://cyzgab-catch-me-if-you-can.hf.space",
|
| 1205 |
+
"--70B and above--", "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",
|
| 1206 |
+
"--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",
|
| 1207 |
+
"--7B and above--", "https://vilarin-mistral-nemo.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",
|
| 1208 |
+
"--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",
|
| 1209 |
+
"--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)
|
| 1210 |
+
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")
|
| 1211 |
+
chatspace = gr.HTML("Chat Space Chosen will load here")
|
| 1212 |
+
chatspacebtn.click(display_website, inputs=linktochat, outputs=chatspace)
|
| 1213 |
+
with gr.Tab("NPCS"):
|
| 1214 |
+
gr.HTML("For ideas on NPCS check: https://lifearchitect.ai/leta/, ")
|
| 1215 |
+
with gr.Tab("Save files"):
|
| 1216 |
+
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")
|
| 1217 |
+
gr.HTML("Some ideas - In game websites eg. GTA esp stock markets, news; ")
|
| 1218 |
+
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), https://huggingface.co/spaces/gokaygokay/Gemma-2-llamacpp ")
|
| 1219 |
+
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")
|
| 1220 |
+
with gr.Tab("Diagrams"):
|
| 1221 |
+
gr.HTML("Claude 3.5 sonnet is very good with mermaid graphs - can used for maps, situational explanations")
|
| 1222 |
+
with gr.Tab("Maths"):
|
| 1223 |
+
gr.HTML("https://huggingface.co/spaces/AI-MO/math-olympiad-solver")
|
| 1224 |
+
|
| 1225 |
+
with gr.Tab("Media Understanding"):
|
| 1226 |
+
gr.HTML("NPC Response Engines? Camera, Shopkeeper, Companion, Enemies, etc.")
|
| 1227 |
+
with gr.Accordion("Media understanding model Spaces/Sites (Click Here to Open)", open=False):
|
| 1228 |
+
with gr.Row():
|
| 1229 |
+
linktomediaunderstandingspace = gr.Dropdown(choices=[ "--Weak Audio Understanding = Audio to text, Weak Video Understanding = Video to Image to Image Understanding", "https://skalskip-florence-2-video.hf.space", "https://kingnish-opengpt-4o.hf.space",
|
| 1230 |
+
"--Video Understanding--", "https://ivgsz-flash-vstream-demo.hf.space",
|
| 1231 |
+
"--Image Understanding--", "https://qnguyen3-nanollava.hf.space", "https://skalskip-better-florence-2.hf.space", ],
|
| 1232 |
+
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1233 |
+
mediaunderstandingspacebtn = gr.Button("Use the chosen URL to load interface with a media understanding space")
|
| 1234 |
+
mediaunderstandingspace = gr.HTML("Mdeia Understanding Space Chosen will load here")
|
| 1235 |
+
mediaunderstandingspacebtn.click(display_website, inputs=linktomediaunderstandingspace, outputs=mediaunderstandingspace)
|
| 1236 |
+
|
| 1237 |
+
|
| 1238 |
+
with gr.Tab("Images"):
|
| 1239 |
+
with gr.Accordion("Image Gen or Animation HF Spaces/Sites (Click Here to Open) - Have to download and upload at the the top", open=False):
|
| 1240 |
+
# with gr.Tabs("General"):
|
| 1241 |
+
with gr.Row():
|
| 1242 |
+
linktoimagegen = gr.Dropdown(choices=["Text-Interleaved", "https://ethanchern-anole.hf.space",
|
| 1243 |
+
"--General--", "https://pixart-alpha-pixart-sigma.hf.space", "https://stabilityai-stable-diffusion-3-medium.hf.space", "https://prodia-sdxl-stable-diffusion-xl.hf.space", "https://prodia-fast-stable-diffusion.hf.space", "https://bytedance-hyper-sdxl-1step-t2i.hf.space", "https://multimodalart-cosxl.hf.space", "https://cagliostrolab-animagine-xl-3-1.hf.space", "https://stabilityai-stable-diffusion.hf.space",
|
| 1244 |
+
"--Speed--", "https://radames-real-time-text-to-image-sdxl-lightning.hf.space", "https://ap123-sdxl-lightning.hf.space",
|
| 1245 |
+
"--LORA Support--", "https://artificialguybr-artificialguybr-demo-lora.hf.space", "https://artificialguybr-studio-ghibli-lora-sdxl.hf.space", "https://artificialguybr-pixel-art-generator.hf.space", "https://fffiloni-sdxl-control-loras.hf.space", "https://ehristoforu-dalle-3-xl-lora-v2.hf.space",
|
| 1246 |
+
"--Image to Image--", "https://lllyasviel-ic-light.hf.space", "https://gparmar-img2img-turbo-sketch.hf.space",
|
| 1247 |
+
"--Control of Pose--", "https://instantx-instantid.hf.space", "https://modelscope-transferanything.hf.space", "https://okaris-omni-zero.hf.space"
|
| 1248 |
+
"--Control of Shapes--", "https://linoyts-scribble-sdxl-flash.hf.space",
|
| 1249 |
+
"--Foreign Language Input--", "https://gokaygokay-kolors.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1250 |
+
imagegenspacebtn = gr.Button("Use the chosen URL to load interface with a image generation model")
|
| 1251 |
+
|
| 1252 |
+
imagegenspace = gr.HTML("Image Space Chosen will load here")
|
| 1253 |
+
imagegenspacebtn.click(display_website, inputs=linktoimagegen, outputs=imagegenspace)
|
| 1254 |
+
|
| 1255 |
+
linkstobecollectednoembed = "https://artgan-diffusion-api.hf.space", "https://multimodalart-stable-cascade.hf.space", "https://google-sdxl.hf.space", "https://visionmaze-magic-me.hf.space", "https://segmind-segmind-stable-diffusion.hf.space", "https://simianluo-latent-consistency-model.hf.space",
|
| 1256 |
+
gr.HTML("Concept Art, UI elements, Static/3D Characters, Environments and Objects")
|
| 1257 |
+
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, ")
|
| 1258 |
+
gr.HTML("Images Generation Portraits = https://huggingface.co/spaces/okaris/omni-zero")
|
| 1259 |
+
gr.HTML("Images Generation General (3rd Party) = https://www.craiyon.com/")
|
| 1260 |
+
gr.HTML("Images Generation Posters with text - https://huggingface.co/spaces/GlyphByT5/Glyph-SDXL-v2")
|
| 1261 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/EPFL-VILAB/4M, https://huggingface.co/spaces/EPFL-VILAB/MultiMAE ")
|
| 1262 |
+
gr.HTML("SVG Generation = Coding models / SOTA LLM ")
|
| 1263 |
+
gr.HTML("Images Generation - Upscaling - https://huggingface.co/spaces/gokaygokay/Tile-Upscaler")
|
| 1264 |
+
gr.HTML("Vision Models for descriptions <br> https://huggingface.co/spaces/gokaygokay/Florence-2 <br>https://huggingface.co/spaces/vilarin/VL-Chatbox - glm 4v 9b <br>")
|
| 1265 |
+
gr.HTML("Upscalers (save data transfer costs? highly detailed characters?) - https://huggingface.co/spaces/gokaygokay/AuraSR")
|
| 1266 |
+
gr.HTML("Placeholder for huggingface spaces that can assist ")
|
| 1267 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1268 |
+
|
| 1269 |
+
with gr.Tab("Video"):
|
| 1270 |
+
with gr.Accordion("Video Spaces/Sites (Click Here to Open)", open=False):
|
| 1271 |
+
with gr.Row():
|
| 1272 |
+
linktovideogenspace = gr.Dropdown(choices=["--Genral--", "https://kadirnar-open-sora.hf.space",
|
| 1273 |
+
"--Talking Portrait--", "https://fffiloni-tts-hallo-talking-portrait.hf.space",
|
| 1274 |
+
"--Gif / ImgtoImg based video--", "https://wangfuyun-animatelcm-svd.hf.space", "https://bytedance-animatediff-lightning.hf.space", "https://wangfuyun-animatelcm.hf.space", "https://guoyww-animatediff.hf.space",],
|
| 1275 |
+
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1276 |
+
videogenspacebtn = gr.Button("Use the chosen URL to load interface with video generation")
|
| 1277 |
+
videogenspace = gr.HTML("Video Space Chosen will load here")
|
| 1278 |
+
videogenspacebtn.click(display_website, inputs=linktovideogenspace, outputs=videogenspace)
|
| 1279 |
+
|
| 1280 |
+
gr.HTML("Cutscenes, Tutorials, Trailers")
|
| 1281 |
+
gr.HTML("Portrait Video eg. Solo Taking NPC - https://huggingface.co/spaces/fffiloni/tts-hallo-talking-portrait (Image + Audio and combination) https://huggingface.co/spaces/KwaiVGI/LivePortrait (Non verbal communication eg. in a library, when running from a pursuer)")
|
| 1282 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/KingNish/Instant-Video, https://huggingface.co/spaces/multimodalart/stable-video-diffusion, https://huggingface.co/spaces/multimodalart/stable-video-diffusion")
|
| 1283 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1284 |
+
gr.HTML("3rd Party / Closed Source - https://runwayml.com/ <br>")
|
| 1285 |
+
with gr.Tab("Animations (for lower resource use)"):
|
| 1286 |
+
gr.HTML("Characters, Environments, Objects")
|
| 1287 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - image as 3d object in video https://huggingface.co/spaces/ashawkey/LGM")
|
| 1288 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1289 |
+
|
| 1290 |
+
with gr.Tab("Audio"):
|
| 1291 |
+
with gr.Accordion("Audio Spaces/Sites (Click Here to Open)", open=False):
|
| 1292 |
+
with gr.Row():
|
| 1293 |
+
linktoaudiiogenspace = gr.Dropdown(choices=["General", "https://artificialguybr-stable-audio-open-zero.hf.space", "",
|
| 1294 |
+
"--Talking Portrait--","https://fffiloni-tts-hallo-talking-portrait.hf.space"],
|
| 1295 |
+
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1296 |
+
audiiogenspacebtn = gr.Button("Use the chosen URL to load interface with audio generation")
|
| 1297 |
+
audiiogenspace = gr.HTML("Audio Space Chosen will load here")
|
| 1298 |
+
audiiogenspacebtn.click(display_website, inputs=linktoaudiiogenspace, outputs=audiiogenspace)
|
| 1299 |
+
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 ")
|
| 1300 |
+
gr.HTML("Placeholder for huggingface spaces that can assist")
|
| 1301 |
+
gr.HTML("Audio Sound Effects - https://huggingface.co/spaces/artificialguybr/Stable-Audio-Open-Zero")
|
| 1302 |
+
gr.HTML("Voices - Voice clone eg. actors part of your project - https://huggingface.co/spaces/tonyassi/voice-clone")
|
| 1303 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1304 |
+
gr.HTML("3rd Party / Closed Source - https://suno.com/ <br>https://www.udio.com/")
|
| 1305 |
+
|
| 1306 |
+
with gr.Tab("3D"):
|
| 1307 |
+
with gr.Accordion("3D Model Spaces/Sites (Click Here to Open)", open=False):
|
| 1308 |
+
with gr.Row():
|
| 1309 |
+
linktoThreedModel = gr.Dropdown(choices=["--Image prompt--", "https://vast-ai-charactergen.hf.space"
|
| 1310 |
+
"--Video prompt--", "https://facebook-vggsfm.hf.space",
|
| 1311 |
+
"--Text prompt--", "https://wuvin-unique3d.hf.space", "https://stabilityai-triposr.hf.space", "https://hysts-shap-e.hf.space", "https://tencentarc-instantmesh.hf.space", "https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1312 |
+
ThreedModelspacebtn = gr.Button("Use the chosen URL to load interface with a 3D model")
|
| 1313 |
+
ThreedModelspace = gr.HTML("3D Space Chosen will load here")
|
| 1314 |
+
ThreedModelspacebtn.click(display_website, inputs=linktoThreedModel, outputs=ThreedModelspace)
|
| 1315 |
+
gr.HTML("Characters, Environments, Objects")
|
| 1316 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/dylanebert/3d-arena")
|
| 1317 |
+
gr.HTML("Closed Source - https://www.meshy.ai/")
|
| 1318 |
+
|
| 1319 |
+
with gr.Tab("Fonts"):
|
| 1320 |
+
gr.HTML("Style of whole game, or locations, or characters")
|
| 1321 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - there was a space that could make letter into pictures based on the prompt but I cant find it now")
|
| 1322 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1323 |
+
|
| 1324 |
+
with gr.Tab("Shaders and related"):
|
| 1325 |
+
gr.HTML("Any output that is not understood by the common person can be used as special effects eg. depth map filters on images etc.")
|
| 1326 |
+
gr.HTML("Post-processing Effects, material effects, Particle systems, visual feedback")
|
| 1327 |
+
gr.HTML("Visual Effects - eg. explosion can turn all items white for a moment, losing conciousness blurs whole screen")
|
| 1328 |
+
gr.HTML("Placeholder for huggingface spaces that can assist - https://huggingface.co/spaces/EPFL-VILAB/4M, https://huggingface.co/spaces/EPFL-VILAB/MultiMAE ")
|
| 1329 |
+
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1330 |
+
|
| 1331 |
+
with gr.Tab("Demos on Social Media for inspiration"):
|
| 1332 |
+
gr.HTML("Social media that shows possiblities")
|
| 1333 |
+
gr.HTML("https://www.reddit.com/r/aivideo/ https://www.reddit.com/r/StableDiffusion/ https://www.reddit.com/r/midjourney/ https://x.com/blizaine")
|
| 1334 |
+
|
| 1335 |
+
with gr.Tab("Basic Game Engine Mechanics"):
|
| 1336 |
+
gr.HTML("Placeholder for explanations of Player and Game Session")
|
| 1337 |
+
with gr.Tab("LLM play testing"):
|
| 1338 |
+
gr.HTML("LLM can read the contents in full and give critiques but they can also play the game if you make a api interface - gradio allows this in the form of gradio client but you can also reroute the user inputs to function calling")
|
| 1339 |
+
|
| 1340 |
+
with gr.Tab("Custom JS Config Creator"):
|
| 1341 |
+
gr.HTML("-- Incomplete -- 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)")
|
| 1342 |
+
with gr.Tab("Simple Config Creator"):
|
| 1343 |
+
inventory_items = gr.State([])
|
| 1344 |
+
skills_items = gr.State([])
|
| 1345 |
+
objectives_items = gr.State([])
|
| 1346 |
+
targets_items = gr.State([])
|
| 1347 |
+
|
| 1348 |
+
with gr.Tabs():
|
| 1349 |
+
with gr.TabItem("Inventory"):
|
| 1350 |
+
inventory_type = gr.Textbox(label="Type")
|
| 1351 |
+
inventory_name = gr.Textbox(label="Name")
|
| 1352 |
+
inventory_description = gr.Textbox(label="Description")
|
| 1353 |
+
add_inventory = gr.Button("Add Inventory Item")
|
| 1354 |
+
inventory_textbox = gr.JSON(label="Inventory Items", value=[])
|
| 1355 |
+
|
| 1356 |
+
with gr.TabItem("Skills"):
|
| 1357 |
+
skills_branch = gr.Textbox(label="Branch")
|
| 1358 |
+
skills_name = gr.Textbox(label="Name")
|
| 1359 |
+
skills_learned = gr.Dropdown(choices=["True", "False"], label="Learned")
|
| 1360 |
+
add_skill_button = gr.Button("Add Skill")
|
| 1361 |
+
skills_textbox = gr.JSON(label="Skills", value=[])
|
| 1362 |
+
|
| 1363 |
+
with gr.TabItem("Objectives"):
|
| 1364 |
+
objectives_id = gr.Textbox(label="ID")
|
| 1365 |
+
objectives_name = gr.Textbox(label="Name")
|
| 1366 |
+
objectives_complete = gr.Dropdown(choices=["True", "False"], label="Complete")
|
| 1367 |
+
add_objective_button = gr.Button("Add Objective")
|
| 1368 |
+
objectives_textbox = gr.JSON(label="Objectives", value=[])
|
| 1369 |
+
|
| 1370 |
+
with gr.TabItem("Targets"):
|
| 1371 |
+
targets_name = gr.Textbox(label="Name")
|
| 1372 |
+
targets_x = gr.Textbox(label="X Coordinate")
|
| 1373 |
+
targets_y = gr.Textbox(label="Y Coordinate")
|
| 1374 |
+
targets_collisionType = gr.Textbox(label="Collision Type")
|
| 1375 |
+
targets_collisiontext = gr.Textbox(label="Collision Text")
|
| 1376 |
+
add_target_button = gr.Button("Add Target")
|
| 1377 |
+
targets_textbox = gr.JSON(label="Targets", value=[])
|
| 1378 |
+
|
| 1379 |
+
with gr.TabItem("Placeholders for Modal Target"):
|
| 1380 |
+
gr.HTML("Placeholder")
|
| 1381 |
+
|
| 1382 |
+
with gr.TabItem("Placeholders for State Machine Modal Target"):
|
| 1383 |
+
gr.HTML("Placeholder")
|
| 1384 |
+
|
| 1385 |
+
with gr.TabItem("Placeholders for Background"):
|
| 1386 |
+
gr.HTML("Placeholder")
|
| 1387 |
+
|
| 1388 |
+
config_output = gr.JSON(label="Updated Configuration")
|
| 1389 |
+
|
| 1390 |
+
@gr.render(inputs=[inventory_items, skills_items, objectives_items, targets_items]) #, outputs=config_output)
|
| 1391 |
+
def aggregate_config(inventory, skills, objectives, targets):
|
| 1392 |
+
config = default_config.copy()
|
| 1393 |
+
config['inventory'] = inventory
|
| 1394 |
+
config['skills'] = skills
|
| 1395 |
+
config['objectives'] = objectives
|
| 1396 |
+
config['targets'] = targets
|
| 1397 |
+
return config
|
| 1398 |
+
|
| 1399 |
+
add_inventory.click(add_inventory_item, inputs=[inventory_items, inventory_type, inventory_name, inventory_description], outputs=inventory_textbox)
|
| 1400 |
+
add_inventory.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1401 |
+
|
| 1402 |
+
add_skill_button.click(add_skill, inputs=[skills_items, skills_branch, skills_name, skills_learned], outputs=skills_textbox)
|
| 1403 |
+
add_skill_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1404 |
+
|
| 1405 |
+
add_objective_button.click(add_objective, inputs=[objectives_items, objectives_id, objectives_name, objectives_complete], outputs=objectives_textbox)
|
| 1406 |
+
add_objective_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1407 |
+
|
| 1408 |
+
add_target_button.click(add_target, inputs=[targets_items, targets_name, targets_x, targets_y, targets_collisionType, targets_collisiontext], outputs=targets_textbox)
|
| 1409 |
+
add_target_button.click(aggregate_config, inputs=[inventory_items, skills_items, objectives_items, targets_items], outputs=config_output)
|
| 1410 |
+
|
| 1411 |
+
with gr.Tab("Advanced Config Creator"):
|
| 1412 |
+
gr.HTML("Config with More than text and images")
|
| 1413 |
|
| 1414 |
+
with gr.Tab("LLM/Robotics as custom controllers"):
|
| 1415 |
+
gr.HTML("Controls changed the scope of the game eg. mouse vs keyboard vs console controller vs remote vs touch screen <br>LLM can be vision/surveilance based controler (eg. MGS/GTA camera gauged by an actual camera in real life) or it can be a companion (offline/off console game progrssion ideas)")
|
| 1416 |
+
gr.HTML("https://huggingface.co/posts/thomwolf/809364796644704")
|
| 1417 |
+
gr.HTML("Robotics - https://github.com/OpenTeleVision/TeleVision https://www.stereolabs.com/")
|
| 1418 |
+
with gr.Tab("Existing Game Developemnt Resources"):
|
| 1419 |
+
gr.HTML("https://develop.games/#nav-tools-engine ")
|
| 1420 |
+
with gr.Tab("Other Considerations"):
|
| 1421 |
+
with gr.Tab("General"):
|
| 1422 |
+
gr.HTML("Experiment for https://huggingface.co/spaces/ysharma/open-interpreter/blob/main/app.py inplementation with gradio client api")
|
| 1423 |
+
|
| 1424 |
+
gr.HTML("https://huggingface.co/spaces/HuggingFaceTB/SmolLM-135M-Instruct-WebGPU")
|
| 1425 |
+
|
| 1426 |
+
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")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1427 |
|
| 1428 |
+
gr.HTML("langchain docs as awareness for alot of the integration use cases and providers that are possible - https://python.langchain.com/v0.2/docs/integrations/tools/")
|
| 1429 |
+
|
| 1430 |
+
gr.HTML("https://huggingface.co/spaces/linoyts/scribble-sdxl-flash as map planner")
|
| 1431 |
+
|
| 1432 |
+
gr.HTML("---------------------------------------Gameplay Ideas-------------------------------")
|
| 1433 |
+
gr.HTML("https://huggingface.co/spaces/Lin-Chen/ShareCaptioner-Video - game use example police questions a event with multiple eye witnesses needs to give as close to the caption description to win")
|
| 1434 |
+
with gr.Tab("State management through huggingface?"):
|
| 1435 |
+
gr.HTML("Huggingface as the login provider? - https://huggingface.co/docs/hub/en/spaces-oauth https://huggingface.co/docs/hub/en/oauth, persistent storage - https://huggingface.co/docs/hub/en/spaces-storage")
|
| 1436 |
+
with gr.Tab("Finetuning options"):
|
| 1437 |
+
gr.HTML("Unsloth and Colab? - https://huggingface.co/unsloth <br>Mistral Nemo Base - https://huggingface.co/unsloth/Mistral-Nemo-Base-2407 - https://colab.research.google.com/drive/17d3U-CAIwzmbDRqbZ9NnpHxCkmXB6LZ0?usp=sharing <br>Llama 3 8B https://huggingface.co/unsloth/llama-3-8b-Instruct-bnb-4bit")
|
| 1438 |
+
gr.HTML("Price - https://openpipe.ai/pricing")
|
| 1439 |
+
with gr.Tab("Backend and/or Hosting?"):
|
| 1440 |
+
gr.HTML("Deployemnt options - https://huggingface.co/SpacesExamples", "https://huggingface.co/templates")
|
| 1441 |
+
gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
|
| 1442 |
+
gr.HTML("GPU (Data privacy) = No Rate limits? - https://replicate.com/pricing, https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints https://tensordock.com/cloud-gpus", "https://massedcompute.com/home/pricing/" )
|
| 1443 |
+
gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
|
| 1444 |
+
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?")
|
| 1445 |
+
with gr.Tab("Asset loading test"):
|
| 1446 |
+
gr.HTML("SDXL (linoyts/scribble-sdxl-flash), SVD and Stable Audio used for the test assets (For commercial use need a licence) <br>testmedia/")
|
| 1447 |
with gr.Row():
|
| 1448 |
+
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
| 1449 |
+
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
| 1450 |
+
gr.Audio(value="testmedia/Stable Audio - Raindrops, output.wav")
|
| 1451 |
+
gr.HTML(TestmedialoadinHTML) # imported from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1452 |
|
| 1453 |
demo.queue().launch()
|