Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -216,7 +216,7 @@ def spirit_animal_baseline(image_path, num_images = 4):
|
|
216 |
pose_pil = Image.fromarray(cv2.resize(pose_image, (gen_width, gen_height), interpolation=cv2.INTER_LANCZOS4))
|
217 |
|
218 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
219 |
-
api_key =
|
220 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
221 |
payload = {
|
222 |
"model": "gpt-4o-mini",
|
@@ -302,7 +302,7 @@ def spirit_animal_with_background(image_path, num_images = 4):
|
|
302 |
pose_pil = Image.fromarray(cv2.resize(pose_image, (gen_width, gen_height), interpolation=cv2.INTER_LANCZOS4))
|
303 |
|
304 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
305 |
-
api_key =
|
306 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
307 |
payload = {
|
308 |
"model": "gpt-4o-mini",
|
@@ -374,7 +374,7 @@ def generate_multiple_animals(image_path, keep_background=True, num_images = 4):
|
|
374 |
gen_width, gen_height = resize_to_multiple_of_64(gen_width, gen_height)
|
375 |
|
376 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
377 |
-
api_key =
|
378 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
379 |
payload = {
|
380 |
"model": "gpt-4o-mini",
|
|
|
216 |
pose_pil = Image.fromarray(cv2.resize(pose_image, (gen_width, gen_height), interpolation=cv2.INTER_LANCZOS4))
|
217 |
|
218 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
219 |
+
api_key = "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"
|
220 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
221 |
payload = {
|
222 |
"model": "gpt-4o-mini",
|
|
|
302 |
pose_pil = Image.fromarray(cv2.resize(pose_image, (gen_width, gen_height), interpolation=cv2.INTER_LANCZOS4))
|
303 |
|
304 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
305 |
+
api_key = "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"
|
306 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
307 |
payload = {
|
308 |
"model": "gpt-4o-mini",
|
|
|
374 |
gen_width, gen_height = resize_to_multiple_of_64(gen_width, gen_height)
|
375 |
|
376 |
base64_image = base64.b64encode(cv2.imencode('.jpg', image_rgb)[1]).decode()
|
377 |
+
api_key = "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"
|
378 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
379 |
payload = {
|
380 |
"model": "gpt-4o-mini",
|