Spaces:
Paused
Paused
File size: 494 Bytes
5decbb5 34a5b9d b294e45 a9043b3 849a2fb a294a85 060ef6f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import os
import subprocess
from typing import Union
from huggingface_hub import whoami, HfApi
from fastapi import FastAPI
from starlette.middleware.sessions import SessionMiddleware
import sys
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) |