Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import torch
|
|
8 |
from huggingface_hub import login
|
9 |
|
10 |
|
11 |
-
HF_TOKEN = os.
|
12 |
|
13 |
if not HF_TOKEN:
|
14 |
raise ValueError("Please set your Hugging Face API token in a .env file")
|
@@ -35,7 +35,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
35 |
MAX_IMAGE_SIZE = 1024
|
36 |
|
37 |
|
38 |
-
|
39 |
def infer(
|
40 |
prompt,
|
41 |
negative_prompt,
|
|
|
8 |
from huggingface_hub import login
|
9 |
|
10 |
|
11 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
12 |
|
13 |
if not HF_TOKEN:
|
14 |
raise ValueError("Please set your Hugging Face API token in a .env file")
|
|
|
35 |
MAX_IMAGE_SIZE = 1024
|
36 |
|
37 |
|
38 |
+
@spaces.GPU #[uncomment to use ZeroGPU]
|
39 |
def infer(
|
40 |
prompt,
|
41 |
negative_prompt,
|