Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,16 @@ from huggingface_hub import InferenceClient
|
|
| 7 |
from diffusers import DiffusionPipeline
|
| 8 |
import torch
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# =========================================================
|
| 11 |
# Utility functions
|
| 12 |
# =========================================================
|
|
|
|
| 7 |
from diffusers import DiffusionPipeline
|
| 8 |
import torch
|
| 9 |
|
| 10 |
+
from huggingface_hub import login
|
| 11 |
+
import os
|
| 12 |
+
|
| 13 |
+
token = os.environ.get("HF_TOKEN")
|
| 14 |
+
if token:
|
| 15 |
+
login(token=token)
|
| 16 |
+
else:
|
| 17 |
+
print("Warning: HF_TOKEN not set. You may not be able to access private models or tools.")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
# =========================================================
|
| 21 |
# Utility functions
|
| 22 |
# =========================================================
|