Spaces:
Sleeping
Sleeping
koji
commited on
Commit
•
df58d35
1
Parent(s):
00ce076
環境変数の変更
Browse files
app.py
CHANGED
@@ -8,13 +8,17 @@ import numpy as np
|
|
8 |
import streamlit as st
|
9 |
import torch
|
10 |
from diffusers import StableDiffusionPipeline
|
11 |
-
|
|
|
12 |
from huggingface_hub import notebook_login
|
13 |
from PIL import Image
|
14 |
|
15 |
-
|
|
|
|
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
sys.path.append("./")
|
20 |
from simulation import *
|
|
|
8 |
import streamlit as st
|
9 |
import torch
|
10 |
from diffusers import StableDiffusionPipeline
|
11 |
+
|
12 |
+
# from dotenv import load_dotenv
|
13 |
from huggingface_hub import notebook_login
|
14 |
from PIL import Image
|
15 |
|
16 |
+
# ローカル実行用 .envファイルから環境変数読み込み
|
17 |
+
# load_dotenv(".env")
|
18 |
+
# ACCESS_TOKEN = os.environ.get("ACCESS_TOKEN")
|
19 |
|
20 |
+
# Hugging SpaceのSecret Repoから環境変数読み取り
|
21 |
+
ACCESS_TOKEN = st.secrets["ACCESS_TOKEN"]
|
22 |
|
23 |
sys.path.append("./")
|
24 |
from simulation import *
|