Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ app = Flask(__name__)
|
|
11 |
API_URL = "https://api-inference.huggingface.co/models/dreamlike-art/dreamlike-anime-1.0"
|
12 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
13 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
14 |
-
timeout =
|
15 |
|
16 |
# Function to query the API and return the generated image
|
17 |
def query(prompt, negative_prompt="", steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|
|
|
11 |
API_URL = "https://api-inference.huggingface.co/models/dreamlike-art/dreamlike-anime-1.0"
|
12 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
13 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
14 |
+
timeout = 50000 # タイムアウトを300秒に設定
|
15 |
|
16 |
# Function to query the API and return the generated image
|
17 |
def query(prompt, negative_prompt="", steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|