Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
selfitcamera
commited on
Commit
Β·
bc231db
1
Parent(s):
a516190
init
Browse files- __lib__/app.py +23 -35
- __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__/app.py
CHANGED
|
@@ -749,7 +749,7 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 749 |
nsfw_url = 'https://omnicreator.net/#generator'
|
| 750 |
|
| 751 |
nsfw_action_buttons_html = f"""
|
| 752 |
-
<div style='
|
| 753 |
<a href='{nsfw_url}' target='_blank' style='
|
| 754 |
display: inline-flex;
|
| 755 |
align-items: center;
|
|
@@ -759,19 +759,22 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 759 |
color: white;
|
| 760 |
text-decoration: none;
|
| 761 |
border-radius: 12px;
|
| 762 |
-
font-weight:
|
| 763 |
font-size: 16px;
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
|
| 767 |
transition: all 0.3s ease;
|
| 768 |
border: none;
|
| 769 |
'>π₯ Unlimited Creative Generation</a>
|
| 770 |
</div>
|
| 771 |
-
<div style='
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 775 |
</div>
|
| 776 |
"""
|
| 777 |
return final_result, final_message, gr.update(value=nsfw_action_buttons_html, visible=True)
|
|
@@ -811,16 +814,14 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 811 |
</div>
|
| 812 |
"""
|
| 813 |
else:
|
| 814 |
-
# For non-restricted countries, show
|
| 815 |
if task_uuid and lang not in ["zh", "hi", "ru"]:
|
| 816 |
-
# Create task detail URL for downloading HD image
|
| 817 |
-
task_detail_url = f"https://omnicreator.net/my-creations/task/{task_uuid}"
|
| 818 |
# Create i2v URL with input and output images and prompt
|
| 819 |
from urllib.parse import quote
|
| 820 |
encoded_prompt = quote(prompt.strip())
|
| 821 |
i2v_url = f"https://omnicreator.net/image-to-video?input_image={input_image_url}&end_image={result_url}&prompt={encoded_prompt}"
|
| 822 |
action_buttons_html = f"""
|
| 823 |
-
<div style='display: flex; justify-content: center; gap:
|
| 824 |
<a href='{i2v_url}' target='_blank' style='
|
| 825 |
display: inline-flex;
|
| 826 |
align-items: center;
|
|
@@ -830,7 +831,7 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 830 |
color: white;
|
| 831 |
text-decoration: none;
|
| 832 |
border-radius: 12px;
|
| 833 |
-
font-weight:
|
| 834 |
font-size: 16px;
|
| 835 |
text-align: center;
|
| 836 |
min-width: 160px;
|
|
@@ -838,23 +839,6 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 838 |
transition: all 0.3s ease;
|
| 839 |
border: none;
|
| 840 |
'>🎥 Convert to Video</a>
|
| 841 |
-
<a href='{task_detail_url}' target='_blank' style='
|
| 842 |
-
display: inline-flex;
|
| 843 |
-
align-items: center;
|
| 844 |
-
justify-content: center;
|
| 845 |
-
padding: 16px 32px;
|
| 846 |
-
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
| 847 |
-
color: white;
|
| 848 |
-
text-decoration: none;
|
| 849 |
-
border-radius: 12px;
|
| 850 |
-
font-weight: 600;
|
| 851 |
-
font-size: 16px;
|
| 852 |
-
text-align: center;
|
| 853 |
-
min-width: 160px;
|
| 854 |
-
box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
|
| 855 |
-
transition: all 0.3s ease;
|
| 856 |
-
border: none;
|
| 857 |
-
'>💾 Download HD Image</a>
|
| 858 |
</div>
|
| 859 |
"""
|
| 860 |
|
|
@@ -882,10 +866,14 @@ def edit_image_interface(input_image, prompt, lang, request: gr.Request, progres
|
|
| 882 |
|
| 883 |
# Always show HF Space demo tip under the result image after task completion
|
| 884 |
action_buttons_html += """
|
| 885 |
-
<div style='
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 889 |
</div>
|
| 890 |
"""
|
| 891 |
|
|
|
|
| 749 |
nsfw_url = 'https://omnicreator.net/#generator'
|
| 750 |
|
| 751 |
nsfw_action_buttons_html = f"""
|
| 752 |
+
<div style='text-align: center; margin: 18px 0 10px 0;'>
|
| 753 |
<a href='{nsfw_url}' target='_blank' style='
|
| 754 |
display: inline-flex;
|
| 755 |
align-items: center;
|
|
|
|
| 759 |
color: white;
|
| 760 |
text-decoration: none;
|
| 761 |
border-radius: 12px;
|
| 762 |
+
font-weight: 700;
|
| 763 |
font-size: 16px;
|
| 764 |
+
min-width: 220px;
|
| 765 |
+
box-shadow: 0 8px 25px rgba(255, 107, 107, 0.35);
|
|
|
|
| 766 |
transition: all 0.3s ease;
|
| 767 |
border: none;
|
| 768 |
'>π₯ Unlimited Creative Generation</a>
|
| 769 |
</div>
|
| 770 |
+
<div style='margin: 14px auto 0; max-width: 640px; background: linear-gradient(120deg, #f0f4ff 0%, #e5edff 50%, #f7fbff 100%); border: 1px solid #cbd5ff; border-radius: 14px; padding: 14px 18px; box-shadow: 0 10px 25px rgba(88, 101, 242, 0.18); text-align: center;'>
|
| 771 |
+
<div style='font-size: 15px; font-weight: 800; color: #1f2a44; display: flex; align-items: center; justify-content: center; gap: 8px;'>
|
| 772 |
+
π Omni Image Editor 2.0 is live!
|
| 773 |
+
</div>
|
| 774 |
+
<a href='https://huggingface.co/spaces/selfit-camera/Omni-Image-Editor' target='_blank' style='display: inline-flex; align-items: center; justify-content: center; margin-top: 6px; padding: 10px 18px; background: #5865f2; color: white; border-radius: 10px; font-weight: 800; text-decoration: none; box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);'>
|
| 775 |
+
Try the Hugging Face Space demo (free)
|
| 776 |
+
</a>
|
| 777 |
+
<div style='font-size: 13px; color: #4a5568; margin-top: 6px; font-weight: 600;'>This is a free HF Space demo for Omni Image Editor 2.0.</div>
|
| 778 |
</div>
|
| 779 |
"""
|
| 780 |
return final_result, final_message, gr.update(value=nsfw_action_buttons_html, visible=True)
|
|
|
|
| 814 |
</div>
|
| 815 |
"""
|
| 816 |
else:
|
| 817 |
+
# For non-restricted countries, show action buttons
|
| 818 |
if task_uuid and lang not in ["zh", "hi", "ru"]:
|
|
|
|
|
|
|
| 819 |
# Create i2v URL with input and output images and prompt
|
| 820 |
from urllib.parse import quote
|
| 821 |
encoded_prompt = quote(prompt.strip())
|
| 822 |
i2v_url = f"https://omnicreator.net/image-to-video?input_image={input_image_url}&end_image={result_url}&prompt={encoded_prompt}"
|
| 823 |
action_buttons_html = f"""
|
| 824 |
+
<div style='display: flex; justify-content: center; gap: 12px; margin: 10px 0 5px 0; padding: 0px;'>
|
| 825 |
<a href='{i2v_url}' target='_blank' style='
|
| 826 |
display: inline-flex;
|
| 827 |
align-items: center;
|
|
|
|
| 831 |
color: white;
|
| 832 |
text-decoration: none;
|
| 833 |
border-radius: 12px;
|
| 834 |
+
font-weight: 700;
|
| 835 |
font-size: 16px;
|
| 836 |
text-align: center;
|
| 837 |
min-width: 160px;
|
|
|
|
| 839 |
transition: all 0.3s ease;
|
| 840 |
border: none;
|
| 841 |
'>🎥 Convert to Video</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 842 |
</div>
|
| 843 |
"""
|
| 844 |
|
|
|
|
| 866 |
|
| 867 |
# Always show HF Space demo tip under the result image after task completion
|
| 868 |
action_buttons_html += """
|
| 869 |
+
<div style='margin: 16px auto 0; max-width: 700px; background: linear-gradient(120deg, #f0f4ff 0%, #e5edff 50%, #f7fbff 100%); border: 1px solid #cbd5ff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 12px 28px rgba(88, 101, 242, 0.18); text-align: center;'>
|
| 870 |
+
<div style='font-size: 16px; font-weight: 900; color: #1f2a44; display: flex; align-items: center; justify-content: center; gap: 8px;'>
|
| 871 |
+
π Omni Image Editor 2.0 is live!
|
| 872 |
+
</div>
|
| 873 |
+
<a href='https://huggingface.co/spaces/selfit-camera/Omni-Image-Editor' target='_blank' style='display: inline-flex; align-items: center; justify-content: center; margin-top: 8px; padding: 10px 18px; background: #5865f2; color: white; border-radius: 10px; font-weight: 800; text-decoration: none; box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);'>
|
| 874 |
+
Try the Hugging Face Space demo (free)
|
| 875 |
+
</a>
|
| 876 |
+
<div style='font-size: 13px; color: #4a5568; margin-top: 6px; font-weight: 700;'>This is a free HF Space demo for Omni Image Editor 2.0.</div>
|
| 877 |
</div>
|
| 878 |
"""
|
| 879 |
|
__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
|
|
|