Update app.py
Browse files
app.py
CHANGED
@@ -577,13 +577,29 @@ def safe_state_update(state, updates):
|
|
577 |
def create_interface():
|
578 |
import base64
|
579 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
def get_image_base64(image_path):
|
581 |
with open(image_path, "rb") as img_file:
|
582 |
return base64.b64encode(img_file.read()).decode()
|
583 |
|
584 |
# 모바일/데스크톱 로고 미리 인코딩
|
585 |
-
|
586 |
-
|
|
|
|
|
|
|
|
|
|
|
587 |
|
588 |
css = """
|
589 |
/* 모바일 뷰 */
|
|
|
577 |
def create_interface():
|
578 |
import base64
|
579 |
|
580 |
+
# initial_state 정의 추가
|
581 |
+
initial_state = {
|
582 |
+
"user_name": "",
|
583 |
+
"baseline_features": None,
|
584 |
+
"reflections": [],
|
585 |
+
"wish": None,
|
586 |
+
"final_prompt": "",
|
587 |
+
"image_path": None,
|
588 |
+
"current_tab": 0
|
589 |
+
}
|
590 |
+
|
591 |
def get_image_base64(image_path):
|
592 |
with open(image_path, "rb") as img_file:
|
593 |
return base64.b64encode(img_file.read()).decode()
|
594 |
|
595 |
# 모바일/데스크톱 로고 미리 인코딩
|
596 |
+
try:
|
597 |
+
mobile_logo = get_image_base64("static/DIGITAL_GUTPAN_LOGO_m.png")
|
598 |
+
desktop_logo = get_image_base64("static/DIGITAL_GUTPAN_LOGO_w.png")
|
599 |
+
except Exception as e:
|
600 |
+
print(f"로고 로딩 에러: {e}")
|
601 |
+
mobile_logo = ""
|
602 |
+
desktop_logo =
|
603 |
|
604 |
css = """
|
605 |
/* 모바일 뷰 */
|