Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,11 @@ if is_colab:
|
|
25 |
scheduler = DDIMScheduler.from_config(model_id_or_path, subfolder="scheduler")
|
26 |
pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, scheduler=scheduler, torch_dtype=torch_dtype)
|
27 |
else:
|
28 |
-
import streamlit as st
|
29 |
-
scheduler = DDIMScheduler.from_config(model_id_or_path, use_auth_token=st.secrets["USER_TOKEN"], subfolder="scheduler")
|
30 |
-
pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, use_auth_token=st.secrets["USER_TOKEN"], scheduler=scheduler, torch_dtype=torch_dtype)
|
|
|
|
|
31 |
tokenizer = pipe.tokenizer
|
32 |
|
33 |
if torch.cuda.is_available():
|
|
|
25 |
scheduler = DDIMScheduler.from_config(model_id_or_path, subfolder="scheduler")
|
26 |
pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, scheduler=scheduler, torch_dtype=torch_dtype)
|
27 |
else:
|
28 |
+
# import streamlit as st
|
29 |
+
# scheduler = DDIMScheduler.from_config(model_id_or_path, use_auth_token=st.secrets["USER_TOKEN"], subfolder="scheduler")
|
30 |
+
# pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, use_auth_token=st.secrets["USER_TOKEN"], scheduler=scheduler, torch_dtype=torch_dtype)
|
31 |
+
scheduler = DDIMScheduler.from_config(model_id_or_path, use_auth_token=os.environ.get("USER_TOKEN"), subfolder="scheduler")
|
32 |
+
pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, use_auth_token=os.environ.get("USER_TOKEN"), scheduler=scheduler, torch_dtype=torch_dtype)
|
33 |
tokenizer = pipe.tokenizer
|
34 |
|
35 |
if torch.cuda.is_available():
|