liruiw commited on
Commit
ca9c8aa
·
1 Parent(s): a100e67
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -55,9 +55,9 @@ def model(direction, genie):
55
  return Image.fromarray(next_image)
56
 
57
  @spaces.GPU
58
- def handle_input(direction, state):
59
  print(f"User clicked: {direction}")
60
- new_image = model(direction, state)
61
  return new_image
62
 
63
  @spaces.GPU
@@ -93,7 +93,9 @@ if __name__ == '__main__':
93
  with gr.Blocks() as demo:
94
  genie_instance = gr.State({'genie': genie})
95
  genie.device = "cuda"
96
-
 
 
97
  with gr.Row():
98
  image_selector = gr.Dropdown(
99
  choices=available_images, value=available_images[0], label="Select an Image"
 
55
  return Image.fromarray(next_image)
56
 
57
  @spaces.GPU
58
+ def handle_input(direction):
59
  print(f"User clicked: {direction}")
60
+ new_image = genie(direction)
61
  return new_image
62
 
63
  @spaces.GPU
 
93
  with gr.Blocks() as demo:
94
  genie_instance = gr.State({'genie': genie})
95
  genie.device = "cuda"
96
+ with gr.Row():
97
+ gr.Textbox(label='HMA Demo: Select a prompt initial image from the gallery and Interact with arrow keys. \n'
98
+ 'Note: the speed is limited due to free GPU in HF and the interface ', lines=1)
99
  with gr.Row():
100
  image_selector = gr.Dropdown(
101
  choices=available_images, value=available_images[0], label="Select an Image"