NSFW-Uncensored / app.py
seawolf2357's picture
Update app.py
5ffb58c verified
raw
history blame contribute delete
606 Bytes
import os
import spaces
import gradio as gr
import numpy as np
from PIL import Image
import random
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
import torch
from transformers import pipeline as transformers_pipeline
import re
from huggingface_hub import InferenceClient
import ast #추가 삽입, requirements: albumentations 추가
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)