Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ from share_btn import community_icon_html, loading_icon_html, share_js
|
|
| 15 |
#word_list = word_list_dataset["train"]['text']
|
| 16 |
word_list = []
|
| 17 |
|
| 18 |
-
def infer(prompt, negative="low_quality", scale=7, profile: gr.OAuthProfile | None):
|
| 19 |
for filter in word_list:
|
| 20 |
if re.search(rf"\b{filter}\b", prompt):
|
| 21 |
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|
|
|
|
| 15 |
#word_list = word_list_dataset["train"]['text']
|
| 16 |
word_list = []
|
| 17 |
|
| 18 |
+
def infer(prompt, negative="low_quality", scale=7, profile: gr.OAuthProfile | None = None):
|
| 19 |
for filter in word_list:
|
| 20 |
if re.search(rf"\b{filter}\b", prompt):
|
| 21 |
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|