Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
#20146
by
rockyyyyyy
- opened
app.py
CHANGED
@@ -14,10 +14,6 @@ word_list = word_list_dataset["train"]['text']
|
|
14 |
is_gpu_busy = False
|
15 |
def infer(prompt, negative, scale):
|
16 |
global is_gpu_busy
|
17 |
-
for filter in word_list:
|
18 |
-
if re.search(rf"\b{filter}\b", prompt):
|
19 |
-
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|
20 |
-
|
21 |
images = []
|
22 |
url = os.getenv('JAX_BACKEND_URL')
|
23 |
payload = {'prompt': prompt, 'negative_prompt': negative, 'guidance_scale': scale}
|
|
|
14 |
is_gpu_busy = False
|
15 |
def infer(prompt, negative, scale):
|
16 |
global is_gpu_busy
|
|
|
|
|
|
|
|
|
17 |
images = []
|
18 |
url = os.getenv('JAX_BACKEND_URL')
|
19 |
payload = {'prompt': prompt, 'negative_prompt': negative, 'guidance_scale': scale}
|