Commit
·
1b5d275
1
Parent(s):
400f7d0
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
17 |
word_list_dataset = load_dataset("openskyml/bad-words-prompt-list", data_files="en.txt", use_auth_token=True)
|
18 |
word_list = word_list_dataset["train"]['text']
|
19 |
|
20 |
-
def query(prompt, is_negative=False, steps=
|
21 |
for filter in word_list:
|
22 |
if re.search(rf"\b{filter}\b", prompt):
|
23 |
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|
|
|
17 |
word_list_dataset = load_dataset("openskyml/bad-words-prompt-list", data_files="en.txt", use_auth_token=True)
|
18 |
word_list = word_list_dataset["train"]['text']
|
19 |
|
20 |
+
def query(prompt, is_negative=False, steps=5, cfg_scale=7, seed=None, num_images=4):
|
21 |
for filter in word_list:
|
22 |
if re.search(rf"\b{filter}\b", prompt):
|
23 |
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|