Spaces:
Running on Zero
Running on Zero
Commit ·
aeda761
1
Parent(s): b19d1b7
Tab1 Identity: face fields -> dropdowns of SD1.5-reliable tags (faceshape/skin/eyecolor/eyeshape/brow/nose/mouth/expression) (#41)
Browse files- Tab1 Identity: face fields -> dropdowns of SD1.5-reliable tags (faceshape/skin/eyecolor/eyeshape/brow/nose/mouth/expression) (38efff99ca5ba29166d8347b3e134d82282f7821)
Co-authored-by: pormungtailaw <pormungtai@users.noreply.huggingface.co>
app.py
CHANGED
|
@@ -311,17 +311,92 @@ with gr.Blocks(css=CSS, theme=gr.themes.Soft(primary_hue="blue"),
|
|
| 311 |
f_age = gr.Textbox(label="อายุ", placeholder="เช่น 22")
|
| 312 |
f_ethnicity = gr.Textbox(label="เชื้อชาติ", placeholder="เช่น ไทย, เกาหลี")
|
| 313 |
with gr.Row():
|
| 314 |
-
f_faceshape = gr.
|
| 315 |
-
|
| 316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
with gr.Row():
|
| 318 |
-
f_eyes = gr.
|
| 319 |
-
|
| 320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
with gr.Row():
|
| 322 |
-
f_mouth = gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
f_hair = gr.Textbox(label="ทรงผม / สีผม", placeholder="เช่น ผมยาวสีดำ")
|
| 324 |
-
f_expr = gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
face_build_btn = gr.Button("✨ สร้าง prompt ใบหน้า", variant="secondary")
|
| 326 |
with gr.Row():
|
| 327 |
with gr.Column(scale=3):
|
|
|
|
| 311 |
f_age = gr.Textbox(label="อายุ", placeholder="เช่น 22")
|
| 312 |
f_ethnicity = gr.Textbox(label="เชื้อชาติ", placeholder="เช่น ไทย, เกาหลี")
|
| 313 |
with gr.Row():
|
| 314 |
+
f_faceshape = gr.Dropdown(
|
| 315 |
+
label="โครงหน้า (เลือกได้/พิมพ์เองได้)",
|
| 316 |
+
choices=[
|
| 317 |
+
("รูปไข่ / oval", "oval face"),
|
| 318 |
+
("กลม / round", "round face"),
|
| 319 |
+
("หัวใจ / heart", "heart-shaped face"),
|
| 320 |
+
("เหลี่ยม / square", "square face, defined jaw"),
|
| 321 |
+
("ยาว / long", "long face"),
|
| 322 |
+
("เรียว V / v-line", "v-line face, slim jaw"),
|
| 323 |
+
],
|
| 324 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 325 |
+
f_skin = gr.Dropdown(
|
| 326 |
+
label="สีผิว (เลือกได้/พิมพ์เองได้)",
|
| 327 |
+
choices=[
|
| 328 |
+
("ขาว / fair", "fair skin"),
|
| 329 |
+
("ขาวอมชมพู / light", "light skin, rosy"),
|
| 330 |
+
("สองสี / olive", "olive skin"),
|
| 331 |
+
("แทน / tan", "tan skin"),
|
| 332 |
+
("แทนเข้ม / dark", "dark skin"),
|
| 333 |
+
],
|
| 334 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 335 |
+
f_eyecolor = gr.Dropdown(
|
| 336 |
+
label="สีตา (เลือกได้/พิมพ์เองได้)",
|
| 337 |
+
choices=[
|
| 338 |
+
("น้ำตาล / brown", "brown eyes"),
|
| 339 |
+
("น้ำตาลเข้ม / dark brown", "dark brown eyes"),
|
| 340 |
+
("ดำ / black", "black eyes"),
|
| 341 |
+
("น้ำผึ้ง / hazel", "hazel eyes"),
|
| 342 |
+
("ฟ้า / blue", "blue eyes"),
|
| 343 |
+
("เขียว / green", "green eyes"),
|
| 344 |
+
("เทา / gray", "gray eyes"),
|
| 345 |
+
],
|
| 346 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 347 |
with gr.Row():
|
| 348 |
+
f_eyes = gr.Dropdown(
|
| 349 |
+
label="ดวงตา (เลือกได้/พิมพ์เองได้)",
|
| 350 |
+
choices=[
|
| 351 |
+
("ตากลมโต / round", "big round eyes"),
|
| 352 |
+
("ตาอัลมอนด์ / almond", "almond eyes"),
|
| 353 |
+
("ตาชั้นเดียว / monolid", "monolid eyes"),
|
| 354 |
+
("ตาสองชั้น / double eyelid", "double eyelid"),
|
| 355 |
+
("ตาหางชี้ / upturned", "upturned eyes"),
|
| 356 |
+
("ตาหางตก / downturned", "downturned eyes"),
|
| 357 |
+
],
|
| 358 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 359 |
+
f_brow = gr.Dropdown(
|
| 360 |
+
label="คิ้ว (เลือกได้/พิมพ์เองได้)",
|
| 361 |
+
choices=[
|
| 362 |
+
("คิ้วหนา / thick", "thick eyebrows"),
|
| 363 |
+
("คิ้วบาง / thin", "thin eyebrows"),
|
| 364 |
+
("คิ้วโก่ง / arched", "arched eyebrows"),
|
| 365 |
+
("คิ้วตรง / straight", "straight eyebrows"),
|
| 366 |
+
],
|
| 367 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 368 |
+
f_nose = gr.Dropdown(
|
| 369 |
+
label="จมูก (เลือกได้/พิมพ์เองได้)",
|
| 370 |
+
choices=[
|
| 371 |
+
("จมูกโด่ง / pointed", "pointed nose, high nose bridge"),
|
| 372 |
+
("จมูกเล็ก / small", "small nose"),
|
| 373 |
+
("จมูกตรง / straight", "straight nose"),
|
| 374 |
+
("จมูกบาน / wide", "wide nose"),
|
| 375 |
+
],
|
| 376 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 377 |
with gr.Row():
|
| 378 |
+
f_mouth = gr.Dropdown(
|
| 379 |
+
label="ปาก (เลือกได้/พิมพ์เองได้)",
|
| 380 |
+
choices=[
|
| 381 |
+
("ปากอิ่ม / full", "full lips"),
|
| 382 |
+
("ปากบาง / thin", "thin lips"),
|
| 383 |
+
("ปากเล็ก / small", "small lips"),
|
| 384 |
+
("ปากกระจับ / heart", "heart-shaped lips"),
|
| 385 |
+
("ยิ้มมุมปาก / slight smile", "slight smile"),
|
| 386 |
+
],
|
| 387 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 388 |
f_hair = gr.Textbox(label="ทรงผม / สีผม", placeholder="เช่น ผมยาวสีดำ")
|
| 389 |
+
f_expr = gr.Dropdown(
|
| 390 |
+
label="สีหน้า / อารมณ์ (เลือกได้/พิมพ์เองได้)",
|
| 391 |
+
choices=[
|
| 392 |
+
("ยิ้มอ่อน / soft smile", "soft smile"),
|
| 393 |
+
("ยิ้มกว้าง / grin", "happy grin, smiling"),
|
| 394 |
+
("นิ่ง / neutral", "neutral expression"),
|
| 395 |
+
("เซ็กซี่ / seductive", "seductive expression"),
|
| 396 |
+
("เศร้า / sad", "sad expression"),
|
| 397 |
+
("มองกล้อง / look at viewer", "looking at viewer, eye contact"),
|
| 398 |
+
],
|
| 399 |
+
value=None, multiselect=True, allow_custom_value=True)
|
| 400 |
face_build_btn = gr.Button("✨ สร้าง prompt ใบหน้า", variant="secondary")
|
| 401 |
with gr.Row():
|
| 402 |
with gr.Column(scale=3):
|