greendra commited on
Commit
cb95a81
·
verified ·
1 Parent(s): 6d00105

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ from openai import OpenAI, RateLimitError, APIConnectionError, AuthenticationErr
15
  # Project by Nymbo
16
 
17
  # --- Constants ---
18
- API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
19
  API_TOKEN = os.getenv("HF_READ_TOKEN")
20
  if not API_TOKEN:
21
  print("WARNING: HF_READ_TOKEN environment variable not set. API calls may fail.")
@@ -150,7 +150,7 @@ def query(prompt, negative_prompt="", steps=4, cfg_scale=0, seed=-1, width=1024,
150
  print(f" Prompt: '{original_prompt}'\n") # Add newline
151
  return None, "<p style='color: red; text-align: center;'>Configuration Error: API Token missing.</p>"
152
 
153
- response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
154
  response.raise_for_status()
155
 
156
  image_bytes = response.content
 
15
  # Project by Nymbo
16
 
17
  # --- Constants ---
18
+ API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
19
  API_TOKEN = os.getenv("HF_READ_TOKEN")
20
  if not API_TOKEN:
21
  print("WARNING: HF_READ_TOKEN environment variable not set. API calls may fail.")
 
150
  print(f" Prompt: '{original_prompt}'\n") # Add newline
151
  return None, "<p style='color: red; text-align: center;'>Configuration Error: API Token missing.</p>"
152
 
153
+ response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout, provider="fal-ai")
154
  response.raise_for_status()
155
 
156
  image_bytes = response.content