Update app.py
Browse files
app.py
CHANGED
@@ -550,13 +550,13 @@ def create_interface():
|
|
550 |
state, text, voice_result, text_result, prompt = analyze_voice(audio, current_state)
|
551 |
return state, text, voice_result, text_result, prompt
|
552 |
|
553 |
-
def handle_image_generation(prompt):
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
|
559 |
-
def save_reflection_fixed(text, state):
|
560 |
if not text.strip():
|
561 |
return state, []
|
562 |
|
@@ -577,7 +577,7 @@ def handle_image_generation(prompt):
|
|
577 |
print(f"Error saving reflection: {e}")
|
578 |
return state, state.get("reflections", [])
|
579 |
|
580 |
-
def save_wish(text, state):
|
581 |
if not text.strip():
|
582 |
return "소원을 입력해주세요.", []
|
583 |
|
|
|
550 |
state, text, voice_result, text_result, prompt = analyze_voice(audio, current_state)
|
551 |
return state, text, voice_result, text_result, prompt
|
552 |
|
553 |
+
def handle_image_generation(prompt): # 들여쓰기 수정
|
554 |
+
image_path = generate_image_from_prompt(prompt)
|
555 |
+
if image_path and os.path.exists(image_path):
|
556 |
+
return image_path
|
557 |
+
return None
|
558 |
|
559 |
+
def save_reflection_fixed(text, state): # 들여쓰기 수정
|
560 |
if not text.strip():
|
561 |
return state, []
|
562 |
|
|
|
577 |
print(f"Error saving reflection: {e}")
|
578 |
return state, state.get("reflections", [])
|
579 |
|
580 |
+
def save_wish(text, state): # 들여쓰기 수정
|
581 |
if not text.strip():
|
582 |
return "소원을 입력해주세요.", []
|
583 |
|