Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,6 @@ from share_btn import community_icon_html, loading_icon_html, share_js
|
|
10 |
model_id = "runwayml/stable-diffusion-v1-5"
|
11 |
device = "cuda"
|
12 |
|
13 |
-
word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=True)
|
14 |
-
word_list = word_list_dataset["train"]['text']
|
15 |
|
16 |
is_gpu_busy = False
|
17 |
def infer(prompt):
|
@@ -19,10 +17,7 @@ def infer(prompt):
|
|
19 |
samples = 4
|
20 |
steps = 50
|
21 |
scale = 7.5
|
22 |
-
|
23 |
-
if re.search(rf"\b{filter}\b", prompt):
|
24 |
-
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|
25 |
-
|
26 |
images = []
|
27 |
url = os.getenv('JAX_BACKEND_URL')
|
28 |
payload = {'prompt': prompt}
|
|
|
10 |
model_id = "runwayml/stable-diffusion-v1-5"
|
11 |
device = "cuda"
|
12 |
|
|
|
|
|
13 |
|
14 |
is_gpu_busy = False
|
15 |
def infer(prompt):
|
|
|
17 |
samples = 4
|
18 |
steps = 50
|
19 |
scale = 7.5
|
20 |
+
|
|
|
|
|
|
|
21 |
images = []
|
22 |
url = os.getenv('JAX_BACKEND_URL')
|
23 |
payload = {'prompt': prompt}
|