Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
from PIL import Image
|
|
|
4 |
import io
|
5 |
|
6 |
BASE_URL = "https://api.jigsawstack.com/v1"
|
7 |
-
headers = {"x-api-key": ""}
|
8 |
|
9 |
# ----------------- JigsawStack API Wrappers ------------------
|
10 |
|
@@ -105,7 +106,7 @@ def generate_image(prompt, aspect_ratio, width, height, steps, negative_prompt,
|
|
105 |
with gr.Blocks() as demo:
|
106 |
gr.Markdown("""
|
107 |
<div style='text-align: center; margin-bottom: 24px;'>
|
108 |
-
<h1 style='font-size:2.2em; margin-bottom: 0.2em;'>🧩 JigsawStack Image Generation
|
109 |
<p style='font-size:1.2em; margin-top: 0;'>Generate high-quality images from text prompts using advanced AI models.</p>
|
110 |
<p style='font-size:1em; margin-top: 0.5em;'>For more details and API usage, see the <a href='https://jigsawstack.com/docs/api-reference/ai/image-generation' target='_blank'>documentation</a>.</p>
|
111 |
</div>
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
from PIL import Image
|
4 |
+
import os
|
5 |
import io
|
6 |
|
7 |
BASE_URL = "https://api.jigsawstack.com/v1"
|
8 |
+
headers = {"x-api-key": os.getenv("JIGSAWSTACK_API_KEY")}
|
9 |
|
10 |
# ----------------- JigsawStack API Wrappers ------------------
|
11 |
|
|
|
106 |
with gr.Blocks() as demo:
|
107 |
gr.Markdown("""
|
108 |
<div style='text-align: center; margin-bottom: 24px;'>
|
109 |
+
<h1 style='font-size:2.2em; margin-bottom: 0.2em;'>🧩 JigsawStack Image Generation</h1>
|
110 |
<p style='font-size:1.2em; margin-top: 0;'>Generate high-quality images from text prompts using advanced AI models.</p>
|
111 |
<p style='font-size:1em; margin-top: 0.5em;'>For more details and API usage, see the <a href='https://jigsawstack.com/docs/api-reference/ai/image-generation' target='_blank'>documentation</a>.</p>
|
112 |
</div>
|