Spaces:
Runtime error
Runtime error
SusiePHaltmann
commited on
Commit
•
d6d1ed2
1
Parent(s):
a8574a3
Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,26 @@ def main():
|
|
75 |
st.markdown("Create images from textual descriptions with Dall-PFT!")
|
76 |
st.button("Edit Photo")
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
|
|
79 |
## [C] Haltmann Earth Divison [C] - 20XX
|
80 |
|
81 |
|
|
|
75 |
st.markdown("Create images from textual descriptions with Dall-PFT!")
|
76 |
st.button("Edit Photo")
|
77 |
|
78 |
+
import streamlit as st
|
79 |
+
|
80 |
+
st.title("VQGAN Inpainting App")
|
81 |
+
st.markdown("This app uses a pre-trained VQGAN model to inpaint images.")
|
82 |
+
|
83 |
+
@st.cache(allow_output_mutation=True)
|
84 |
+
def load_model():
|
85 |
+
|
86 |
+
# Load the pre-trained VQGAN model
|
87 |
+
|
88 |
+
return vqgan.load_model('vqgan')
|
89 |
+
|
90 |
+
|
91 |
+
def inpaint(img, model, coords):
|
92 |
+
|
93 |
+
# Inpaint the selected region of the image using the VQGAN model
|
94 |
+
|
95 |
+
inpainted = vqgan.inpaint(img, model, coords)
|
96 |
|
97 |
+
return inpainted
|
98 |
## [C] Haltmann Earth Divison [C] - 20XX
|
99 |
|
100 |
|