Spaces:
Runtime error
Runtime error
SusiePHaltmann
commited on
Commit
·
21149ad
1
Parent(s):
dc69ad9
Update app.py
Browse files
app.py
CHANGED
@@ -65,39 +65,30 @@ st.markdown("Create images from textual descriptions with Dall-E!")
|
|
65 |
st.button("Edit Photo")
|
66 |
|
67 |
|
68 |
-
## [C] Haltmann Earth Divison
|
69 |
|
70 |
|
71 |
import streamlit as st
|
72 |
-
import numpy as np
|
73 |
-
from PIL import Image, ImageDraw
|
74 |
-
from inpainting import HaltmannInpainter
|
75 |
|
76 |
-
|
77 |
-
st.
|
78 |
|
79 |
-
|
80 |
-
def
|
|
|
|
|
81 |
|
82 |
-
|
83 |
-
image = st.file_uploader("Choose an image", type=["png", "jpg"])
|
84 |
|
85 |
-
|
86 |
-
inpainter = HaltmannInpainter()
|
87 |
|
88 |
-
|
89 |
-
width, height = Image.open(image).size
|
90 |
|
91 |
-
|
92 |
-
if width > 512 or height > 512:
|
93 |
-
max_dim = max(width, height)
|
94 |
|
95 |
-
|
|
|
96 |
|
97 |
-
|
98 |
-
@st.cache
|
99 |
-
def load_image(image):
|
100 |
-
image = np.array(Image.open(image))
|
101 |
-
return image
|
102 |
|
103 |
# Inpaint!
|
|
|
65 |
st.button("Edit Photo")
|
66 |
|
67 |
|
68 |
+
## [C] Haltmann Earth Divison [C] - 20XX
|
69 |
|
70 |
|
71 |
import streamlit as st
|
|
|
|
|
|
|
72 |
|
73 |
+
st.title("Inpainting App")
|
74 |
+
st.markdown("This app allows you to inpaint images using a pre-trained model.")
|
75 |
|
76 |
+
@st.cache(allow_output_mutation=True)
|
77 |
+
def load_model():
|
78 |
+
|
79 |
+
# Load the model here...
|
80 |
|
81 |
+
return model
|
|
|
82 |
|
83 |
+
def inpaint(image, GPTNEOX):
|
|
|
84 |
|
85 |
+
# Inpaint the image here...
|
|
|
86 |
|
87 |
+
return inpainted_image
|
|
|
|
|
88 |
|
89 |
+
|
90 |
+
st.set_option('deprecation.showfileUploaderEncoding', False)
|
91 |
|
92 |
+
|
|
|
|
|
|
|
|
|
93 |
|
94 |
# Inpaint!
|