Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from deep_translator import GoogleTranslator
|
|
9 |
import json
|
10 |
|
11 |
# Project by Nymbo
|
12 |
-
|
13 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
15 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
@@ -39,7 +39,7 @@ def query(prompt, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
39 |
"strength": strength
|
40 |
}
|
41 |
|
42 |
-
response = requests.post(
|
43 |
if response.status_code != 200:
|
44 |
print(f"Error: Failed to get image. Response status: {response.status_code}")
|
45 |
print(f"Response content: {response.text}")
|
|
|
9 |
import json
|
10 |
|
11 |
# Project by Nymbo
|
12 |
+
alto_api= "https://api-inference.huggingface.co/models/enhanceaiteam/Flux-uncensored"
|
13 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
15 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
39 |
"strength": strength
|
40 |
}
|
41 |
|
42 |
+
response = requests.post(alto_api, headers=headers, json=payload, timeout=timeout)
|
43 |
if response.status_code != 200:
|
44 |
print(f"Error: Failed to get image. Response status: {response.status_code}")
|
45 |
print(f"Response content: {response.text}")
|