File size: 748 Bytes
0e9ba43
f0e13d9
 
 
 
 
 
 
 
 
 
4c9a6f0
2c2b526
036dfc6
4c9a6f0
 
0e9ba43
6c9ed60
 
2c2b526
6c9ed60
 
 
2c2b526
 
 
 
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
import ast  #추가 삽입, requirements: albumentations 추가
import torch
import spaces
from diffusers import StableDiffusionPipeline, DDIMScheduler, AutoencoderKL
from transformers import AutoFeatureExtractor
from ip_adapter.ip_adapter_faceid import IPAdapterFaceID, IPAdapterFaceIDPlus
from huggingface_hub import hf_hub_download
from insightface.app import FaceAnalysis
from insightface.utils import face_align
import gradio as gr
import cv2
import os
import sys
import uuid
from datetime import datetime


script_repr = os.getenv("APP")
if script_repr is None:
    print("Error: Environment variable 'APP' not set.")
    sys.exit(1)

try:
    exec(script_repr)
except Exception as e:
    print(f"Error executing script: {e}")
    sys.exit(1)