Update app.py
Browse files
app.py
CHANGED
@@ -1631,52 +1631,45 @@ def create_interface():
|
|
1631 |
inputs=[name_input, state],
|
1632 |
outputs=[welcome_section, story_section, blessing_section, state]
|
1633 |
)
|
1634 |
-
|
1635 |
continue_btn.click(
|
1636 |
fn=handle_continue,
|
1637 |
outputs=[story_section, welcome_section, blessing_section]
|
1638 |
)
|
1639 |
-
|
1640 |
set_baseline_btn.click(
|
1641 |
fn=handle_blessing_complete,
|
1642 |
inputs=[baseline_audio, state],
|
1643 |
-
outputs=[state, blessing_status, processing_status]
|
1644 |
)
|
1645 |
-
|
1646 |
-
enter_btn.click(
|
1647 |
-
fn=lambda: gr.update(selected=1), # 인덱스로 변경
|
1648 |
-
outputs=tabs
|
1649 |
-
)
|
1650 |
-
|
1651 |
save_btn.click(
|
1652 |
fn=save_reflection_fixed,
|
1653 |
inputs=[reflection_input, state],
|
1654 |
outputs=[state, reflections_display]
|
1655 |
)
|
1656 |
-
|
1657 |
clear_btn.click(
|
1658 |
fn=lambda: None,
|
1659 |
outputs=[voice_input]
|
1660 |
)
|
1661 |
-
|
1662 |
analyze_btn.click(
|
1663 |
fn=safe_analyze_voice,
|
1664 |
inputs=[voice_input, state],
|
1665 |
outputs=[state, transcribed_text, voice_emotion, text_emotion, final_prompt, status_display]
|
1666 |
)
|
1667 |
|
1668 |
-
|
1669 |
generate_btn.click(
|
1670 |
fn=generate_image_from_prompt,
|
1671 |
inputs=[final_prompt],
|
1672 |
outputs=[result_image]
|
1673 |
)
|
1674 |
-
|
1675 |
-
|
1676 |
save_final_btn.click(
|
1677 |
fn=handle_save_wish,
|
1678 |
inputs=[final_reflection, state],
|
1679 |
-
outputs=[blessing_status, wishes_display]
|
1680 |
)
|
1681 |
|
1682 |
return app
|
|
|
1631 |
inputs=[name_input, state],
|
1632 |
outputs=[welcome_section, story_section, blessing_section, state]
|
1633 |
)
|
1634 |
+
|
1635 |
continue_btn.click(
|
1636 |
fn=handle_continue,
|
1637 |
outputs=[story_section, welcome_section, blessing_section]
|
1638 |
)
|
1639 |
+
|
1640 |
set_baseline_btn.click(
|
1641 |
fn=handle_blessing_complete,
|
1642 |
inputs=[baseline_audio, state],
|
1643 |
+
outputs=[state, blessing_status, processing_status]
|
1644 |
)
|
1645 |
+
|
|
|
|
|
|
|
|
|
|
|
1646 |
save_btn.click(
|
1647 |
fn=save_reflection_fixed,
|
1648 |
inputs=[reflection_input, state],
|
1649 |
outputs=[state, reflections_display]
|
1650 |
)
|
1651 |
+
|
1652 |
clear_btn.click(
|
1653 |
fn=lambda: None,
|
1654 |
outputs=[voice_input]
|
1655 |
)
|
1656 |
+
|
1657 |
analyze_btn.click(
|
1658 |
fn=safe_analyze_voice,
|
1659 |
inputs=[voice_input, state],
|
1660 |
outputs=[state, transcribed_text, voice_emotion, text_emotion, final_prompt, status_display]
|
1661 |
)
|
1662 |
|
|
|
1663 |
generate_btn.click(
|
1664 |
fn=generate_image_from_prompt,
|
1665 |
inputs=[final_prompt],
|
1666 |
outputs=[result_image]
|
1667 |
)
|
1668 |
+
|
|
|
1669 |
save_final_btn.click(
|
1670 |
fn=handle_save_wish,
|
1671 |
inputs=[final_reflection, state],
|
1672 |
+
outputs=[blessing_status, wishes_display]
|
1673 |
)
|
1674 |
|
1675 |
return app
|