Spaces:
Paused
Paused
Upload app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,13 @@ import warnings
|
|
| 16 |
|
| 17 |
warnings.filterwarnings("ignore")
|
| 18 |
|
| 19 |
-
@st.cache_data
|
| 20 |
def get_model():
|
| 21 |
model_path = "models/pix2pix.keras"
|
| 22 |
if not os.path.exists(model_path):
|
| 23 |
model_path = "../saved_models/pix2pix/pix2pix.keras"
|
| 24 |
|
| 25 |
-
|
| 26 |
-
pix2pix = load_model(model_path)
|
| 27 |
return pix2pix
|
| 28 |
|
| 29 |
st.markdown("<center><h1>ComicBooks.AI</h1></center>", unsafe_allow_html=True)
|
|
|
|
| 16 |
|
| 17 |
warnings.filterwarnings("ignore")
|
| 18 |
|
| 19 |
+
@st.cache_data(show_spinner="Loading the model...")
|
| 20 |
def get_model():
|
| 21 |
model_path = "models/pix2pix.keras"
|
| 22 |
if not os.path.exists(model_path):
|
| 23 |
model_path = "../saved_models/pix2pix/pix2pix.keras"
|
| 24 |
|
| 25 |
+
pix2pix = load_model(model_path)
|
|
|
|
| 26 |
return pix2pix
|
| 27 |
|
| 28 |
st.markdown("<center><h1>ComicBooks.AI</h1></center>", unsafe_allow_html=True)
|