Spaces:
Running
Running
Niki Zhang
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1411,82 +1411,82 @@ def create_ui():
|
|
1411 |
|
1412 |
with gr.Row(variant="panel") as text2image_model:
|
1413 |
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
with gr.Column(scale=0.6):
|
1491 |
result = gr.Gallery(
|
1492 |
label="Result",
|
|
|
1411 |
|
1412 |
with gr.Row(variant="panel") as text2image_model:
|
1413 |
|
1414 |
+
with gr.Column(scale=0.4):
|
1415 |
+
with gr.Column():
|
1416 |
+
gr.Radio([artist], label="Artist", info="Who is the artist?🧑🎨"),
|
1417 |
+
gr.Radio(["Oil Painting","Printmaking","Watercolor Painting","Drawing"], label="Art Forms", info="What are the art forms?🎨"),
|
1418 |
+
gr.Radio(["Renaissance", "Baroque", "Impressionism","Modernism"], label="Period", info="Which art period?⏳"),
|
1419 |
+
# to be done
|
1420 |
+
gr.Dropdown(
|
1421 |
+
["ran", "swam", "ate", "slept"], value=["swam", "slept"], multiselect=True, label="Items", info="Which items are you interested in?"
|
1422 |
+
)
|
1423 |
|
1424 |
+
with gr.Row():
|
1425 |
+
prompt = gr.Text(
|
1426 |
+
label="Prompt",
|
1427 |
+
show_label=False,
|
1428 |
+
max_lines=1,
|
1429 |
+
placeholder="Enter your prompt",
|
1430 |
+
container=False,
|
1431 |
+
)
|
1432 |
+
run_button = gr.Button("Run", scale=0)
|
1433 |
|
1434 |
+
with gr.Accordion("Advanced options", open=True):
|
1435 |
+
num_images = gr.Slider(
|
1436 |
+
label="Number of Images",
|
1437 |
+
minimum=1,
|
1438 |
+
maximum=4,
|
1439 |
+
step=1,
|
1440 |
+
value=4,
|
1441 |
+
)
|
1442 |
+
with gr.Row():
|
1443 |
+
use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=True)
|
1444 |
+
negative_prompt = gr.Text(
|
1445 |
+
label="Negative prompt",
|
1446 |
+
max_lines=5,
|
1447 |
+
lines=4,
|
1448 |
+
placeholder="Enter a negative prompt",
|
1449 |
+
value="(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, NSFW",
|
1450 |
+
visible=True,
|
1451 |
+
)
|
1452 |
+
seed = gr.Slider(
|
1453 |
+
label="Seed",
|
1454 |
+
minimum=0,
|
1455 |
+
maximum=MAX_SEED,
|
1456 |
+
step=1,
|
1457 |
+
value=0,
|
1458 |
+
)
|
1459 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
1460 |
+
with gr.Row(visible=True):
|
1461 |
+
width = gr.Slider(
|
1462 |
+
label="Width",
|
1463 |
+
minimum=100,
|
1464 |
+
maximum=MAX_IMAGE_SIZE,
|
1465 |
+
step=64,
|
1466 |
+
value=1024,
|
1467 |
+
)
|
1468 |
+
height = gr.Slider(
|
1469 |
+
label="Height",
|
1470 |
+
minimum=100,
|
1471 |
+
maximum=MAX_IMAGE_SIZE,
|
1472 |
+
step=64,
|
1473 |
+
value=1024,
|
1474 |
+
)
|
1475 |
+
with gr.Row():
|
1476 |
+
guidance_scale = gr.Slider(
|
1477 |
+
label="Guidance Scale",
|
1478 |
+
minimum=0.1,
|
1479 |
+
maximum=6,
|
1480 |
+
step=0.1,
|
1481 |
+
value=3.0,
|
1482 |
+
)
|
1483 |
+
num_inference_steps = gr.Slider(
|
1484 |
+
label="Number of inference steps",
|
1485 |
+
minimum=1,
|
1486 |
+
maximum=15,
|
1487 |
+
step=1,
|
1488 |
+
value=8,
|
1489 |
+
)
|
1490 |
with gr.Column(scale=0.6):
|
1491 |
result = gr.Gallery(
|
1492 |
label="Result",
|