Brasd99 commited on
Commit
8456408
1 Parent(s): 3ceff75

Updated UI

Browse files
Files changed (1) hide show
  1. app.py +14 -17
app.py CHANGED
@@ -27,20 +27,17 @@ densepose_weights = os.path.join(current_path, 'data', 'weights.pkl')
27
 
28
  texture_processor = TextureProcessor(densepose_config, densepose_weights)
29
 
30
- inputs = [
31
- gr.inputs.Image(label='Person Image', type='numpy'),
32
- gr.inputs.Image(label='Model Image (with clothes)', type='numpy')
33
- ]
34
-
35
- outputs = gr.outputs.Image(label='Result Image', type='numpy')
36
-
37
- title = 'JustClothify'
38
- description = 'Upload an image of a person and an image of a model with clothes, the system will generate an image of a person wearing these clothes.'
39
-
40
- gr.Interface(
41
- fn=image_processing,
42
- inputs=inputs,
43
- outputs=outputs,
44
- theme='soft',
45
- title=title,
46
- description=description).launch()
 
27
 
28
  texture_processor = TextureProcessor(densepose_config, densepose_weights)
29
 
30
+ title = '<h1 style="text-align:center">JustClothify</h1>'
31
+
32
+ with gr.Blocks(theme='soft', title='AnswerMate') as blocks:
33
+ gr.HTML(title)
34
+ gr.Markdown('Upload an image of a person and an image of a model with clothes, the system will generate an image of a person wearing these clothes.')
35
+ with gr.Row():
36
+ person_image = gr.inputs.Image(label='Person Image', type='numpy')
37
+ model_image = gr.inputs.Image(label='Model Image (with clothes)', type='numpy')
38
+ process_button = gr.Button('Process')
39
+ outputs = gr.outputs.Image(label='Result Image', type='numpy')
40
+
41
+ process_button.click(fn=image_processing, inputs=[person_image, model_image], outputs=outputs)
42
+
43
+ blocks.launch()