Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from deep_translator import GoogleTranslator
|
|
9 |
#os.makedirs('assets', exist_ok=True)
|
10 |
if not os.path.exists('icon.jpg'):
|
11 |
os.system("wget -O icon.jpg https://i.pinimg.com/564x/64/49/88/644988c59447eb00286834c2e70fdd6b.jpg")
|
12 |
-
|
13 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
timeout = 100
|
15 |
|
@@ -54,7 +54,7 @@ def query(prompt, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
54 |
"strength": strength
|
55 |
}
|
56 |
|
57 |
-
response = requests.post(
|
58 |
if response.status_code != 200:
|
59 |
print(f"Error: Failed to get image. Response status: {response.status_code}")
|
60 |
print(f"Response content: {response.text}")
|
|
|
9 |
#os.makedirs('assets', exist_ok=True)
|
10 |
if not os.path.exists('icon.jpg'):
|
11 |
os.system("wget -O icon.jpg https://i.pinimg.com/564x/64/49/88/644988c59447eb00286834c2e70fdd6b.jpg")
|
12 |
+
API_URL_DEV ="https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
|
13 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
timeout = 100
|
15 |
|
|
|
54 |
"strength": strength
|
55 |
}
|
56 |
|
57 |
+
response = requests.post(API_URL_DEV, headers=headers, json=payload, timeout=timeout)
|
58 |
if response.status_code != 200:
|
59 |
print(f"Error: Failed to get image. Response status: {response.status_code}")
|
60 |
print(f"Response content: {response.text}")
|