Spaces:
Lucenscat
/
Runtime error

Wauplin HF staff commited on
Commit
be91f20
1 Parent(s): d725dd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -15,7 +15,8 @@ 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 = 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.")
@@ -321,7 +322,8 @@ with gr.Blocks(css=css) as block_with_history:
321
  with gr.Tab("Demo"):
322
  block.render()
323
  with gr.Tab("Past generations"):
324
- user_history.render()
 
325
 
326
  block_with_history.queue(concurrency_count=4, max_size=10).launch()
327
  #block_with_history.launch(server_name="0.0.0.0")
 
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): # TODO: re-enable user_history when oauth fixed
19
+ def infer(prompt, negative="low_quality", scale=7, profile: None = None):
20
  for filter in word_list:
21
  if re.search(rf"\b{filter}\b", prompt):
22
  raise gr.Error("Unsafe content found. Please try again with different prompts.")
 
322
  with gr.Tab("Demo"):
323
  block.render()
324
  with gr.Tab("Past generations"):
325
+ gr.Markdown("Deactivated (WIP)")
326
+ # user_history.render() # TODO: re-enable user_history when oauth fixed
327
 
328
  block_with_history.queue(concurrency_count=4, max_size=10).launch()
329
  #block_with_history.launch(server_name="0.0.0.0")