Spaces:
Running
Running
Commit
·
46520c5
1
Parent(s):
0a01100
init
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import shutil
|
|
| 5 |
import tempfile
|
| 6 |
import time
|
| 7 |
import json
|
| 8 |
-
from util import process_image_edit, download_and_check_result_nsfw
|
| 9 |
from nfsw import NSFWDetector
|
| 10 |
|
| 11 |
# i18n
|
|
@@ -539,7 +539,7 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 539 |
if current_phase == 'blocked':
|
| 540 |
# Generate blocked limit button with different URL for restricted countries
|
| 541 |
if is_restricted:
|
| 542 |
-
blocked_url =
|
| 543 |
else:
|
| 544 |
blocked_url = 'https://omnicreator.net/#generator'
|
| 545 |
|
|
@@ -577,7 +577,7 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 577 |
wait_minutes_int = int(wait_minutes) + 1
|
| 578 |
# Generate rate limit button with different URL for restricted countries
|
| 579 |
if is_restricted:
|
| 580 |
-
rate_limit_url =
|
| 581 |
else:
|
| 582 |
rate_limit_url = 'https://omnicreator.net/#generator'
|
| 583 |
|
|
@@ -702,7 +702,7 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 702 |
|
| 703 |
# Generate NSFW button for blurred content with different URL for restricted countries
|
| 704 |
if is_restricted:
|
| 705 |
-
nsfw_url =
|
| 706 |
else:
|
| 707 |
nsfw_url = 'https://omnicreator.net/#generator'
|
| 708 |
|
|
|
|
| 5 |
import tempfile
|
| 6 |
import time
|
| 7 |
import json
|
| 8 |
+
from util import process_image_edit, download_and_check_result_nsfw, GoodWebsiteUrl
|
| 9 |
from nfsw import NSFWDetector
|
| 10 |
|
| 11 |
# i18n
|
|
|
|
| 539 |
if current_phase == 'blocked':
|
| 540 |
# Generate blocked limit button with different URL for restricted countries
|
| 541 |
if is_restricted:
|
| 542 |
+
blocked_url = GoodWebsiteUrl
|
| 543 |
else:
|
| 544 |
blocked_url = 'https://omnicreator.net/#generator'
|
| 545 |
|
|
|
|
| 577 |
wait_minutes_int = int(wait_minutes) + 1
|
| 578 |
# Generate rate limit button with different URL for restricted countries
|
| 579 |
if is_restricted:
|
| 580 |
+
rate_limit_url = GoodWebsiteUrl
|
| 581 |
else:
|
| 582 |
rate_limit_url = 'https://omnicreator.net/#generator'
|
| 583 |
|
|
|
|
| 702 |
|
| 703 |
# Generate NSFW button for blurred content with different URL for restricted countries
|
| 704 |
if is_restricted:
|
| 705 |
+
nsfw_url = GoodWebsiteUrl
|
| 706 |
else:
|
| 707 |
nsfw_url = 'https://omnicreator.net/#generator'
|
| 708 |
|
util.py
CHANGED
|
@@ -31,6 +31,7 @@ LLMKEY = OneKey[3]
|
|
| 31 |
R2_ACCESS_KEY = OneKey[4]
|
| 32 |
R2_SECRET_KEY = OneKey[5]
|
| 33 |
R2_ENDPOINT = OneKey[6]
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
# tmpFolder is no longer needed since we upload directly from memory
|
|
|
|
| 31 |
R2_ACCESS_KEY = OneKey[4]
|
| 32 |
R2_SECRET_KEY = OneKey[5]
|
| 33 |
R2_ENDPOINT = OneKey[6]
|
| 34 |
+
GoodWebsiteUrl = OneKey[7]
|
| 35 |
|
| 36 |
|
| 37 |
# tmpFolder is no longer needed since we upload directly from memory
|