Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
import torch
|
4 |
from torch import autocast
|
5 |
from diffusers import StableDiffusionPipeline
|
@@ -22,7 +22,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
22 |
pipe = pipe.to(device)
|
23 |
# When running locally, you won`t have access to this, so you can remove this part
|
24 |
word_list_dataset = load_dataset(
|
25 |
-
"stabilityai/word-list", data_files="list.txt", use_auth_token=
|
26 |
word_list = word_list_dataset["train"]['text']
|
27 |
|
28 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
import torch
|
4 |
from torch import autocast
|
5 |
from diffusers import StableDiffusionPipeline
|
|
|
22 |
pipe = pipe.to(device)
|
23 |
# When running locally, you won`t have access to this, so you can remove this part
|
24 |
word_list_dataset = load_dataset(
|
25 |
+
"stabilityai/word-list", data_files="list.txt", use_auth_token=os.environ.get('auth_token')
|
26 |
word_list = word_list_dataset["train"]['text']
|
27 |
|
28 |
|