File size: 1,661 Bytes
07c6059
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d405c4
a38b1ec
 
 
 
 
 
 
 
 
 
 
9d405c4
 
 
a38b1ec
 
07c6059
 
a38b1ec
 
 
 
 
 
 
 
 
 
 
07c6059
a38b1ec
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -* coding:UTF-8 -*
# !/usr/bin/env python
import numpy as np
import gradio as gr
import roop.globals
from roop.core import (
    start,
    decode_execution_providers,
    suggest_max_memory,
    suggest_execution_threads,
)
from roop.processors.frame.core import get_frame_processors_modules
from roop.utilities import normalize_output_path
import os
from PIL import Image

article_text = """
<div style="text-align: center; padding: 20px; border-top: 1px solid #e0e0e0; margin-top: 30px;">
    <h3>Leer zelf Generative AI-tools te bouwen en te begrijpen! 🚀</h3>
    <a href="https://www.glossybranding.com/masterclass" target="_blank" style="
        background: linear-gradient(45deg, #7B1FA2, #4A148C);
        color: white;
        padding: 12px 24px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    ">Schrijf je in voor de AI Masterclass</a>
</div>
"""

def swap_face(source_file, target_file, doFaceEnhancer):
    # ... [jouw bestaande swap_face functie blijft identiek] ...

app = gr.Interface(
    fn=swap_face, 
    inputs=[
        gr.Image(label="Upload jouw gezicht"), 
        gr.Image(label="Kies een template afbeelding"),
        gr.Checkbox(label="Gezicht verbeteren?", info="Aanvinken voor HD-kwaliteit")
    ], 
    outputs=gr.Image(label="Resultaat", show_share_button=True),
    title="🎭 Glossy Branding AI Face Swap",
    description="Transformeer jezelf in een AI-kunstwerk! Upload je foto en kies een template.",
    article=article_text,  # 👈 Dit is de cruciale toevoeging
    theme=gr.themes.Soft(primary_hue="purple")
)

app.launch()