Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import ast #추가
|
| 2 |
import torch
|
| 3 |
import spaces
|
| 4 |
from diffusers import StableDiffusionPipeline, DDIMScheduler, AutoencoderKL
|
|
@@ -14,14 +14,13 @@ import sys
|
|
| 14 |
import uuid
|
| 15 |
from datetime import datetime
|
| 16 |
|
| 17 |
-
|
| 18 |
script_repr = os.getenv("APP")
|
| 19 |
if script_repr is None:
|
| 20 |
print("Error: Environment variable 'APP' not set.")
|
| 21 |
sys.exit(1)
|
| 22 |
|
| 23 |
try:
|
| 24 |
-
# 스크립트 직접 실행 (ast.literal_eval 대신 exec 사용)
|
| 25 |
exec(script_repr)
|
| 26 |
except Exception as e:
|
| 27 |
print(f"Error executing script: {e}")
|
|
|
|
| 1 |
+
import ast #추가 삽입, requirements: albumentations 추가
|
| 2 |
import torch
|
| 3 |
import spaces
|
| 4 |
from diffusers import StableDiffusionPipeline, DDIMScheduler, AutoencoderKL
|
|
|
|
| 14 |
import uuid
|
| 15 |
from datetime import datetime
|
| 16 |
|
| 17 |
+
|
| 18 |
script_repr = os.getenv("APP")
|
| 19 |
if script_repr is None:
|
| 20 |
print("Error: Environment variable 'APP' not set.")
|
| 21 |
sys.exit(1)
|
| 22 |
|
| 23 |
try:
|
|
|
|
| 24 |
exec(script_repr)
|
| 25 |
except Exception as e:
|
| 26 |
print(f"Error executing script: {e}")
|