Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -180,8 +180,6 @@ def crop_and_process_image(input_img,input_age,output_ag):
|
|
180 |
# Define the output image component
|
181 |
output_image = gr.Image(label="Output Image", type="pil")
|
182 |
|
183 |
-
input_image.style(height=512, width=512)
|
184 |
-
output_image.style(height=512, width=512)
|
185 |
|
186 |
input_age = gr.Slider(label="Current Age")
|
187 |
output_age = gr.Slider(label="Desired Age")
|
@@ -198,8 +196,10 @@ def process_image(input_img,input_age,output_age):
|
|
198 |
output = Image.fromarray(output)
|
199 |
output.show()
|
200 |
return output
|
|
|
|
|
201 |
|
202 |
|
203 |
|
204 |
# Create the Gradio interface
|
205 |
-
gr.Interface(fn=process_image, inputs=[gr.Image(source="upload", type="filepath", label="init_img | 512*512 px"),input_age,output_age], outputs=output_image, title="Age Transformation").launch(debug=True)
|
|
|
180 |
# Define the output image component
|
181 |
output_image = gr.Image(label="Output Image", type="pil")
|
182 |
|
|
|
|
|
183 |
|
184 |
input_age = gr.Slider(label="Current Age")
|
185 |
output_age = gr.Slider(label="Desired Age")
|
|
|
196 |
output = Image.fromarray(output)
|
197 |
output.show()
|
198 |
return output
|
199 |
+
|
200 |
+
description="Enter age of input image and desired age. Crop out face. Better results on high resolution."
|
201 |
|
202 |
|
203 |
|
204 |
# Create the Gradio interface
|
205 |
+
gr.Interface(fn=process_image, inputs=[gr.Image(source="upload", type="filepath", label="init_img | 512*512 px"),input_age,output_age], outputs=output_image,description=description, title="Age Transformation").launch(debug=True)
|