LN1996 commited on
Commit
b110321
1 Parent(s): fa2fb4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -8
app.py CHANGED
@@ -36,13 +36,30 @@ with gr.Blocks() as casa:
36
 
37
 
38
  with gr.Tab("ReDesign"):
39
- pass
 
 
 
 
 
 
 
 
 
40
 
41
  with gr.Tab("Recommendation"):
42
- pass
43
-
44
-
 
 
 
 
 
 
 
45
 
 
46
 
47
  # demo = gr.Interface(casa_ai_run,
48
  # inputs = [gr.ImageEditor(sources='upload', brush=gr.Brush(colors=["#FFFFFF"]), elem_id="image_upload", type="pil", label="Upload", layers=False, eraser=True, transforms=[]),
@@ -54,7 +71,4 @@ with gr.Blocks() as casa:
54
  # title = title,
55
  # description = description,
56
  # )
57
- casa.launch()
58
-
59
-
60
-
 
36
 
37
 
38
  with gr.Tab("ReDesign"):
39
+ with gr.Row():
40
+ with gr.Column():
41
+ inputs = [
42
+ gr.ImageEditor(sources='upload', brush=gr.Brush(colors=["#FFFFFF"]), elem_id="image_upload", type="pil", label="Upload", layers=False, eraser=True, transforms=[]),
43
+ gr.Textbox(label="Prompt for redesigning masked object")]
44
+ with gr.Column():
45
+ outputs = [gr.Image(label="Image with new designed object")]
46
+
47
+ submit_btn = gr.Button("Submit")
48
+ submit_btn.click(casa_ai_run, inputs=inputs, outputs=outputs)
49
 
50
  with gr.Tab("Recommendation"):
51
+ with gr.Row():
52
+ with gr.Column():
53
+ inputs = [
54
+ gr.ImageEditor(sources='upload', brush=gr.Brush(colors=["#FFFFFF"]), elem_id="image_upload", type="pil", label="Upload", layers=False, eraser=True, transforms=[]),
55
+ ]
56
+ with gr.Column():
57
+ outputs = [gr.Image(label="Image with new designed object")]
58
+
59
+ submit_btn = gr.Button("Submit")
60
+ submit_btn.click(casa_ai_run, inputs=inputs, outputs=outputs)
61
 
62
+ casa.launch()
63
 
64
  # demo = gr.Interface(casa_ai_run,
65
  # inputs = [gr.ImageEditor(sources='upload', brush=gr.Brush(colors=["#FFFFFF"]), elem_id="image_upload", type="pil", label="Upload", layers=False, eraser=True, transforms=[]),
 
71
  # title = title,
72
  # description = description,
73
  # )
74
+ # demo.launch()