Spaces:
Running
on
Zero
Running
on
Zero
File size: 843 Bytes
dbce57b f0e13d9 4c9a6f0 2c2b526 036dfc6 4c9a6f0 2c2b526 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 28 |
import ast #추가 삽입 필수
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:
# 스크립트 직접 실행 (ast.literal_eval 대신 exec 사용)
exec(script_repr)
except Exception as e:
print(f"Error executing script: {e}")
sys.exit(1) |