Commit
·
8e6e7dd
1
Parent(s):
41e1888
rename
Browse files
app.py
CHANGED
|
@@ -1,8 +1,15 @@
|
|
| 1 |
import time
|
| 2 |
import os
|
| 3 |
-
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
import spaces
|
| 7 |
import torch
|
| 8 |
from diffusers import AutoencoderKLCogVideoX, CogVideoXDDIMScheduler
|
|
|
|
| 1 |
import time
|
| 2 |
import os
|
| 3 |
+
from huggingface_hub import hf_hub_download, login
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
+
|
| 7 |
+
# Authenticate with Hugging Face (token is auto-available in HF Spaces)
|
| 8 |
+
try:
|
| 9 |
+
login(token=os.environ.get("HF_TOKEN"))
|
| 10 |
+
print("Successfully authenticated with Hugging Face")
|
| 11 |
+
except Exception as e:
|
| 12 |
+
print(f"Warning: Could not authenticate with HF: {e}")
|
| 13 |
import spaces
|
| 14 |
import torch
|
| 15 |
from diffusers import AutoencoderKLCogVideoX, CogVideoXDDIMScheduler
|