Spaces:
Running
Running
Commit
·
95c9756
1
Parent(s):
b087bb1
init
Browse files- __lib__/app.py +97 -0
- __lib__/i18n/ar.pyc +0 -0
- __lib__/i18n/da.pyc +0 -0
- __lib__/i18n/de.pyc +0 -0
- __lib__/i18n/en.pyc +0 -0
- __lib__/i18n/es.pyc +0 -0
- __lib__/i18n/fi.pyc +0 -0
- __lib__/i18n/fr.pyc +0 -0
- __lib__/i18n/he.pyc +0 -0
- __lib__/i18n/hi.pyc +0 -0
- __lib__/i18n/id.pyc +0 -0
- __lib__/i18n/it.pyc +0 -0
- __lib__/i18n/ja.pyc +0 -0
- __lib__/i18n/nl.pyc +0 -0
- __lib__/i18n/no.pyc +0 -0
- __lib__/i18n/pt.pyc +0 -0
- __lib__/i18n/ru.pyc +0 -0
- __lib__/i18n/sv.pyc +0 -0
- __lib__/i18n/tr.pyc +0 -0
- __lib__/i18n/uk.pyc +0 -0
- __lib__/i18n/vi.pyc +0 -0
- __lib__/i18n/zh.pyc +0 -0
- __lib__/nfsw.pyc +0 -0
- __lib__/pipeline.pyc +0 -0
- __lib__/util.pyc +0 -0
__lib__/app.py
CHANGED
|
@@ -11,6 +11,9 @@ from nfsw import NSFWDetector
|
|
| 11 |
# Google Gemini URL for restricted languages
|
| 12 |
GOOGLE_GEMINI_URL = "https://aistudio.google.com/models/gemini-2-5-flash-image"
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# i18n - Load from encrypted modules
|
| 15 |
import sys
|
| 16 |
from pathlib import Path
|
|
@@ -873,6 +876,100 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 873 |
|
| 874 |
# Create Gradio interface
|
| 875 |
def create_app():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 876 |
with gr.Blocks(
|
| 877 |
title="Image Editor 1.0",
|
| 878 |
theme=gr.themes.Soft(),
|
|
|
|
| 11 |
# Google Gemini URL for restricted languages
|
| 12 |
GOOGLE_GEMINI_URL = "https://aistudio.google.com/models/gemini-2-5-flash-image"
|
| 13 |
|
| 14 |
+
# Toggle service availability (1 to pause Image Editor 1.0, 0 to keep it running)
|
| 15 |
+
is_stop_service = 1
|
| 16 |
+
|
| 17 |
# i18n - Load from encrypted modules
|
| 18 |
import sys
|
| 19 |
from pathlib import Path
|
|
|
|
| 876 |
|
| 877 |
# Create Gradio interface
|
| 878 |
def create_app():
|
| 879 |
+
if is_stop_service:
|
| 880 |
+
with gr.Blocks(title="Image Editor 1.0") as app:
|
| 881 |
+
gr.HTML(
|
| 882 |
+
"""
|
| 883 |
+
<style>
|
| 884 |
+
body {
|
| 885 |
+
background: radial-gradient(circle at 20% 20%, #f3f4ff 0, #f8fbff 35%, #ffffff 70%);
|
| 886 |
+
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 887 |
+
}
|
| 888 |
+
.pause-wrapper {
|
| 889 |
+
min-height: 100vh;
|
| 890 |
+
display: flex;
|
| 891 |
+
align-items: center;
|
| 892 |
+
justify-content: center;
|
| 893 |
+
padding: 48px 20px;
|
| 894 |
+
}
|
| 895 |
+
.pause-card {
|
| 896 |
+
max-width: 640px;
|
| 897 |
+
width: 100%;
|
| 898 |
+
background: #ffffff;
|
| 899 |
+
border-radius: 20px;
|
| 900 |
+
box-shadow: 0 18px 60px rgba(62, 80, 180, 0.16);
|
| 901 |
+
padding: 32px 32px 28px;
|
| 902 |
+
border: 1px solid #e8edff;
|
| 903 |
+
text-align: center;
|
| 904 |
+
}
|
| 905 |
+
.pause-badge {
|
| 906 |
+
display: inline-flex;
|
| 907 |
+
align-items: center;
|
| 908 |
+
gap: 8px;
|
| 909 |
+
padding: 10px 16px;
|
| 910 |
+
border-radius: 999px;
|
| 911 |
+
background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
|
| 912 |
+
color: #1f2a44;
|
| 913 |
+
font-weight: 700;
|
| 914 |
+
letter-spacing: 0.3px;
|
| 915 |
+
box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
|
| 916 |
+
}
|
| 917 |
+
.pause-title {
|
| 918 |
+
margin: 18px 0 10px;
|
| 919 |
+
font-size: 28px;
|
| 920 |
+
color: #111827;
|
| 921 |
+
font-weight: 800;
|
| 922 |
+
letter-spacing: 0.2px;
|
| 923 |
+
}
|
| 924 |
+
.pause-subtitle {
|
| 925 |
+
margin: 0 0 22px;
|
| 926 |
+
color: #374151;
|
| 927 |
+
font-size: 16px;
|
| 928 |
+
line-height: 1.6;
|
| 929 |
+
}
|
| 930 |
+
.cta {
|
| 931 |
+
display: inline-flex;
|
| 932 |
+
align-items: center;
|
| 933 |
+
justify-content: center;
|
| 934 |
+
gap: 10px;
|
| 935 |
+
padding: 14px 20px;
|
| 936 |
+
border-radius: 12px;
|
| 937 |
+
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
| 938 |
+
color: #ffffff !important;
|
| 939 |
+
font-weight: 800;
|
| 940 |
+
font-size: 16px;
|
| 941 |
+
text-decoration: none !important;
|
| 942 |
+
box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
|
| 943 |
+
transition: transform 0.18s ease, box-shadow 0.18s ease;
|
| 944 |
+
letter-spacing: 0.1px;
|
| 945 |
+
}
|
| 946 |
+
.cta:hover {
|
| 947 |
+
transform: translateY(-1px);
|
| 948 |
+
box-shadow: 0 16px 32px rgba(99, 102, 241, 0.45);
|
| 949 |
+
}
|
| 950 |
+
.cta span {
|
| 951 |
+
opacity: 0.9;
|
| 952 |
+
}
|
| 953 |
+
.cta:visited {
|
| 954 |
+
color: #ffffff !important;
|
| 955 |
+
}
|
| 956 |
+
</style>
|
| 957 |
+
<div class="pause-wrapper">
|
| 958 |
+
<div class="pause-card">
|
| 959 |
+
<div class="pause-badge">⏸ Service Paused</div>
|
| 960 |
+
<div class="pause-title">Image Editor 1.0 is temporarily paused</div>
|
| 961 |
+
<div class="pause-subtitle">
|
| 962 |
+
Please visit the free <strong>Image Editor 2.0</strong> demo on Hugging Face for higher quality and more free tries.
|
| 963 |
+
</div>
|
| 964 |
+
<a class="cta" href="https://huggingface.co/spaces/selfit-camera/Omni-Image-Editor" target="_blank" rel="noreferrer">
|
| 965 |
+
🚀 Open Image Editor 2.0 on Hugging Face
|
| 966 |
+
</a>
|
| 967 |
+
</div>
|
| 968 |
+
</div>
|
| 969 |
+
"""
|
| 970 |
+
)
|
| 971 |
+
return app
|
| 972 |
+
|
| 973 |
with gr.Blocks(
|
| 974 |
title="Image Editor 1.0",
|
| 975 |
theme=gr.themes.Soft(),
|
__lib__/i18n/ar.pyc
CHANGED
|
Binary files a/__lib__/i18n/ar.pyc and b/__lib__/i18n/ar.pyc differ
|
|
|
__lib__/i18n/da.pyc
CHANGED
|
Binary files a/__lib__/i18n/da.pyc and b/__lib__/i18n/da.pyc differ
|
|
|
__lib__/i18n/de.pyc
CHANGED
|
Binary files a/__lib__/i18n/de.pyc and b/__lib__/i18n/de.pyc differ
|
|
|
__lib__/i18n/en.pyc
CHANGED
|
Binary files a/__lib__/i18n/en.pyc and b/__lib__/i18n/en.pyc differ
|
|
|
__lib__/i18n/es.pyc
CHANGED
|
Binary files a/__lib__/i18n/es.pyc and b/__lib__/i18n/es.pyc differ
|
|
|
__lib__/i18n/fi.pyc
CHANGED
|
Binary files a/__lib__/i18n/fi.pyc and b/__lib__/i18n/fi.pyc differ
|
|
|
__lib__/i18n/fr.pyc
CHANGED
|
Binary files a/__lib__/i18n/fr.pyc and b/__lib__/i18n/fr.pyc differ
|
|
|
__lib__/i18n/he.pyc
CHANGED
|
Binary files a/__lib__/i18n/he.pyc and b/__lib__/i18n/he.pyc differ
|
|
|
__lib__/i18n/hi.pyc
CHANGED
|
Binary files a/__lib__/i18n/hi.pyc and b/__lib__/i18n/hi.pyc differ
|
|
|
__lib__/i18n/id.pyc
CHANGED
|
Binary files a/__lib__/i18n/id.pyc and b/__lib__/i18n/id.pyc differ
|
|
|
__lib__/i18n/it.pyc
CHANGED
|
Binary files a/__lib__/i18n/it.pyc and b/__lib__/i18n/it.pyc differ
|
|
|
__lib__/i18n/ja.pyc
CHANGED
|
Binary files a/__lib__/i18n/ja.pyc and b/__lib__/i18n/ja.pyc differ
|
|
|
__lib__/i18n/nl.pyc
CHANGED
|
Binary files a/__lib__/i18n/nl.pyc and b/__lib__/i18n/nl.pyc differ
|
|
|
__lib__/i18n/no.pyc
CHANGED
|
Binary files a/__lib__/i18n/no.pyc and b/__lib__/i18n/no.pyc differ
|
|
|
__lib__/i18n/pt.pyc
CHANGED
|
Binary files a/__lib__/i18n/pt.pyc and b/__lib__/i18n/pt.pyc differ
|
|
|
__lib__/i18n/ru.pyc
CHANGED
|
Binary files a/__lib__/i18n/ru.pyc and b/__lib__/i18n/ru.pyc differ
|
|
|
__lib__/i18n/sv.pyc
CHANGED
|
Binary files a/__lib__/i18n/sv.pyc and b/__lib__/i18n/sv.pyc differ
|
|
|
__lib__/i18n/tr.pyc
CHANGED
|
Binary files a/__lib__/i18n/tr.pyc and b/__lib__/i18n/tr.pyc differ
|
|
|
__lib__/i18n/uk.pyc
CHANGED
|
Binary files a/__lib__/i18n/uk.pyc and b/__lib__/i18n/uk.pyc differ
|
|
|
__lib__/i18n/vi.pyc
CHANGED
|
Binary files a/__lib__/i18n/vi.pyc and b/__lib__/i18n/vi.pyc differ
|
|
|
__lib__/i18n/zh.pyc
CHANGED
|
Binary files a/__lib__/i18n/zh.pyc and b/__lib__/i18n/zh.pyc differ
|
|
|
__lib__/nfsw.pyc
CHANGED
|
Binary files a/__lib__/nfsw.pyc and b/__lib__/nfsw.pyc differ
|
|
|
__lib__/pipeline.pyc
CHANGED
|
Binary files a/__lib__/pipeline.pyc and b/__lib__/pipeline.pyc differ
|
|
|
__lib__/util.pyc
CHANGED
|
Binary files a/__lib__/util.pyc and b/__lib__/util.pyc differ
|
|
|