Spaces:
Running
Running
adjust option types
Browse files- TODO +2 -0
- myapp/cli.py +5 -5
TODO
CHANGED
@@ -2,5 +2,7 @@ Todo:
|
|
2 |
Gradio:
|
3 |
β Upload button
|
4 |
β Color group
|
|
|
|
|
5 |
CLI:
|
6 |
β Buffer context
|
|
|
2 |
Gradio:
|
3 |
β Upload button
|
4 |
β Color group
|
5 |
+
β Module colors
|
6 |
+
β Cluster plot
|
7 |
CLI:
|
8 |
β Buffer context
|
myapp/cli.py
CHANGED
@@ -19,7 +19,7 @@ def cli():
|
|
19 |
|
20 |
@cli.command()
|
21 |
@click.option("--prompt", required=True)
|
22 |
-
@click.option("--target", type=click.
|
23 |
@click.option("--model", default="black-forest-labs/FLUX.1-schnell")
|
24 |
@click.option("--width", default=400)
|
25 |
@click.option("--height", default=400)
|
@@ -36,7 +36,7 @@ def generate_image(prompt, target, model, width, height):
|
|
36 |
|
37 |
@cli.command()
|
38 |
@click.option("--image", type=ImageParamType(), required=True)
|
39 |
-
@click.option("--target", type=click.
|
40 |
@click.option("--n-colors", default=4)
|
41 |
@click.option("--shade", "shades", default=(0.0,), multiple=True)
|
42 |
def generate_palette(image, target, n_colors, shades):
|
@@ -47,14 +47,14 @@ def generate_palette(image, target, n_colors, shades):
|
|
47 |
|
48 |
@cli.command()
|
49 |
@click.option("--text", required=True)
|
50 |
-
@click.option("--background", type=
|
51 |
-
@click.option("--target", type=click.
|
52 |
@click.option("--scale", type=click.IntRange(min=3, max=15), default=9)
|
53 |
@click.option("--error", type=click.Choice(list(ERROR_MAPPING)))
|
54 |
def generate_qr_code(text, background, target, scale, error):
|
55 |
write_artistic(
|
56 |
segno.make(text, error=error),
|
57 |
-
background
|
58 |
target,
|
59 |
scale=scale,
|
60 |
)
|
|
|
19 |
|
20 |
@cli.command()
|
21 |
@click.option("--prompt", required=True)
|
22 |
+
@click.option("--target", type=click.File("wb"), required=True)
|
23 |
@click.option("--model", default="black-forest-labs/FLUX.1-schnell")
|
24 |
@click.option("--width", default=400)
|
25 |
@click.option("--height", default=400)
|
|
|
36 |
|
37 |
@cli.command()
|
38 |
@click.option("--image", type=ImageParamType(), required=True)
|
39 |
+
@click.option("--target", type=click.File("wb"), required=True)
|
40 |
@click.option("--n-colors", default=4)
|
41 |
@click.option("--shade", "shades", default=(0.0,), multiple=True)
|
42 |
def generate_palette(image, target, n_colors, shades):
|
|
|
47 |
|
48 |
@cli.command()
|
49 |
@click.option("--text", required=True)
|
50 |
+
@click.option("--background", type=click.File("rb"), required=True)
|
51 |
+
@click.option("--target", type=click.File("wb"), required=True)
|
52 |
@click.option("--scale", type=click.IntRange(min=3, max=15), default=9)
|
53 |
@click.option("--error", type=click.Choice(list(ERROR_MAPPING)))
|
54 |
def generate_qr_code(text, background, target, scale, error):
|
55 |
write_artistic(
|
56 |
segno.make(text, error=error),
|
57 |
+
background,
|
58 |
target,
|
59 |
scale=scale,
|
60 |
)
|