Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,7 @@ def initialize_dropdowns():
|
|
| 114 |
"indoor": indoor_choices,
|
| 115 |
"tech": tech_choices,
|
| 116 |
"colorful": colorful_choices,
|
| 117 |
-
"abstract": abstract_choices
|
| 118 |
"jewelry": jewelry_choices # 새로 추가
|
| 119 |
|
| 120 |
}
|
|
@@ -310,7 +310,7 @@ def filter_prompt_only(prompt):
|
|
| 310 |
# 위 방법으로 찾지 못한 경우 원본 반환
|
| 311 |
return prompt.strip()
|
| 312 |
|
| 313 |
-
def get_selected_background_info(bg_type, simple, studio, nature, indoor, tech, colorful, abstract):
|
| 314 |
"""선택된 배경 정보를 가져오는 함수"""
|
| 315 |
if bg_type == "심플 배경":
|
| 316 |
return {
|
|
@@ -602,14 +602,14 @@ def create_app():
|
|
| 602 |
indoor_dropdown: gr.update(visible=(bg_type == "실내 환경")),
|
| 603 |
tech_dropdown: gr.update(visible=(bg_type == "테크놀로지 배경")),
|
| 604 |
colorful_dropdown: gr.update(visible=(bg_type == "컬러풀 패턴 배경")),
|
| 605 |
-
abstract_dropdown: gr.update(visible=(bg_type == "추상/특수 배경"))
|
| 606 |
jewelry_dropdown: gr.update(visible=(bg_type == "쥬얼리 배경")) # 쥬얼리 드롭다운 추가
|
| 607 |
|
| 608 |
}
|
| 609 |
background_type.change(
|
| 610 |
fn=update_dropdowns,
|
| 611 |
inputs=[background_type],
|
| 612 |
-
outputs=[simple_dropdown, studio_dropdown, nature_dropdown, indoor_dropdown, tech_dropdown, colorful_dropdown, abstract_dropdown]
|
| 613 |
)
|
| 614 |
|
| 615 |
with gr.Row():
|
|
|
|
| 114 |
"indoor": indoor_choices,
|
| 115 |
"tech": tech_choices,
|
| 116 |
"colorful": colorful_choices,
|
| 117 |
+
"abstract": abstract_choices,
|
| 118 |
"jewelry": jewelry_choices # 새로 추가
|
| 119 |
|
| 120 |
}
|
|
|
|
| 310 |
# 위 방법으로 찾지 못한 경우 원본 반환
|
| 311 |
return prompt.strip()
|
| 312 |
|
| 313 |
+
def get_selected_background_info(bg_type, simple, studio, nature, indoor, tech, colorful, abstract, jewelry):
|
| 314 |
"""선택된 배경 정보를 가져오는 함수"""
|
| 315 |
if bg_type == "심플 배경":
|
| 316 |
return {
|
|
|
|
| 602 |
indoor_dropdown: gr.update(visible=(bg_type == "실내 환경")),
|
| 603 |
tech_dropdown: gr.update(visible=(bg_type == "테크놀로지 배경")),
|
| 604 |
colorful_dropdown: gr.update(visible=(bg_type == "컬러풀 패턴 배경")),
|
| 605 |
+
abstract_dropdown: gr.update(visible=(bg_type == "추상/특수 배경")),
|
| 606 |
jewelry_dropdown: gr.update(visible=(bg_type == "쥬얼리 배경")) # 쥬얼리 드롭다운 추가
|
| 607 |
|
| 608 |
}
|
| 609 |
background_type.change(
|
| 610 |
fn=update_dropdowns,
|
| 611 |
inputs=[background_type],
|
| 612 |
+
outputs=[simple_dropdown, studio_dropdown, nature_dropdown, indoor_dropdown, tech_dropdown, colorful_dropdown, abstract_dropdown, jewelry_dropdown]
|
| 613 |
)
|
| 614 |
|
| 615 |
with gr.Row():
|