Update app.py
All checks were successful
society-ai-hub-container-cache Actions Demo / build (push) Successful in 59s

This commit is contained in:
badhezi 2024-12-11 08:34:53 +00:00
parent 601f0a2bfa
commit 513d8342d5

7
app.py

@ -5,8 +5,10 @@ from PIL import Image
from io import BytesIO
import numpy as np
import random
import os
API_URL = 'https://hub.societyai.com/models/flux-1-schnell/infer'
API_URL = 'https://hub.societyai.com/models/flux-1-schnell-test/infer'
API_TOKEN = os.environ.get("SAI_API_TOKEN", "")
MAX_SEED = np.iinfo(np.int32).max
MAX_IMAGE_SIZE = 2048
@ -107,7 +109,8 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
}
headers = {
"Content-Type": "application/json"
"Content-Type": "application/json",
"Authorization": f"Bearer {API_TOKEN}"
}
# Send the POST request