Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,14 +34,10 @@ def play_game(img):
|
|
34 |
|
35 |
image = gr.inputs.Image(shape=(192, 192), label="User's Image")
|
36 |
label = gr.outputs.Label(label="Game Result")
|
37 |
-
output = gr.outputs.MultiOutput(
|
38 |
-
label=gr.outputs.Label(label="Game Result"),
|
39 |
-
image=gr.outputs.Image(label="Computer's Image")
|
40 |
-
)
|
41 |
|
42 |
examples = ['rock.jpg', 'paper.jpg', 'scissor.jpg']
|
43 |
|
44 |
-
intf = gr.Interface(fn=play_game, inputs=image, outputs=
|
45 |
intf.blocks[0].block_id = 0 # Unique ID for the image input block
|
46 |
intf.blocks[1].block_id = 1 # Unique ID for the label output block
|
47 |
intf.launch(inline=False)
|
|
|
34 |
|
35 |
image = gr.inputs.Image(shape=(192, 192), label="User's Image")
|
36 |
label = gr.outputs.Label(label="Game Result")
|
|
|
|
|
|
|
|
|
37 |
|
38 |
examples = ['rock.jpg', 'paper.jpg', 'scissor.jpg']
|
39 |
|
40 |
+
intf = gr.Interface(fn=play_game, inputs=image, outputs= [label, image], examples=examples)
|
41 |
intf.blocks[0].block_id = 0 # Unique ID for the image input block
|
42 |
intf.blocks[1].block_id = 1 # Unique ID for the label output block
|
43 |
intf.launch(inline=False)
|