Update app.py
Browse files
app.py
CHANGED
|
@@ -39,48 +39,48 @@ def setup_initial_files():
|
|
| 39 |
if not os.path.exists(PROMPTS_FILE):
|
| 40 |
prompts_data = {
|
| 41 |
"base_prompts": {
|
| 42 |
-
"model_base": """**MANDATORY:
|
| 43 |
-
**CORE DIRECTIVE: YOU ARE A
|
| 44 |
-
**BACKGROUND OVERRIDE:** Absolutely DO NOT transfer or replicate the background from the user's reference image. Synthesize a brand new, ultra-realistic flagship background strictly based on the chosen SCENE & STYLE. The environment must perfectly match the lighting and aesthetics of the selected style
|
| 45 |
1. **GARMENT REPLICATION (100,000% ABSOLUTE FIDELITY):** Execute a perfect, mathematically exact digital twin of the garment from the uploaded CLOTHING image. Trace and replicate every single seam, stitch, fold, material texture, zipper, button, and specific cut. The fabric physics (tension, weight, gloss, thickness, drape) must be indistinguishable from reality. Capture the micro-details of the fabric's macroscopic weave. The silhouette and fit must map onto the model EXACTLY as designed. NO hallucinated details.
|
| 46 |
-
2. **HUMAN SYNTHESIS (ULTRA-REALISM):** Generate a hyper-realistic human model matching the exact anatomical parameters. Synthesize lifelike skin with visible pores, subtle imperfections, micro-blemishes, peach fuzz,
|
| 47 |
3. **ZERO DEVIATION PROTOCOL:** Absolutely no artistic interpretation, AI-hallucinated embellishments, or "improvements." Preserve logo placement, garment cut, and material finish with absolute fidelity.
|
| 48 |
4. **CONTEXTUAL SAFEGUARD:** The model must be fully and appropriately clothed for a professional, high-fashion commercial photoshoot.
|
| 49 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. Exactly two arms, two legs, perfectly formed hands and feet. No extra limbs or mutations.
|
| 50 |
-
6. **AESTHETIC MASTERY:** Breathtaking, award-winning
|
| 51 |
-
"model_base_own_model": """**MANDATORY:
|
| 52 |
**CORE DIRECTIVE: YOU ARE AN ELITE-TIER IDENTITY & TEXTURAL REPLICATION ENGINE.**
|
| 53 |
**BACKGROUND OVERRIDE:** Absolutely DO NOT transfer or replicate the background from the user's reference images. Synthesize a brand new background strictly based on the chosen SCENE & STYLE.
|
| 54 |
-
1. **IDENTITY CLONING (ABSOLUTE FIDELITY):** Flawless one-to-one replication of the person from the user-provided MODEL image. Every facial feature, skin mole, hair texture, and unique physical trait must be cloned with precise mathematical accuracy. THE MODEL'S IDENTITY MUST NOT BE ALTERED.
|
| 55 |
2. **GARMENT TRANSPLANTATION (100,000% ABSOLUTE FIDELITY):** Extract every thread, fiber, stitch, and texture from the CLOTHING image. Transplant this garment onto the cloned model with perfect realism. Maintain exact structural integrity, cut, silhouette, seam placement, and material properties (drape, tension, gloss). 100% faithful digital twin.
|
| 56 |
3. **ZERO DEVIATION PROTOCOL:** Prohibit all AI hallucinations or modifications. Preserve logos, specific cuts, and material finishes exactly. No waxy or plastic skin.
|
| 57 |
4. **CONTEXTUAL SAFEGUARD:** Professional portrait of a fully and appropriately dressed individual.
|
| 58 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. Biomechanically sound posture.
|
| 59 |
-
6. **AESTHETIC MASTERY:** Breathtaking, award-winning photography
|
| 60 |
-
"object_base": """**MANDATORY:
|
| 61 |
**CORE DIRECTIVE: YOU ARE AN ELITE COMMERCIAL PRODUCT REPLICATION ENGINE.**
|
| 62 |
**BACKGROUND OVERRIDE:** Synthesize a brand new, ultra-realistic flagship background strictly based on the chosen SCENE & STYLE.
|
| 63 |
-
1. **PRODUCT DIGITAL TWINNING (100,000% FIDELITY):** Flawlessly identify and replicate the object. Every dimension, proportion, curve, texture (matte, gloss, brushed metal, woven), and color gamut must be rendered with indistinguishable accuracy.
|
| 64 |
-
2. **AESTHETIC & LIGHTING MASTERY:** Sophisticated, multi-point studio lighting. Key, fill, and rim lights to create dramatic highlights and soft shadows that accentuate material qualities
|
| 65 |
-
3. **ZERO DEVIATION PROTOCOL:** Do not add or alter any logos, proportions, or features. The replication must be perfect. Materials must look 100% physical.
|
| 66 |
-
4. **AESTHETIC MASTERY:** Perfect structural geometry, exact full-scale dimensions, no warped edges
|
| 67 |
-
"children_base": """**MANDATORY:
|
| 68 |
**CORE DIRECTIVE: CHILDREN'S HAUTE COUTURE PHOTOGRAPHY ENGINE.**
|
| 69 |
**BACKGROUND OVERRIDE:** Synthesize a brand new, ultra-realistic background strictly based on the chosen SCENE & STYLE.
|
| 70 |
-
1. **AUTHENTICITY & SAFETY:** The child model must appear natural, joyful, and engaged. Natural skin textures with subtle flushes
|
| 71 |
2. **GARMENT REPLICATION (100,000% ABSOLUTE FIDELITY):** Clone the uploaded garment with extreme precision. Every stitch, fabric texture, pattern detail, and color must be perfectly replicated. The clothing's fit and drape must move realistically with the child.
|
| 72 |
3. **ZERO DEVIATION PROTOCOL:** Do not modify the garment's design. Absolutely no waxy skin.
|
| 73 |
4. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. No mutations.
|
| 74 |
-
5. **AESTHETIC MASTERY:** Breathtaking,
|
| 75 |
-
"cosmetics_base": """**MANDATORY:
|
| 76 |
**CORE DIRECTIVE: ELITE COSMETICS & BEAUTY CAMPAIGN REPLICATION.**
|
| 77 |
**BACKGROUND OVERRIDE:** Synthesize a brand new background strictly based on the chosen SCENE & STYLE.
|
| 78 |
1. **PRODUCT REPLICATION (100,000% FIDELITY):** Replicate the physical product, packaging, and internal contents (color, texture, finish) with flawless perfection.
|
| 79 |
-
2. **MODEL SYNTHESIS & PRODUCT APPLICATION:** Generate a hyper-realistic human model
|
| 80 |
3. **ZERO DEVIATION PROTOCOL:** No artistic interpretation of the product's color or texture. 1:1 match.
|
| 81 |
-
4. **STUDIO LIGHTING MASTERY:** High-end beauty lighting. Diffused, shape-defining highlights
|
| 82 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy.
|
| 83 |
-
6. **AESTHETIC MASTERY:** Breathtaking
|
| 84 |
"marketplace_mode_base": """\n\n**COMPOSITION DIRECTIVE (MARKETPLACE HERO-SHOT MODE):** YOU ARE A WORLD-CLASS E-COMMERCE ART DIRECTOR. The primary goal is to create a visually arresting "hero image" that maximizes click-through rates. The main subject must be perfectly rendered and visually dominant. Background is clean, non-distracting, enhanced with sophisticated, context-aware special effects. Strong sense of depth, realistic shadows, and professional lighting to make the product pop."""
|
| 85 |
},
|
| 86 |
"flagship_styles": {
|
|
@@ -813,7 +813,6 @@ textarea { resize: vertical; min-height: 100px; font-family: inherit; background
|
|
| 813 |
<div class="container">
|
| 814 |
<div class="top-controls">
|
| 815 |
<div class="lang-switcher">
|
| 816 |
-
<button id="lang-uk" onclick="setLanguage('uk')">UK <span class="badge-new" style="font-size: 0.65em; margin-left: 2px;">NEW</span></button>
|
| 817 |
<button id="lang-tr" onclick="setLanguage('tr')">TR</button>
|
| 818 |
<button id="lang-pl" onclick="setLanguage('pl')">PL</button>
|
| 819 |
<button id="lang-en" onclick="setLanguage('en')">EN</button>
|
|
@@ -1707,7 +1706,7 @@ const c_f = {"Adriana Lima":"Adriana Lima","Alexandra Daddario":"Alexandra Dadda
|
|
| 1707 |
const cc_m = {"Caleb McLaughlin (Stranger Things)":"Caleb McLaughlin","Daniel Radcliffe (Harry Potter)":"Daniel Radcliffe","Finn Wolfhard (Stranger Things)":"Finn Wolfhard","Gaten Matarazzo (Stranger Things)":"Gaten Matarazzo","Iain Armitage (Young Sheldon)":"Iain Armitage","Jacob Tremblay":"Jacob Tremblay","Jaden Smith":"Jaden Smith","Macaulay Culkin (Home Alone)":"Macaulay Culkin","Noah Schnapp (Stranger Things)":"Noah Schnapp","Walker Scobell (The Adam Project)":"Walker Scobell"};
|
| 1708 |
const cc_f = {"Dakota Fanning":"Dakota Fanning","Elle Fanning":"Elle Fanning","Emma Watson (Harry Potter)":"Emma Watson","Mckenna Grace":"Mckenna Grace","Millie Bobby Brown (Stranger Things)":"Millie Bobby Brown","North West":"North West","Sadie Sink (Stranger Things)":"Sadie Sink","Storm Reid (A Wrinkle in Time)":"Storm Reid","Suri Cruise":"Suri Cruise"};
|
| 1709 |
|
| 1710 |
-
const newStyles = [];
|
| 1711 |
|
| 1712 |
const styleCategories = {
|
| 1713 |
'Winter & Extreme': ['alaska_winter', 'cyber_snow', 'ethereal_ice_palace', 'neon_blizzard', 'high_fashion_tundra', 'ski_resort_luxe'],
|
|
@@ -2019,61 +2018,6 @@ const translations = {
|
|
| 2019 |
tattoo_styles: {"Scandinavian": "İskandinav", "Polynesian": "Polinezyalı", "Japanese (Irezumi)": "Japon (Irezumi)", "American Traditional": "Amerikan Geleneksel", "Blackwork": "Siyah işçilik", "Geometric": "Geometrik", "Fine-line": "İnce çizgi", "Surrealism": "Sürrealizm", "Neo-Traditional": "Neo-Geleneksel"},
|
| 2020 |
tattoo_coverages: {"a few small tattoos": "Birkaç küçük", "sleeve on one arm": "Tek kol kaplama", "full sleeves on both arms": "İki kol kaplama", "chest piece": "Göğüs kaplama", "back piece": "Sırt kaplama", "heavily tattooed": "Yoğun dövmeli", "fully covered": "Tamamen kaplı"},
|
| 2021 |
celebrities_male: c_m, celebrities_female: c_f, child_celebrities_male: cc_m, child_celebrities_female: cc_f
|
| 2022 |
-
},
|
| 2023 |
-
uk: {
|
| 2024 |
-
subtitle: "ГЕНЕРАТОР ПРОМПТІВ ТА ЗАПУСК", modeModel: "Фото на моделі", modeChildren: "Діти", modeObject: "Предмет", modeCosmetics: "Косметика",
|
| 2025 |
-
section1Title: "Параметри моделі", section2Title: "Сцена та Стиль", section3Title: "Композиція та Деталі", section1ObjectTitle: "Параметри предмета",
|
| 2026 |
-
section2ObjectTitle: "Сцена та Стиль", section1CosmeticsTitle: "Продукт та Модель", ownModelCheck: "Власна модель (використовує 2 фото: одяг + модель)",
|
| 2027 |
-
objectWithModelCheck: "З моделлю", objectOnMannequinCheck: "На манекені", celebrityCheck: "Знаменитості", marketplaceCheck: "Режим маркетплейсу",
|
| 2028 |
-
celebrityName: "Знаменитість", gender: "Стать", gender_female: "Жінка", gender_male: "Чоловік", age: "Вік", age_teen: "14-18 років",
|
| 2029 |
-
age_20_25: "20-25 років", age_25_30: "25-30 років", age_30_40: "30-40 років", age_40_50: "40-50 років", nationality: "Зовнішність/Етнос",
|
| 2030 |
-
nat_eastern_european: "Східноєвропейська", nat_northern_european: "Північноєвропейська", nat_mediterranean: "Середземноморська", nat_asian: "Азійська",
|
| 2031 |
-
nat_central_asian: "Центральноазійська", nat_south_asian: "Південноазійська (Індія)", nat_middle_eastern: "Близькосхідна", nat_caucasian: "Кавказька",
|
| 2032 |
-
nat_african: "Африканська", nat_latin_american: "Латиноамериканська", nat_indigenous: "Корінні американці", nat_polynesian: "Полінезійська",
|
| 2033 |
-
nat_mixed: "Змішана", bodyType: "Тип фігури", hairColor: "Колір волосся", hair_black: "Чорне", hair_brown: "Каштанове", hair_blonde: "Блонд",
|
| 2034 |
-
hair_red: "Руде", hair_light_brown: "Русяве", hairstyle: "Зачіска", eyeColor: "Колір очей", eyes_brown: "Карі", eyes_blue: "Блакитні",
|
| 2035 |
-
eyes_green: "Зелені", eyes_gray: "Сірі", tattoos: "Татуювання", enableTattoos: "Додати татуювання", tattooStyle: "Стиль", tattooCoverage: "Покриття",
|
| 2036 |
-
beard: "Борода", enableBeard: "Додати бороду", beardStyle: "Тип бороди", shotType: "Ракурс/Кадр", shot_full: "У повний зріст, динамічний ракурс",
|
| 2037 |
-
shot_medium: "До пояса, природно", shot_cowboy: "Ковбойський кадр, журнальний", shot_portrait: "Портрет, виразний", shot_closeup: "Крупний план (на продукт)",
|
| 2038 |
-
shot_shoes: "Крупний план на взуття (без обличчя)", objectFurnitureCheck: "Меблі / Килими",
|
| 2039 |
-
viewAngle: "Вигляд", view_front: "Спереду", view_back: "Ззаду", view_side: "Збоку", view_three_quarter: "Три чверті", pose: "Поза",
|
| 2040 |
-
pose_fashion: "Динамічна, нестандартна фешн поза", pose_confident: "Впевнена стійка, дивиться в камеру", pose_walking: "Динамічна ходьба, легке розмиття",
|
| 2041 |
-
pose_sitting_chair: "Розслаблено сидить на стільці", pose_leaning: "Невимушено спирається на стіну", pose_contrapposto: "Сильна поза контрапост",
|
| 2042 |
-
pose_laughing: "Щирий сміх або усмішка", pose_profile: "Задумливий профіль, дивиться вдалечинь", pose_jumping: "У стрибку або в повітрі",
|
| 2043 |
-
pose_reclining: "Елегантно лежить на поверхні", styleLocation: "Стиль / Локація", aspectRatio: "Співвідношення сторін",
|
| 2044 |
-
modelDetailsLabel: "Одяг та Деталі (Опишіть тканину і крій!)", modelDetailsPlaceholder: "Вкажіть тканину та деталі. Наприклад: у чорному шкіряному тренчі з грубою текстурою, видимі шви, масивна металева фурнітура, шовковий шарф",
|
| 2045 |
-
additionalDirectives: "Додаткові вказівки", additionalDirectivesPlaceholderModel: "Наприклад: у кадрі видно телефон останньої моделі, ефект мокрого волосся...",
|
| 2046 |
-
child_gender_girl: "Дівчинка", child_gender_boy: "Хлопчик", child_age_infant: "6-12 місяців", child_age_toddler: "2-4 роки", child_age_child: "5-8 років",
|
| 2047 |
-
child_age_preteen: "9-12 років", child_shot_full: "У повний зріст", child_shot_medium: "До пояса", child_shot_portrait: "Портрет",
|
| 2048 |
-
childPoseAction: "Поза/Дія", child_pose_running: "Радісно біжить по полю", child_pose_playing: "Захоплено грається іграшками", child_pose_reading: "Сидить і розглядає книжку",
|
| 2049 |
-
child_pose_posing: "Позує для фото", child_pose_jumping: "Стрибає на ліжку", childDetailsLabel: "Одяг та Деталі",
|
| 2050 |
-
childDetailsPlaceholder: "Наприклад: потерті джинсові комбінезони з металевими ґудзиками, вельветова сорочка",
|
| 2051 |
-
additionalDirectivesPlaceholderChild: "Наприклад: додати текст інфографіки 'organic cotton'", objectNameLabel: "Назва/Опис предмета",
|
| 2052 |
-
objectNamePlaceholder: "Наприклад: флакон парфумів 'Noir', кросівки 'CyberRun', годинник 'Classic Timepiece'", cosmeticsNameLabel: "Назва/Опис косметики",
|
| 2053 |
-
cosmeticsNamePlaceholder: "Наприклад: червона помада 'Ruby', тональний крем 'Glow', палетка тіней", styleBackground: "Стиль / Фон",
|
| 2054 |
-
additionalDirectivesPlaceholderObject: "Наприклад: додати інфографіку 'new collection', левітація предмета",
|
| 2055 |
-
additionalDirectivesPlaceholderCosmetics: "Наприклад: акцент на сяйво шкіри, макро губ", detailsVariations: "Деталі та Варіації",
|
| 2056 |
-
detailsCollage: "Колаж зі збільшеними деталями (тканина, фурнітура)", detailsCollageObject: "Колаж зі збільшеними деталями (матеріал, текстура)",
|
| 2057 |
-
detailsCollageCosmetics: "Колаж зі збільшеними деталями (текстура продукту, мазки)", anglesCollage: "Колаж з різних ракурсів (спереду, ззаду, збоку)",
|
| 2058 |
-
anglesCollageObject: "Колаж з різних ракурсів (спереду, ззаду, збоку)", variantsCollage: "Різні варіанти/кольори (декілька моделей у кадрі)",
|
| 2059 |
-
variantsCollageObject: "Різні варіанти/кольори продукту", variantsCollageCosmetics: "Різні відтінки/кольори (декілька моделей)",
|
| 2060 |
-
textOverlayCheck: "Накладення тексту", textOverlayPlaceholder: "Ключові слова через кому, напр.: New Collection, 100% Cotton",
|
| 2061 |
-
logoOverlayCheck: "З логотипом", logoOverlayPlaceholder: "Опишіть логотип, напр.: 'білий мінімалістичний текст Synkris у правому нижньому куті'",
|
| 2062 |
-
launchBtn: "Запустити Synkris", copied_launching: "ПРОМПТ СКОПІЙОВАНО. ЗАПУСК... 🚀", copy_failed: "Не вдалося скопіювати. Промпт у консолі.",
|
| 2063 |
-
your_prompt: "Ваш промпт:", resetModelSettingsBtn: "Скинути налаштування моделі", resetConfirm: "Ви впевнені, що хочете скинути налаштування моделі до типових?",
|
| 2064 |
-
flagship_styles: {'studio': 'Студія (люкс)', 'product_focus_light': 'Маркетплейс', 'street': 'Стрітстайл', 'lookbook': 'Лукбук', 'minimalism': 'Мінімалізм', 'urban_loft_lifestyle': 'Лофт', 'elevator_mirror_selfie': 'Селфі в ліфті', 'car_interior_lifestyle': 'Салон авто', 'golden_hour_field': 'Золота година', 'messy_bedroom_morning': 'Спальня зранку', 'vintage_35mm_film': 'Вінтажна плівка 35мм', 'paparazzi_street_flash': 'Папараці', 'cafe_window_contemplation': 'Вікно кав\'ярні', 'rooftop_party_sunset': 'Вечірка на даху', 'bookstore_aisle_cozy': 'Книгарня', 'custom_background_fusion': 'Власний фон (pro)', 'polaroid_snapshot': 'Полароїд', 'creative': 'Креатив', 'retro': 'Ретро', 'boho': 'Бохо', 'forest_nymph': 'Ліс', 'desert_expedition': 'Пустеля', 'gothic': 'Готика', 'editorial': 'Едиторіал', 'film_noir': 'Нуар', 'cottagecore': 'Котеджкор', 'royalcore': 'Палац', 'solarpunk': 'Соларпанк', 'skater': 'Скейтер', 'vibrant_market': 'Ринок', 'cyberpunk': 'Кіберпанк', 'fantasy': 'Фентезі', 'surreal_dreamscape': 'Сюрреалізм', 'techwear': 'Техвер', 'home_casual': 'Дім', 'backstage': 'За лаштунками', 'road_trip': 'Подорож', 'rainy_day': 'Дощ', 'night_flash': 'Нічний спалах', 'tropical_resort': 'Курорт', 'beach': 'Пляж', 'alaska_winter': 'Аляска (зима)', 'football_field': 'Футбольне поле', 'volcanic_ash_desert': 'Вулкан (Ісландія)', 'salt_flats_mirage': 'Солончак (Болівія)', 'highlands_majesty': 'Високогір\'я (Шотландія)', 'neon_tokyo': 'Неонове Токіо', 'paris_chic': 'Паризький шик', 'y2k_grunge': 'Y2K Гранж', 'old_money_mansion': 'Маєток Old Money', 'high_end_runway': 'Подіум High-End', 'cyber_snow': 'Кібер сніг', 'ethereal_ice_palace': 'Льодовий палац', 'neon_blizzard': 'Неонова хуртовина', 'high_fashion_tundra': 'Арктична тундра', 'ski_resort_luxe': 'Гірськолижний курорт', 'liquid_chrome_studio': 'Рідкий хром', 'holographic_runway': 'Голографічний подіум', 'vogue_mars': 'Марс Vogue'},
|
| 2065 |
-
object_styles: {'studio': 'Студія', 'minimalism': 'Мінімалізм', 'nature': 'Природа', 'luxe': 'Люкс', 'dark': 'Драма', 'geometric': 'Геометрія', 'floating': 'Левітація', 'lifestyle': 'Лайфстайл', 'splash': 'Бризки', 'handmade': 'Майстерня', 'alaska_winter': 'Аляска (зима)', 'football_field': 'Футбольне поле', 'volcanic_ash_desert': 'Вулкан (Ісландія)', 'salt_flats_mirage': 'Солончак (Болівія)', 'highlands_majesty': 'Високогір\'я (Шотландія)', 'liquid_metal_pedestal': 'Рідкий метал', 'neon_cyber_platform': 'Неонова платформа', 'botanical_greenhouse': 'Оранжерея', 'frozen_ice_block': 'Брила льоду', 'crystal_podium': 'Кришталевий подіум', 'velvet_pedestal': 'Оксамитовий п\'єдестал'},
|
| 2066 |
-
female_body_types: {'standard': 'Стандарт', 'very_slim': 'Дуже струнка (модель)', 'slim': 'Струнка (природна)', 'slim_busty': 'Струнка з пишними грудьми', 'athletic': 'Спортивна', 'petite': 'Мініатюрна', 'hourglass': 'Пісочний годинник', 'fit_curvy': 'Підтягнута з формами', 'plus_size': 'Плюс сайз', 'curvy': 'Пишна (curvy)', 'full_figured': 'Повна', 'pregnant': 'Вагітна'},
|
| 2067 |
-
male_body_types: {'athletic': 'Спортивний', 'lean and toned': 'Стрункий і рельєфний', 'muscular build': 'М\'язистий', 'broad build': 'Кремезний', 'slim build': 'Худорлявий'},
|
| 2068 |
-
female_hairstyles: {'long wavy hair': 'Довге хвилясте', 'short bob cut': 'Короткий боб', 'elegant updo': 'Елегантна зібрана зачіска', 'straight shoulder-length hair': 'Пряме до плечей', 'pixie cut': 'Піксі', 'messy bun': 'Недбалий пучок', 'high ponytail': 'Високий хвіст', 'braids': 'Коси', 'curly afro': 'Кучеряве афро', 'bangs': 'З чубчиком', 'layered haircut': 'Каскад', 'wearing a hijab': 'У хіджабі'},
|
| 2069 |
-
male_hairstyles: {'short classic cut': 'Коротка класика', 'fade haircut': 'Фейд', 'slicked back hair': 'Зачесане назад', 'textured crop': 'Текстурний кроп', 'quiff': 'Квіфф (з чубчиком)', 'man bun': 'Чоловічий пучок', 'buzz cut': 'Під машинку', 'medium-length wavy hair': 'Середньої довжини хвилясте', 'side part': 'З проділом набік', 'undercut': 'Андеркат'},
|
| 2070 |
-
child_hairstyles_infant: {'wispy fine hair': 'Рідке тонке волосся', 'soft baby curls': 'М\'які дитячі кучері', 'almost bald': 'Майже лисий'},
|
| 2071 |
-
child_hairstyles_girl: {'long wavy hair': 'Довге хвилясте', 'two pigtails': 'Два хвостики', 'braids': 'Кіски', 'bob cut': 'Каре', 'high ponytail': 'Високий хвіст'},
|
| 2072 |
-
child_hairstyles_boy: {'short neat cut': 'Коротка охайна', 'slightly messy hair': 'Трохи розпатлане', 'side part': 'З проділом набік', 'textured crop': 'Текстурний кроп'},
|
| 2073 |
-
beard_styles: {"light stubble": "Легка щетина", "heavy stubble": "Густа щетина", "short boxed beard": "Коротка повна борода", "full beard": "Повна борода", "goatee": "Цапина борідка", "van dyke": "Ван Дайк", "anchor beard": "Якір"},
|
| 2074 |
-
tattoo_styles: {"Scandinavian": "Скандинавський", "Polynesian": "Полінезійський", "Japanese (Irezumi)": "Японський (Ірезумі)", "American Traditional": "Американський традиційний", "Blackwork": "Блекворк", "Geometric": "Геометричний", "Fine-line": "Тонкі лінії", "Surrealism": "Сюрреалізм", "Neo-Traditional": "Неотрадиційний"},
|
| 2075 |
-
tattoo_coverages: {"a few small tattoos": "Кілька маленьких", "sleeve on one arm": "Рукав на одній руці", "full sleeves on both arms": "Рукави на обох руках", "chest piece": "На грудях", "back piece": "На спині", "heavily tattooed": "Щільно забитий", "fully covered": "Повністю вкритий"},
|
| 2076 |
-
celebrities_male: c_m, celebrities_female: c_f, child_celebrities_male: cc_m, child_celebrities_female: cc_f
|
| 2077 |
}
|
| 2078 |
};
|
| 2079 |
|
|
@@ -2901,9 +2845,9 @@ def restore_environment(env_id):
|
|
| 2901 |
if env_id in all_data:
|
| 2902 |
all_data[env_id]['archived'] = False
|
| 2903 |
save_data(all_data)
|
| 2904 |
-
flash(f'Среда {env_id} в
|
| 2905 |
else:
|
| 2906 |
-
flash(f'Среда {env_id} не
|
| 2907 |
return redirect(url_for('admhosto'))
|
| 2908 |
|
| 2909 |
@app.route('/admhosto/clear_user/<env_id>', methods=['POST'])
|
|
@@ -2913,9 +2857,9 @@ def clear_user(env_id):
|
|
| 2913 |
if env_id in all_data and all_data[env_id].get('type') == 'closed':
|
| 2914 |
all_data[env_id]['device_token'] = None
|
| 2915 |
save_data(all_data)
|
| 2916 |
-
flash(f'
|
| 2917 |
else:
|
| 2918 |
-
flash(f'
|
| 2919 |
return redirect(url_for('admhosto'))
|
| 2920 |
|
| 2921 |
@app.route('/admhosto/toggle_type/<env_id>', methods=['POST'])
|
|
@@ -2926,14 +2870,14 @@ def toggle_type(env_id):
|
|
| 2926 |
current_type = all_data[env_id].get('type', 'closed')
|
| 2927 |
if current_type == 'closed':
|
| 2928 |
all_data[env_id]['type'] = 'open'
|
| 2929 |
-
flash(f'С
|
| 2930 |
else:
|
| 2931 |
all_data[env_id]['type'] = 'closed'
|
| 2932 |
all_data[env_id]['device_token'] = None
|
| 2933 |
-
flash(f'С
|
| 2934 |
save_data(all_data)
|
| 2935 |
else:
|
| 2936 |
-
flash(f'С
|
| 2937 |
return redirect(url_for('admhosto'))
|
| 2938 |
|
| 2939 |
@app.route('/admhosto/open_all', methods=['POST'])
|
|
@@ -2947,9 +2891,9 @@ def open_all_environments():
|
|
| 2947 |
count += 1
|
| 2948 |
if count > 0:
|
| 2949 |
save_data(all_data)
|
| 2950 |
-
flash(f'{count} с
|
| 2951 |
else:
|
| 2952 |
-
flash('Не
|
| 2953 |
return redirect(url_for('admhosto'))
|
| 2954 |
|
| 2955 |
@app.route('/admhosto/stats/<env_id>')
|
|
@@ -2959,7 +2903,7 @@ def get_env_stats(env_id):
|
|
| 2959 |
env_data = data.get(env_id)
|
| 2960 |
|
| 2961 |
if not env_data:
|
| 2962 |
-
return jsonify({"error": "С
|
| 2963 |
|
| 2964 |
raw_logs = env_data.get("logs", [])
|
| 2965 |
formatted_logs = []
|
|
@@ -3092,4 +3036,4 @@ if __name__ == '__main__':
|
|
| 3092 |
backup_thread = threading.Thread(target=periodic_backup, daemon=True)
|
| 3093 |
backup_thread.start()
|
| 3094 |
port = int(os.environ.get('PORT', 7860))
|
| 3095 |
-
app.run(debug=False, host='0.0.0.0', port=port)
|
|
|
|
| 39 |
if not os.path.exists(PROMPTS_FILE):
|
| 40 |
prompts_data = {
|
| 41 |
"base_prompts": {
|
| 42 |
+
"model_base": """**MANDATORY: PHOTOREALISTIC MASTERPIECE, 8K RESOLUTION, SHOT ON ARRI ALEXA 65. SUPREME CLOTHING FIDELITY. NO TEXT. ABSOLUTELY NO AI SMOOTHING, NO PLASTIC LOOK.**
|
| 43 |
+
**CORE DIRECTIVE: YOU ARE A WORLD-RENOWNED FASHION PHOTOGRAPHER'S DIGITAL BRAIN UTILIZING IMAGEN 3.**
|
| 44 |
+
**BACKGROUND OVERRIDE:** Absolutely DO NOT transfer or replicate the background from the user's reference image. Synthesize a brand new, ultra-realistic flagship background strictly based on the chosen SCENE & STYLE. The environment must perfectly match the lighting and aesthetics of the selected style.
|
| 45 |
1. **GARMENT REPLICATION (100,000% ABSOLUTE FIDELITY):** Execute a perfect, mathematically exact digital twin of the garment from the uploaded CLOTHING image. Trace and replicate every single seam, stitch, fold, material texture, zipper, button, and specific cut. The fabric physics (tension, weight, gloss, thickness, drape) must be indistinguishable from reality. Capture the micro-details of the fabric's macroscopic weave. The silhouette and fit must map onto the model EXACTLY as designed. NO hallucinated details.
|
| 46 |
+
2. **HUMAN SYNTHESIS (ULTRA-REALISM):** Generate a hyper-realistic human model matching the exact anatomical parameters. Synthesize lifelike skin with visible pores, subtle imperfections, micro-blemishes, peach fuzz, and realistic micro-textures. ABSOLUTELY NO WAXY OR GLASS-LIKE TEXTURES. Eyes must possess photorealistic caustics, depth, and specular highlights. The facial expression must be authentic.
|
| 47 |
3. **ZERO DEVIATION PROTOCOL:** Absolutely no artistic interpretation, AI-hallucinated embellishments, or "improvements." Preserve logo placement, garment cut, and material finish with absolute fidelity.
|
| 48 |
4. **CONTEXTUAL SAFEGUARD:** The model must be fully and appropriately clothed for a professional, high-fashion commercial photoshoot.
|
| 49 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. Exactly two arms, two legs, perfectly formed hands and feet. No extra limbs or mutations.
|
| 50 |
+
6. **AESTHETIC MASTERY:** Breathtaking, award-winning photography. Product details resolved at a microscopic level.""",
|
| 51 |
+
"model_base_own_model": """**MANDATORY: PHOTOREALISTIC MASTERPIECE, 8K RESOLUTION, SHOT ON ARRI ALEXA 65. SUPREME IDENTITY & CLOTHING FIDELITY. NO TEXT. NO AI SMOOTHING.**
|
| 52 |
**CORE DIRECTIVE: YOU ARE AN ELITE-TIER IDENTITY & TEXTURAL REPLICATION ENGINE.**
|
| 53 |
**BACKGROUND OVERRIDE:** Absolutely DO NOT transfer or replicate the background from the user's reference images. Synthesize a brand new background strictly based on the chosen SCENE & STYLE.
|
| 54 |
+
1. **IDENTITY CLONING (ABSOLUTE FIDELITY):** Flawless one-to-one replication of the person from the user-provided MODEL image. Every facial feature, skin mole, hair texture, and unique physical trait must be cloned with precise mathematical accuracy. THE MODEL'S IDENTITY MUST NOT BE ALTERED.
|
| 55 |
2. **GARMENT TRANSPLANTATION (100,000% ABSOLUTE FIDELITY):** Extract every thread, fiber, stitch, and texture from the CLOTHING image. Transplant this garment onto the cloned model with perfect realism. Maintain exact structural integrity, cut, silhouette, seam placement, and material properties (drape, tension, gloss). 100% faithful digital twin.
|
| 56 |
3. **ZERO DEVIATION PROTOCOL:** Prohibit all AI hallucinations or modifications. Preserve logos, specific cuts, and material finishes exactly. No waxy or plastic skin.
|
| 57 |
4. **CONTEXTUAL SAFEGUARD:** Professional portrait of a fully and appropriately dressed individual.
|
| 58 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. Biomechanically sound posture.
|
| 59 |
+
6. **AESTHETIC MASTERY:** Breathtaking, award-winning photography.""",
|
| 60 |
+
"object_base": """**MANDATORY: PHOTOREALISTIC MASTERPIECE, 8K, EXTREME MACRO DETAIL. NO TEXT. ABSOLUTELY NO CGI RENDER LOOK.**
|
| 61 |
**CORE DIRECTIVE: YOU ARE AN ELITE COMMERCIAL PRODUCT REPLICATION ENGINE.**
|
| 62 |
**BACKGROUND OVERRIDE:** Synthesize a brand new, ultra-realistic flagship background strictly based on the chosen SCENE & STYLE.
|
| 63 |
+
1. **PRODUCT DIGITAL TWINNING (100,000% FIDELITY):** Flawlessly identify and replicate the object. Every dimension, proportion, curve, texture (matte, gloss, brushed metal, woven), and color gamut must be rendered with indistinguishable accuracy.
|
| 64 |
+
2. **AESTHETIC & LIGHTING MASTERY:** Sophisticated, multi-point studio lighting. Key, fill, and rim lights to create dramatic highlights and soft shadows that accentuate material qualities.
|
| 65 |
+
3. **ZERO DEVIATION PROTOCOL:** Do not add or alter any logos, proportions, or features. The replication must be perfect. Materials must look 100% tangible and physical.
|
| 66 |
+
4. **AESTHETIC MASTERY:** Perfect structural geometry, exact full-scale dimensions, no warped edges.""",
|
| 67 |
+
"children_base": """**MANDATORY: PHOTOREALISTIC MASTERPIECE, 8K, SHOT ON ARRI ALEXA 65. NO TEXT. NO PLASTIC DOLL LOOK.**
|
| 68 |
**CORE DIRECTIVE: CHILDREN'S HAUTE COUTURE PHOTOGRAPHY ENGINE.**
|
| 69 |
**BACKGROUND OVERRIDE:** Synthesize a brand new, ultra-realistic background strictly based on the chosen SCENE & STYLE.
|
| 70 |
+
1. **AUTHENTICITY & SAFETY:** The child model must appear natural, joyful, and engaged. Natural skin textures with subtle flushes and freckles. Genuine expressions. NO GLASS-LIKE SKIN.
|
| 71 |
2. **GARMENT REPLICATION (100,000% ABSOLUTE FIDELITY):** Clone the uploaded garment with extreme precision. Every stitch, fabric texture, pattern detail, and color must be perfectly replicated. The clothing's fit and drape must move realistically with the child.
|
| 72 |
3. **ZERO DEVIATION PROTOCOL:** Do not modify the garment's design. Absolutely no waxy skin.
|
| 73 |
4. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy. No mutations.
|
| 74 |
+
5. **AESTHETIC MASTERY:** Breathtaking, award-winning photography.""",
|
| 75 |
+
"cosmetics_base": """**MANDATORY: PHOTOREALISTIC MASTERPIECE, 8K, MACRO BEAUTY LENS. NO TEXT. NO AI SMOOTHING.**
|
| 76 |
**CORE DIRECTIVE: ELITE COSMETICS & BEAUTY CAMPAIGN REPLICATION.**
|
| 77 |
**BACKGROUND OVERRIDE:** Synthesize a brand new background strictly based on the chosen SCENE & STYLE.
|
| 78 |
1. **PRODUCT REPLICATION (100,000% FIDELITY):** Replicate the physical product, packaging, and internal contents (color, texture, finish) with flawless perfection.
|
| 79 |
+
2. **MODEL SYNTHESIS & PRODUCT APPLICATION:** Generate a hyper-realistic human model with visible pores and natural skin texture. The cosmetic product MUST be applied flawlessly, demonstrating the exact shade, texture, and finish of the real product. NO WAXY SKIN.
|
| 80 |
3. **ZERO DEVIATION PROTOCOL:** No artistic interpretation of the product's color or texture. 1:1 match.
|
| 81 |
+
4. **STUDIO LIGHTING MASTERY:** High-end beauty lighting. Diffused, shape-defining highlights.
|
| 82 |
5. **FLAWLESS ANATOMY PROTOCOL:** Mathematically perfect anatomy.
|
| 83 |
+
6. **AESTHETIC MASTERY:** Breathtaking beauty photography.""",
|
| 84 |
"marketplace_mode_base": """\n\n**COMPOSITION DIRECTIVE (MARKETPLACE HERO-SHOT MODE):** YOU ARE A WORLD-CLASS E-COMMERCE ART DIRECTOR. The primary goal is to create a visually arresting "hero image" that maximizes click-through rates. The main subject must be perfectly rendered and visually dominant. Background is clean, non-distracting, enhanced with sophisticated, context-aware special effects. Strong sense of depth, realistic shadows, and professional lighting to make the product pop."""
|
| 85 |
},
|
| 86 |
"flagship_styles": {
|
|
|
|
| 813 |
<div class="container">
|
| 814 |
<div class="top-controls">
|
| 815 |
<div class="lang-switcher">
|
|
|
|
| 816 |
<button id="lang-tr" onclick="setLanguage('tr')">TR</button>
|
| 817 |
<button id="lang-pl" onclick="setLanguage('pl')">PL</button>
|
| 818 |
<button id="lang-en" onclick="setLanguage('en')">EN</button>
|
|
|
|
| 1706 |
const cc_m = {"Caleb McLaughlin (Stranger Things)":"Caleb McLaughlin","Daniel Radcliffe (Harry Potter)":"Daniel Radcliffe","Finn Wolfhard (Stranger Things)":"Finn Wolfhard","Gaten Matarazzo (Stranger Things)":"Gaten Matarazzo","Iain Armitage (Young Sheldon)":"Iain Armitage","Jacob Tremblay":"Jacob Tremblay","Jaden Smith":"Jaden Smith","Macaulay Culkin (Home Alone)":"Macaulay Culkin","Noah Schnapp (Stranger Things)":"Noah Schnapp","Walker Scobell (The Adam Project)":"Walker Scobell"};
|
| 1707 |
const cc_f = {"Dakota Fanning":"Dakota Fanning","Elle Fanning":"Elle Fanning","Emma Watson (Harry Potter)":"Emma Watson","Mckenna Grace":"Mckenna Grace","Millie Bobby Brown (Stranger Things)":"Millie Bobby Brown","North West":"North West","Sadie Sink (Stranger Things)":"Sadie Sink","Storm Reid (A Wrinkle in Time)":"Storm Reid","Suri Cruise":"Suri Cruise"};
|
| 1708 |
|
| 1709 |
+
const newStyles = ['cyber_snow', 'ethereal_ice_palace', 'neon_blizzard', 'high_fashion_tundra', 'ski_resort_luxe', 'liquid_chrome_studio', 'holographic_runway', 'vogue_mars'];
|
| 1710 |
|
| 1711 |
const styleCategories = {
|
| 1712 |
'Winter & Extreme': ['alaska_winter', 'cyber_snow', 'ethereal_ice_palace', 'neon_blizzard', 'high_fashion_tundra', 'ski_resort_luxe'],
|
|
|
|
| 2018 |
tattoo_styles: {"Scandinavian": "İskandinav", "Polynesian": "Polinezyalı", "Japanese (Irezumi)": "Japon (Irezumi)", "American Traditional": "Amerikan Geleneksel", "Blackwork": "Siyah işçilik", "Geometric": "Geometrik", "Fine-line": "İnce çizgi", "Surrealism": "Sürrealizm", "Neo-Traditional": "Neo-Geleneksel"},
|
| 2019 |
tattoo_coverages: {"a few small tattoos": "Birkaç küçük", "sleeve on one arm": "Tek kol kaplama", "full sleeves on both arms": "İki kol kaplama", "chest piece": "Göğüs kaplama", "back piece": "Sırt kaplama", "heavily tattooed": "Yoğun dövmeli", "fully covered": "Tamamen kaplı"},
|
| 2020 |
celebrities_male: c_m, celebrities_female: c_f, child_celebrities_male: cc_m, child_celebrities_female: cc_f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2021 |
}
|
| 2022 |
};
|
| 2023 |
|
|
|
|
| 2845 |
if env_id in all_data:
|
| 2846 |
all_data[env_id]['archived'] = False
|
| 2847 |
save_data(all_data)
|
| 2848 |
+
flash(f'Среда {env_id} восстановлена из архива.', 'success')
|
| 2849 |
else:
|
| 2850 |
+
flash(f'Среда {env_id} не найдена.', 'error')
|
| 2851 |
return redirect(url_for('admhosto'))
|
| 2852 |
|
| 2853 |
@app.route('/admhosto/clear_user/<env_id>', methods=['POST'])
|
|
|
|
| 2857 |
if env_id in all_data and all_data[env_id].get('type') == 'closed':
|
| 2858 |
all_data[env_id]['device_token'] = None
|
| 2859 |
save_data(all_data)
|
| 2860 |
+
flash(f'Пользователь отвязан от среды {env_id}.', 'success')
|
| 2861 |
else:
|
| 2862 |
+
flash(f'Ошибка: Среда не найдена или не является закрытой.', 'error')
|
| 2863 |
return redirect(url_for('admhosto'))
|
| 2864 |
|
| 2865 |
@app.route('/admhosto/toggle_type/<env_id>', methods=['POST'])
|
|
|
|
| 2870 |
current_type = all_data[env_id].get('type', 'closed')
|
| 2871 |
if current_type == 'closed':
|
| 2872 |
all_data[env_id]['type'] = 'open'
|
| 2873 |
+
flash(f'Среда {env_id} теперь открыта.', 'success')
|
| 2874 |
else:
|
| 2875 |
all_data[env_id]['type'] = 'closed'
|
| 2876 |
all_data[env_id]['device_token'] = None
|
| 2877 |
+
flash(f'Среда {env_id} теперь закрыта. Пользователь сброшен.', 'success')
|
| 2878 |
save_data(all_data)
|
| 2879 |
else:
|
| 2880 |
+
flash(f'Среда {env_id} не найдена.', 'error')
|
| 2881 |
return redirect(url_for('admhosto'))
|
| 2882 |
|
| 2883 |
@app.route('/admhosto/open_all', methods=['POST'])
|
|
|
|
| 2891 |
count += 1
|
| 2892 |
if count > 0:
|
| 2893 |
save_data(all_data)
|
| 2894 |
+
flash(f'{count} сред(ы) были успешно открыты.', 'success')
|
| 2895 |
else:
|
| 2896 |
+
flash('Нет закрытых активных сред для открытия.', 'info')
|
| 2897 |
return redirect(url_for('admhosto'))
|
| 2898 |
|
| 2899 |
@app.route('/admhosto/stats/<env_id>')
|
|
|
|
| 2903 |
env_data = data.get(env_id)
|
| 2904 |
|
| 2905 |
if not env_data:
|
| 2906 |
+
return jsonify({"error": "Среда ненайдена"}), 404
|
| 2907 |
|
| 2908 |
raw_logs = env_data.get("logs", [])
|
| 2909 |
formatted_logs = []
|
|
|
|
| 3036 |
backup_thread = threading.Thread(target=periodic_backup, daemon=True)
|
| 3037 |
backup_thread.start()
|
| 3038 |
port = int(os.environ.get('PORT', 7860))
|
| 3039 |
+
app.run(debug=False, host='0.0.0.0', port=port)
|