Update app.py
Browse files
app.py
CHANGED
@@ -1655,43 +1655,17 @@ def create_interface():
|
|
1655 |
analyze_btn.click(
|
1656 |
fn=safe_analyze_voice,
|
1657 |
inputs=[voice_input, state],
|
1658 |
-
outputs=[state, transcribed_text, voice_emotion, text_emotion, final_prompt, status_display]
|
1659 |
-
_js=f"""
|
1660 |
-
async (voice_input, state) => {{
|
1661 |
-
if (!voice_input) {{
|
1662 |
-
return;
|
1663 |
-
}}
|
1664 |
-
showLoading('analyze-btn', '분석 중...');
|
1665 |
-
try {{
|
1666 |
-
const result = await original_fn(voice_input, state);
|
1667 |
-
return result;
|
1668 |
-
}} finally {{
|
1669 |
-
hideLoading('analyze-btn', '소원 분석하기');
|
1670 |
-
}}
|
1671 |
-
}}
|
1672 |
-
"""
|
1673 |
)
|
1674 |
-
|
|
|
1675 |
generate_btn.click(
|
1676 |
fn=generate_image_from_prompt,
|
1677 |
inputs=[final_prompt],
|
1678 |
-
outputs=[result_image]
|
1679 |
-
_js=f"""
|
1680 |
-
async (prompt) => {{
|
1681 |
-
if (!prompt) {{
|
1682 |
-
return;
|
1683 |
-
}}
|
1684 |
-
showLoading('generate-btn', '그림 생성 중...');
|
1685 |
-
try {{
|
1686 |
-
const result = await original_fn(prompt);
|
1687 |
-
return result;
|
1688 |
-
}} finally {{
|
1689 |
-
hideLoading('generate-btn', '마음의 그림 그리기');
|
1690 |
-
}}
|
1691 |
-
}}
|
1692 |
-
"""
|
1693 |
)
|
1694 |
|
|
|
1695 |
save_final_btn.click(
|
1696 |
fn=handle_save_wish,
|
1697 |
inputs=[final_reflection, state],
|
|
|
1655 |
analyze_btn.click(
|
1656 |
fn=safe_analyze_voice,
|
1657 |
inputs=[voice_input, state],
|
1658 |
+
outputs=[state, transcribed_text, voice_emotion, text_emotion, final_prompt, status_display]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1659 |
)
|
1660 |
+
|
1661 |
+
|
1662 |
generate_btn.click(
|
1663 |
fn=generate_image_from_prompt,
|
1664 |
inputs=[final_prompt],
|
1665 |
+
outputs=[result_image]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1666 |
)
|
1667 |
|
1668 |
+
|
1669 |
save_final_btn.click(
|
1670 |
fn=handle_save_wish,
|
1671 |
inputs=[final_reflection, state],
|