Spaces:
Runtime error
Runtime error
Commit
·
18297ea
1
Parent(s):
76e5fac
limit prompt length to 500 characters
Browse files- .gitignore +1 -0
- app.py +2 -1
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
/.env*
|
app.py
CHANGED
@@ -44,7 +44,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, guidance_scale):
|
|
44 |
payload = {
|
45 |
# "base_model": "stable-diffusion-xl-v1-0"
|
46 |
"checkpoint_id": DREAMLOOK_API_MODEL_CHECKPOINT,
|
47 |
-
"prompt": prompt,
|
48 |
"negative_prompt": NEGATIVE_PROMPT,
|
49 |
"num_samples": NUM_IMAGES,
|
50 |
"width": 704,
|
@@ -104,6 +104,7 @@ with gr.Blocks() as demo:
|
|
104 |
info="Describe the image you want to generate, or click on a sample prompt below.",
|
105 |
placeholder="Enter your prompt",
|
106 |
max_lines=10,
|
|
|
107 |
)
|
108 |
negative_prompt = gr.Textbox(
|
109 |
label="Negative Prompt",
|
|
|
44 |
payload = {
|
45 |
# "base_model": "stable-diffusion-xl-v1-0"
|
46 |
"checkpoint_id": DREAMLOOK_API_MODEL_CHECKPOINT,
|
47 |
+
"prompt": prompt[:500],
|
48 |
"negative_prompt": NEGATIVE_PROMPT,
|
49 |
"num_samples": NUM_IMAGES,
|
50 |
"width": 704,
|
|
|
104 |
info="Describe the image you want to generate, or click on a sample prompt below.",
|
105 |
placeholder="Enter your prompt",
|
106 |
max_lines=10,
|
107 |
+
|
108 |
)
|
109 |
negative_prompt = gr.Textbox(
|
110 |
label="Negative Prompt",
|