Spaces:
Runtime error
Runtime error
add conditional hf login
Browse files
app.py
CHANGED
@@ -284,10 +284,6 @@ def run_demo_server(pipe):
|
|
284 |
os.environ["GRADIO_ALLOW_FLAGGING"] = "never"
|
285 |
|
286 |
gradio_theme = gr.themes.Default()
|
287 |
-
# gradio_theme.set(
|
288 |
-
# section_header_text_size="20px",
|
289 |
-
# section_header_text_weight="bold",
|
290 |
-
# )
|
291 |
|
292 |
with gr.Blocks(
|
293 |
theme=gradio_theme,
|
@@ -801,7 +797,8 @@ def main():
|
|
801 |
CHECKPOINT = "prs-eth/marigold-v1-0"
|
802 |
CHECKPOINT_UNET_LCM = "prs-eth/marigold-lcm-v1-0"
|
803 |
|
804 |
-
|
|
|
805 |
|
806 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
807 |
|
|
|
284 |
os.environ["GRADIO_ALLOW_FLAGGING"] = "never"
|
285 |
|
286 |
gradio_theme = gr.themes.Default()
|
|
|
|
|
|
|
|
|
287 |
|
288 |
with gr.Blocks(
|
289 |
theme=gradio_theme,
|
|
|
797 |
CHECKPOINT = "prs-eth/marigold-v1-0"
|
798 |
CHECKPOINT_UNET_LCM = "prs-eth/marigold-lcm-v1-0"
|
799 |
|
800 |
+
if "HF_TOKEN_LOGIN" in os.environ:
|
801 |
+
login(token=os.environ["HF_TOKEN_LOGIN"])
|
802 |
|
803 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
804 |
|