Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from streamlit_lottie import st_lottie
|
|
5 |
from streamlit_option_menu import option_menu
|
6 |
import requests
|
7 |
import os
|
|
|
8 |
|
9 |
import cv2
|
10 |
import einops
|
@@ -29,7 +30,7 @@ st.set_page_config(
|
|
29 |
|
30 |
save_memory = False
|
31 |
|
32 |
-
@st.
|
33 |
def load_model():
|
34 |
model_path = hf_hub_download('lllyasviel/ControlNet', 'models/control_sd15_scribble.pth')
|
35 |
model = create_model('./models/cldm_v15.yaml').cpu()
|
@@ -86,7 +87,7 @@ def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resoluti
|
|
86 |
# return [255 - detected_map] + results
|
87 |
return results
|
88 |
|
89 |
-
@st.
|
90 |
def load_lottieurl(url: str):
|
91 |
r = requests.get(url)
|
92 |
if r.status_code != 200:
|
|
|
5 |
from streamlit_option_menu import option_menu
|
6 |
import requests
|
7 |
import os
|
8 |
+
os.system('pip install streamlit==1.19.0')
|
9 |
|
10 |
import cv2
|
11 |
import einops
|
|
|
30 |
|
31 |
save_memory = False
|
32 |
|
33 |
+
@st.cache_data
|
34 |
def load_model():
|
35 |
model_path = hf_hub_download('lllyasviel/ControlNet', 'models/control_sd15_scribble.pth')
|
36 |
model = create_model('./models/cldm_v15.yaml').cpu()
|
|
|
87 |
# return [255 - detected_map] + results
|
88 |
return results
|
89 |
|
90 |
+
@st.cache_data
|
91 |
def load_lottieurl(url: str):
|
92 |
r = requests.get(url)
|
93 |
if r.status_code != 200:
|