SusiePHaltmann commited on
Commit
21149ad
·
1 Parent(s): dc69ad9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -23
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.set_option('deprecation.showfileUploaderEncoding', False)
78
 
79
-
80
- def main():
 
 
81
 
82
- # Load the image and initialize the inpainter.
83
- image = st.file_uploader("Choose an image", type=["png", "jpg"])
84
 
85
- if image is not None:
86
- inpainter = HaltmannInpainter()
87
 
88
- # Get the dimensions of the uploaded image.
89
- width, height = Image.open(image).size
90
 
91
- # Resize the uploaded image if it is too large for our model (> 512x512).
92
- if width > 512 or height > 512:
93
- max_dim = max(width, height)
94
 
95
- resize_factor = 512 / max_dim
 
96
 
97
- width, height = int(width * resize_factor), int(height * resize_factor)
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!