Spaces:
Runtime error
Runtime error
SusiePHaltmann
commited on
Commit
•
610fa24
1
Parent(s):
49debfe
Update app.py
Browse files
app.py
CHANGED
@@ -14,3 +14,32 @@ st.write("Welcome! Please wait ?? years for the ai to be done.")
|
|
14 |
|
15 |
import streamlit as st
|
16 |
st.markdown("Welcome! Please wait ?? years for the ai to be done.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
import streamlit as st
|
16 |
st.markdown("Welcome! Please wait ?? years for the ai to be done.")
|
17 |
+
|
18 |
+
import streamlit as st
|
19 |
+
|
20 |
+
from PIL import Image
|
21 |
+
|
22 |
+
import numpy as np
|
23 |
+
|
24 |
+
|
25 |
+
def inpaint(img, mask):
|
26 |
+
|
27 |
+
"""Inpaints the given image using the given mask.
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
Args:
|
32 |
+
|
33 |
+
img: The image to inpaint. Must be a 3-channel RGB image.
|
34 |
+
|
35 |
+
mask: The inpainting mask. Must be a binary 3-channel image
|
36 |
+
|
37 |
+
with 1s indicating the area to inpaint and 0s indicating
|
38 |
+
|
39 |
+
the area to leave unchanged.
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Returns:
|
44 |
+
|
45 |
+
The inpainted image as a 3-channel RGB numpy array. """
|