Spaces:
Sleeping
Sleeping
Kim Adams commited on
Commit ·
ab27bca
1
Parent(s): 15740f2
checkboxes amirite
Browse files
create_games/data/game_ideas.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
-
"Name": "
|
| 4 |
-
"Description": "Players take turns drawing a
|
| 5 |
-
"Rationale": "This game
|
| 6 |
}
|
| 7 |
]
|
|
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
+
"Name": "Etiquette Drawing Game",
|
| 4 |
+
"Description": "Players take turns drawing a scene related to etiquette. The other players must guess what the scene is depicting. The player who guesses correctly first earns a point.",
|
| 5 |
+
"Rationale": "This game encourages players to think creatively and use their knowledge of etiquette to guess the scene correctly."
|
| 6 |
}
|
| 7 |
]
|
home_view/__pycache__/ui_home.cpython-311.pyc
CHANGED
|
Binary files a/home_view/__pycache__/ui_home.cpython-311.pyc and b/home_view/__pycache__/ui_home.cpython-311.pyc differ
|
|
|
home_view/art/buildPlay.svg
CHANGED
|
|
|
|
home_view/ui_home.py
CHANGED
|
@@ -77,7 +77,7 @@ with gr.Blocks() as ui:
|
|
| 77 |
logo=gr.Image(value=constants.BUILDPLAY_LOGO, width=200, height=200, show_download_button=False, container=False)
|
| 78 |
directions= gr.Markdown(constants.DIRECTIONS, container=False)
|
| 79 |
with gr.Column():
|
| 80 |
-
playersCB = gr.CheckboxGroup ([], label=constants.PLAYERS, info=constants.PLAYERS_INFO )
|
| 81 |
createBtn = gr.Button(value=constants.CREATE_GAME, variant="primary")
|
| 82 |
gameTitle=gr.Markdown(constants.GAME_TITLE, container=False)
|
| 83 |
desc=gr.TextArea(info=constants.GAME_DESC, interactive=False, show_label=False,
|
|
@@ -87,16 +87,16 @@ with gr.Blocks() as ui:
|
|
| 87 |
sketch=gr.Image(image_mode="L", source="canvas", width=600, height =600, invert_colors=True, interactive=True,
|
| 88 |
brush_radius=.5, type="numpy", label="Sketch", show_label=True, show_download_button=False)
|
| 89 |
label=gr.Label()
|
|
|
|
| 90 |
sketch.change(Predict, inputs=[sketch], outputs=[label])
|
|
|
|
|
|
|
| 91 |
|
| 92 |
with gr.Blocks() as dfs:
|
| 93 |
fetchBtn=gr.Button(value=constants.FETCH_DATA, variant="primary")
|
| 94 |
gr.TabbedInterface([df1,df2,df3,df4,df5], (constants.UI1, constants.UI2, constants.UI3, constants.UI4, constants.UI5), theme=SoftBlue())
|
| 95 |
fetchBtn.click(FetchData, inputs=[], outputs=[df1,df2,df3,df4,df5])
|
| 96 |
-
|
| 97 |
-
createBtn.click(CreateGame, inputs=[], outputs=[df4,desc,gameTitle])
|
| 98 |
-
playBtn.click(PlayGame, inputs=[], outputs=[holder])
|
| 99 |
-
|
| 100 |
combo=gr.TabbedInterface([ui,dfs], ("BuildPlay", "DataFrames"),theme=SoftBlue())
|
| 101 |
|
| 102 |
Init()
|
|
|
|
| 77 |
logo=gr.Image(value=constants.BUILDPLAY_LOGO, width=200, height=200, show_download_button=False, container=False)
|
| 78 |
directions= gr.Markdown(constants.DIRECTIONS, container=False)
|
| 79 |
with gr.Column():
|
| 80 |
+
playersCB = gr.CheckboxGroup ([], label=constants.PLAYERS, info=constants.PLAYERS_INFO, type="value" )
|
| 81 |
createBtn = gr.Button(value=constants.CREATE_GAME, variant="primary")
|
| 82 |
gameTitle=gr.Markdown(constants.GAME_TITLE, container=False)
|
| 83 |
desc=gr.TextArea(info=constants.GAME_DESC, interactive=False, show_label=False,
|
|
|
|
| 87 |
sketch=gr.Image(image_mode="L", source="canvas", width=600, height =600, invert_colors=True, interactive=True,
|
| 88 |
brush_radius=.5, type="numpy", label="Sketch", show_label=True, show_download_button=False)
|
| 89 |
label=gr.Label()
|
| 90 |
+
playersCB.change(SetSelected, inputs=[playersCB], outputs=[])
|
| 91 |
sketch.change(Predict, inputs=[sketch], outputs=[label])
|
| 92 |
+
createBtn.click(CreateGame, inputs=[], outputs=[df4,desc,gameTitle])
|
| 93 |
+
playBtn.click(PlayGame, inputs=[], outputs=[holder])
|
| 94 |
|
| 95 |
with gr.Blocks() as dfs:
|
| 96 |
fetchBtn=gr.Button(value=constants.FETCH_DATA, variant="primary")
|
| 97 |
gr.TabbedInterface([df1,df2,df3,df4,df5], (constants.UI1, constants.UI2, constants.UI3, constants.UI4, constants.UI5), theme=SoftBlue())
|
| 98 |
fetchBtn.click(FetchData, inputs=[], outputs=[df1,df2,df3,df4,df5])
|
| 99 |
+
|
|
|
|
|
|
|
|
|
|
| 100 |
combo=gr.TabbedInterface([ui,dfs], ("BuildPlay", "DataFrames"),theme=SoftBlue())
|
| 101 |
|
| 102 |
Init()
|