Commit
·
d2d7787
1
Parent(s):
46f0463
check if exists first
Browse files
app.py
CHANGED
|
@@ -25,6 +25,8 @@ def gitclone(url):
|
|
| 25 |
|
| 26 |
@st.cache
|
| 27 |
def initial_clones():
|
|
|
|
|
|
|
| 28 |
model_path = f'.'
|
| 29 |
gitclone("https://github.com/MSFTserver/pytorch3d-lite.git")
|
| 30 |
gitclone("https://github.com/CompVis/taming-transformers.git")
|
|
@@ -32,7 +34,9 @@ def initial_clones():
|
|
| 32 |
gitclone("https://github.com/crowsonkb/guided-diffusion.git")
|
| 33 |
gitclone("https://github.com/assafshocher/ResizeRight.git")
|
| 34 |
gitclone("https://github.com/isl-org/MiDaS.git")
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
gitclone("https://github.com/CompVis/latent-diffusion.git")
|
| 37 |
gitclone("https://github.com/shariqfarooq123/AdaBins.git")
|
| 38 |
gitclone("https://github.com/alembics/disco-diffusion.git")
|
|
@@ -105,7 +109,7 @@ div[data-testid="stToolbar"] button{pointer-events: auto !important;filter: gray
|
|
| 105 |
.bottom-line small{opacity: 0.75}
|
| 106 |
</style>
|
| 107 |
"""
|
| 108 |
-
|
| 109 |
|
| 110 |
class DefaultPaths:
|
| 111 |
root_path = f"."
|
|
|
|
| 25 |
|
| 26 |
@st.cache
|
| 27 |
def initial_clones():
|
| 28 |
+
st.set_page_config(layout="wide")
|
| 29 |
+
root_path = f'.'
|
| 30 |
model_path = f'.'
|
| 31 |
gitclone("https://github.com/MSFTserver/pytorch3d-lite.git")
|
| 32 |
gitclone("https://github.com/CompVis/taming-transformers.git")
|
|
|
|
| 34 |
gitclone("https://github.com/crowsonkb/guided-diffusion.git")
|
| 35 |
gitclone("https://github.com/assafshocher/ResizeRight.git")
|
| 36 |
gitclone("https://github.com/isl-org/MiDaS.git")
|
| 37 |
+
print(path_exists('MiDaS'))
|
| 38 |
+
if not path_exists(f'{root_path}/MiDaS/midas_utils.py'):
|
| 39 |
+
os.rename("MiDaS/utils.py", "MiDaS/midas_utils.py")
|
| 40 |
gitclone("https://github.com/CompVis/latent-diffusion.git")
|
| 41 |
gitclone("https://github.com/shariqfarooq123/AdaBins.git")
|
| 42 |
gitclone("https://github.com/alembics/disco-diffusion.git")
|
|
|
|
| 109 |
.bottom-line small{opacity: 0.75}
|
| 110 |
</style>
|
| 111 |
"""
|
| 112 |
+
|
| 113 |
|
| 114 |
class DefaultPaths:
|
| 115 |
root_path = f"."
|