Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -178,8 +178,8 @@ input_image = gr.Image(label="Input Image", interactive=True)
|
|
| 178 |
|
| 179 |
output_image = gr.Image(label="Output Image", type="pil")
|
| 180 |
|
| 181 |
-
input_age = gr.Slider(label="Current Age")
|
| 182 |
-
output_age = gr.Slider(label="Desired Age")
|
| 183 |
|
| 184 |
|
| 185 |
def process_image(input_img,input_age,output_age):
|
|
@@ -191,7 +191,8 @@ def process_image(input_img,input_age,output_age):
|
|
| 191 |
|
| 192 |
description="Enter age of input image and desired age. Crop out face. Better results on high resolution."
|
| 193 |
|
|
|
|
| 194 |
|
| 195 |
|
| 196 |
# Create the Gradio interface
|
| 197 |
-
gr.Interface(fn=process_image, inputs=[input_image,input_age,output_age], outputs=output_image,description=description, title="Age Transformation").launch(debug=True)
|
|
|
|
| 178 |
|
| 179 |
output_image = gr.Image(label="Output Image", type="pil")
|
| 180 |
|
| 181 |
+
input_age = gr.Slider(label="Current Age",minimum=18,maximum=80)
|
| 182 |
+
output_age = gr.Slider(label="Desired Age",minimum=18,maximum=80)
|
| 183 |
|
| 184 |
|
| 185 |
def process_image(input_img,input_age,output_age):
|
|
|
|
| 191 |
|
| 192 |
description="Enter age of input image and desired age. Crop out face. Better results on high resolution."
|
| 193 |
|
| 194 |
+
examples = gradio.Examples([["example_image_input.png",20,40]], inputs=[input_image,input_age,input_age])
|
| 195 |
|
| 196 |
|
| 197 |
# Create the Gradio interface
|
| 198 |
+
gr.Interface(fn=process_image, inputs=[input_image,input_age,output_age], outputs=output_image,description=description, title="Age Transformation",examples=examples).launch(debug=True)
|