Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +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 |
-
|
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,8 +321,7 @@ with gr.Blocks(css=css) as block_with_history:
|
|
322 |
with gr.Tab("Demo"):
|
323 |
block.render()
|
324 |
with gr.Tab("Past generations"):
|
325 |
-
|
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")
|
|
|
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 |
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")
|