arham061 commited on
Commit
e88d808
1 Parent(s): e75425e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -29,16 +29,16 @@ def play_game(img):
29
  computer_choice = random.choice(categories)
30
  winner = determine_winner(user_choice, computer_choice)
31
  computer_image = get_image_files(f'{computer_choice}.jpg')
32
- return f"User's choice: {user_choice}\nComputer's choice: {computer_choice}\n{winner}", computer_image
33
 
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)
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)
44
 
 
29
  computer_choice = random.choice(categories)
30
  winner = determine_winner(user_choice, computer_choice)
31
  computer_image = get_image_files(f'{computer_choice}.jpg')
32
+ return f"User's choice: {user_choice}\nComputer's choice: {computer_choice}\n{winner}"#, computer_image
33
 
34
 
35
+ image = gr.inputs.Image(shape=(192, 192))
36
+ label = gr.outputs.Label()
37
 
38
  examples = ['rock.jpg', 'paper.jpg', 'scissor.jpg']
39
 
40
  intf = gr.Interface(fn=play_game, inputs=image, outputs= label)
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)
44