Update app.py
Browse files
app.py
CHANGED
|
@@ -14,25 +14,25 @@ MAX_IMAGE_SIZE = 1024
|
|
| 14 |
|
| 15 |
def infer(
|
| 16 |
prompt,
|
| 17 |
-
negative_prompt,
|
| 18 |
-
seed,
|
| 19 |
randomize_seed,
|
| 20 |
-
width,
|
| 21 |
-
height,
|
| 22 |
-
guidance_scale,
|
| 23 |
-
num_inference_steps,
|
| 24 |
progress=gr.Progress(track_tqdm=True),
|
| 25 |
):
|
| 26 |
if randomize_seed:
|
| 27 |
seed = random.randint(0, MAX_SEED)
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
#
|
| 31 |
-
image = interface(
|
| 32 |
|
| 33 |
-
# If the model supports additional parameters, you can
|
| 34 |
# image = interface(
|
| 35 |
-
#
|
| 36 |
# negative_prompt=negative_prompt if negative_prompt else None,
|
| 37 |
# seed=seed,
|
| 38 |
# width=width,
|
|
|
|
| 14 |
|
| 15 |
def infer(
|
| 16 |
prompt,
|
| 17 |
+
negative_prompt,
|
| 18 |
+
seed,
|
| 19 |
randomize_seed,
|
| 20 |
+
width,
|
| 21 |
+
height,
|
| 22 |
+
guidance_scale,
|
| 23 |
+
num_inference_steps,
|
| 24 |
progress=gr.Progress(track_tqdm=True),
|
| 25 |
):
|
| 26 |
if randomize_seed:
|
| 27 |
seed = random.randint(0, MAX_SEED)
|
| 28 |
|
| 29 |
+
# Call the interface with the correct key ("inputs" instead of "prompt")
|
| 30 |
+
# Start with minimal parameters and add others if supported
|
| 31 |
+
image = interface(inputs=prompt)
|
| 32 |
|
| 33 |
+
# If the model supports additional parameters, you can extend this:
|
| 34 |
# image = interface(
|
| 35 |
+
# inputs=prompt,
|
| 36 |
# negative_prompt=negative_prompt if negative_prompt else None,
|
| 37 |
# seed=seed,
|
| 38 |
# width=width,
|