Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- ui/gradio_app.py +1 -9
ui/gradio_app.py
CHANGED
|
@@ -263,13 +263,11 @@ def build_app():
|
|
| 263 |
search_forest,
|
| 264 |
inputs=(collection, player_position),
|
| 265 |
outputs=(scene, status, discovery, current_mushroom, chat, dex, progress),
|
| 266 |
-
show_progress="hidden",
|
| 267 |
)
|
| 268 |
ask_button.click(
|
| 269 |
ask_companion,
|
| 270 |
inputs=(prompt, chat, current_mushroom, collection, player_position),
|
| 271 |
outputs=(prompt, chat),
|
| 272 |
-
show_progress="hidden",
|
| 273 |
)
|
| 274 |
|
| 275 |
for direction, button in (
|
|
@@ -282,43 +280,37 @@ def build_app():
|
|
| 282 |
move_player,
|
| 283 |
inputs=(player_position, gr.State(direction), current_mushroom, collection),
|
| 284 |
outputs=(player_position, scene, status),
|
| 285 |
-
show_progress="hidden",
|
| 286 |
)
|
| 287 |
prompt.submit(
|
| 288 |
ask_companion,
|
| 289 |
inputs=(prompt, chat, current_mushroom, collection, player_position),
|
| 290 |
outputs=(prompt, chat),
|
| 291 |
-
show_progress="hidden",
|
| 292 |
)
|
| 293 |
collect_button.click(
|
| 294 |
collect_discovery,
|
| 295 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 296 |
outputs=(collection, scene, status, dex, world_map, chat, progress),
|
| 297 |
-
show_progress="hidden",
|
| 298 |
)
|
| 299 |
pick_button.click(
|
| 300 |
pick_discovery,
|
| 301 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 302 |
outputs=(collection, current_mushroom, scene, status, discovery, dex, world_map, chat, progress),
|
| 303 |
-
show_progress="hidden",
|
| 304 |
)
|
| 305 |
whisper_button.click(
|
| 306 |
follow_story_whisper,
|
| 307 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 308 |
outputs=(current_mushroom, scene, status, discovery, chat),
|
| 309 |
-
show_progress="hidden",
|
| 310 |
)
|
| 311 |
study_button.click(
|
| 312 |
study_discovery,
|
| 313 |
inputs=(current_mushroom, chat, collection, player_position),
|
| 314 |
outputs=(current_mushroom, scene, status, discovery, chat),
|
| 315 |
-
show_progress="hidden",
|
| 316 |
)
|
| 317 |
eat_button.click(
|
| 318 |
block_unsafe_eating,
|
| 319 |
inputs=(current_mushroom, chat),
|
| 320 |
outputs=(chat,),
|
| 321 |
-
show_progress="hidden",
|
| 322 |
)
|
| 323 |
|
|
|
|
| 324 |
return demo
|
|
|
|
| 263 |
search_forest,
|
| 264 |
inputs=(collection, player_position),
|
| 265 |
outputs=(scene, status, discovery, current_mushroom, chat, dex, progress),
|
|
|
|
| 266 |
)
|
| 267 |
ask_button.click(
|
| 268 |
ask_companion,
|
| 269 |
inputs=(prompt, chat, current_mushroom, collection, player_position),
|
| 270 |
outputs=(prompt, chat),
|
|
|
|
| 271 |
)
|
| 272 |
|
| 273 |
for direction, button in (
|
|
|
|
| 280 |
move_player,
|
| 281 |
inputs=(player_position, gr.State(direction), current_mushroom, collection),
|
| 282 |
outputs=(player_position, scene, status),
|
|
|
|
| 283 |
)
|
| 284 |
prompt.submit(
|
| 285 |
ask_companion,
|
| 286 |
inputs=(prompt, chat, current_mushroom, collection, player_position),
|
| 287 |
outputs=(prompt, chat),
|
|
|
|
| 288 |
)
|
| 289 |
collect_button.click(
|
| 290 |
collect_discovery,
|
| 291 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 292 |
outputs=(collection, scene, status, dex, world_map, chat, progress),
|
|
|
|
| 293 |
)
|
| 294 |
pick_button.click(
|
| 295 |
pick_discovery,
|
| 296 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 297 |
outputs=(collection, current_mushroom, scene, status, discovery, dex, world_map, chat, progress),
|
|
|
|
| 298 |
)
|
| 299 |
whisper_button.click(
|
| 300 |
follow_story_whisper,
|
| 301 |
inputs=(current_mushroom, collection, chat, player_position),
|
| 302 |
outputs=(current_mushroom, scene, status, discovery, chat),
|
|
|
|
| 303 |
)
|
| 304 |
study_button.click(
|
| 305 |
study_discovery,
|
| 306 |
inputs=(current_mushroom, chat, collection, player_position),
|
| 307 |
outputs=(current_mushroom, scene, status, discovery, chat),
|
|
|
|
| 308 |
)
|
| 309 |
eat_button.click(
|
| 310 |
block_unsafe_eating,
|
| 311 |
inputs=(current_mushroom, chat),
|
| 312 |
outputs=(chat,),
|
|
|
|
| 313 |
)
|
| 314 |
|
| 315 |
+
demo.queue()
|
| 316 |
return demo
|