Commit
·
883b87e
1
Parent(s):
f6d651a
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ st.markdown(
|
|
56 |
**Apenas desenhe as partes da imagem que deseja remover, então nossa IA irá removê-las.**
|
57 |
"""
|
58 |
)
|
59 |
-
uploaded_file = st.file_uploader("
|
60 |
|
61 |
if uploaded_file is not None:
|
62 |
|
@@ -101,12 +101,12 @@ if uploaded_file is not None:
|
|
101 |
(im[:, :, 1] == 0) &
|
102 |
(im[:, :, 2] == 255)
|
103 |
)
|
104 |
-
im[background] = [0, 0, 0,
|
105 |
im[drawing]=[0,0,0,0] # RGBA
|
106 |
|
107 |
reuse = False
|
108 |
|
109 |
-
if st.button('
|
110 |
|
111 |
with st.spinner("A IA está fazendo a mágica!"):
|
112 |
output = process_inpaint(np.array(img_input), np.array(im)) #TODO Put button here
|
@@ -114,7 +114,7 @@ if uploaded_file is not None:
|
|
114 |
|
115 |
|
116 |
|
117 |
-
st.write("
|
118 |
st.image(img_output)
|
119 |
# reuse = st.button('Edit again (Re-use this image)', on_click=set_image, args=(inpainted_img, ))
|
120 |
|
@@ -126,5 +126,5 @@ if uploaded_file is not None:
|
|
126 |
label="Download Imagem"
|
127 |
)
|
128 |
|
129 |
-
st.info("
|
130 |
-
"
|
|
|
56 |
**Apenas desenhe as partes da imagem que deseja remover, então nossa IA irá removê-las.**
|
57 |
"""
|
58 |
)
|
59 |
+
uploaded_file = st.file_uploader("Escolher imagem:", accept_multiple_files=False, type=["png", "jpg", "jpeg"])
|
60 |
|
61 |
if uploaded_file is not None:
|
62 |
|
|
|
101 |
(im[:, :, 1] == 0) &
|
102 |
(im[:, :, 2] == 255)
|
103 |
)
|
104 |
+
im[background] = [0, 0, 0, 0]
|
105 |
im[drawing]=[0,0,0,0] # RGBA
|
106 |
|
107 |
reuse = False
|
108 |
|
109 |
+
if st.button('Remover Elementos'):
|
110 |
|
111 |
with st.spinner("A IA está fazendo a mágica!"):
|
112 |
output = process_inpaint(np.array(img_input), np.array(im)) #TODO Put button here
|
|
|
114 |
|
115 |
|
116 |
|
117 |
+
st.write("A IA terminou o trabalho!")
|
118 |
st.image(img_output)
|
119 |
# reuse = st.button('Edit again (Re-use this image)', on_click=set_image, args=(inpainted_img, ))
|
120 |
|
|
|
126 |
label="Download Imagem"
|
127 |
)
|
128 |
|
129 |
+
st.info("DICA: Se o resultado não for perfeito, você pode voltar a editar a imagem"
|
130 |
+
"e clicar em Remover Elementos.")
|