vedantdere commited on
Commit
db124b1
·
1 Parent(s): 3bf769e

removed error code

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -10,8 +10,8 @@ import base64
10
 
11
  from share_btn import community_icon_html, loading_icon_html, share_js
12
 
13
- word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt")
14
- word_list = word_list_dataset["train"]['text']
15
 
16
  is_gpu_busy = False
17
  def infer(prompt, negative, scale):
@@ -35,11 +35,11 @@ def infer(prompt, negative, scale):
35
  Exception: If the HTTP request to the backend fails or returns invalid data.
36
  """
37
  global is_gpu_busy
38
- for filter in word_list:
39
- if re.search(rf"\b{filter}\b", prompt):
40
- print(filter)
41
- print(prompt)
42
- raise gr.Error("Unsafe content found. Please try again with different prompts.")
43
 
44
  images = []
45
  url = os.getenv('JAX_BACKEND_URL')
 
10
 
11
  from share_btn import community_icon_html, loading_icon_html, share_js
12
 
13
+ # word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt")
14
+ # word_list = word_list_dataset["train"]['text']
15
 
16
  is_gpu_busy = False
17
  def infer(prompt, negative, scale):
 
35
  Exception: If the HTTP request to the backend fails or returns invalid data.
36
  """
37
  global is_gpu_busy
38
+ # for filter in word_list:
39
+ # if re.search(rf"\b{filter}\b", prompt):
40
+ # print(filter)
41
+ # print(prompt)
42
+ # raise gr.Error("Unsafe content found. Please try again with different prompts.")
43
 
44
  images = []
45
  url = os.getenv('JAX_BACKEND_URL')