fffiloni commited on
Commit
b198dd8
1 Parent(s): 661eb7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -50,6 +50,7 @@ css="""
50
  """
51
  with gr.Blocks(css=css) as demo:
52
  with gr.Column(elem_id="col-container"):
 
53
  gr.HTML("""
54
  <h2 style="text-align: center;">
55
  HandRefiner
@@ -62,9 +63,10 @@ with gr.Blocks(css=css) as demo:
62
  <a href="https://huggingface.co/spaces/fffiloni/HandRefiner?duplicate=true"><img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-lg.svg" alt="Duplicate this Space"></a>
63
  </p>
64
  """)
 
65
  with gr.Row():
66
  with gr.Column():
67
- image = gr.Image(type='filepath')
68
  gr.Examples(
69
  examples = [
70
  "examples/IMG_1050.jpeg",
@@ -75,9 +77,10 @@ with gr.Blocks(css=css) as demo:
75
  inputs = [image]
76
  )
77
  textbox = gr.Textbox(show_label=False, value="a person facing the camera, making a hand gesture, indoor")
78
- seed = gr.Slider(label="Seed", minimum=0, maximum=1000000, value=643534)
79
- button = gr.Button()
80
- output_image = gr.Image(show_label=False, type="filepath", interactive=False)
 
81
 
82
  button.click(fn=generate, inputs=[image, textbox, seed], outputs=[output_image])
83
 
 
50
  """
51
  with gr.Blocks(css=css) as demo:
52
  with gr.Column(elem_id="col-container"):
53
+
54
  gr.HTML("""
55
  <h2 style="text-align: center;">
56
  HandRefiner
 
63
  <a href="https://huggingface.co/spaces/fffiloni/HandRefiner?duplicate=true"><img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-lg.svg" alt="Duplicate this Space"></a>
64
  </p>
65
  """)
66
+
67
  with gr.Row():
68
  with gr.Column():
69
+ image = gr.Image(type='filepath', sources=["upload"])
70
  gr.Examples(
71
  examples = [
72
  "examples/IMG_1050.jpeg",
 
77
  inputs = [image]
78
  )
79
  textbox = gr.Textbox(show_label=False, value="a person facing the camera, making a hand gesture, indoor")
80
+ seed = gr.Slider(label="Seed", minimum=0, maximum=1000000, value=42)
81
+ button = gr.Button("Submit")
82
+
83
+ output_image = gr.Image(label="Fixed hands result")
84
 
85
  button.click(fn=generate, inputs=[image, textbox, seed], outputs=[output_image])
86