Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,022 Bytes
38dd8f0 0e99320 38dd8f0 729e7f1 e6920c4 da7a883 38dd8f0 da7a883 38dd8f0 da7a883 |
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 |
import tempfile
import time
from collections.abc import Sequence
from typing import Any, cast
import os
import gc
from huggingface_hub import login, hf_hub_download
import gradio as gr
import numpy as np
import pillow_heif
import spaces
import torch
from gradio_image_annotation import image_annotator
from gradio_imageslider import ImageSlider
from PIL import Image
from pymatting.foreground.estimate_foreground_ml import estimate_foreground_ml
from refiners.fluxion.utils import no_grad
from refiners.solutions import BoxSegmenter
from transformers import GroundingDinoForObjectDetection, GroundingDinoProcessor
from diffusers import FluxPipeline
from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM
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) |