Update app.py
Browse files
app.py
CHANGED
|
@@ -75,13 +75,6 @@ def generate_pairing_recommendation(input_text, input_type, situation):
|
|
| 75 |
yield collected_text
|
| 76 |
time.sleep(0.03)
|
| 77 |
|
| 78 |
-
# 입력 필드 초기화 함수
|
| 79 |
-
def clear_input_fields():
|
| 80 |
-
"""입력 필드를 초기화합니다."""
|
| 81 |
-
st.session_state.input_text_anjoo = ""
|
| 82 |
-
st.session_state.input_text_liquor = ""
|
| 83 |
-
st.session_state.situation = ""
|
| 84 |
-
|
| 85 |
# Streamlit Interface
|
| 86 |
st.set_page_config(
|
| 87 |
page_title="주류 페어링 마스터",
|
|
@@ -139,7 +132,6 @@ if generate_button:
|
|
| 139 |
for partial_output in generate_pairing_recommendation(input_text, input_type, situation):
|
| 140 |
output_text = partial_output
|
| 141 |
output_area.markdown(output_text)
|
| 142 |
-
clear_input_fields() # 입력 필드 초기화
|
| 143 |
except Exception as e:
|
| 144 |
st.error(f"오류가 발생했습니다: {str(e)}")
|
| 145 |
else:
|
|
@@ -147,7 +139,9 @@ if generate_button:
|
|
| 147 |
|
| 148 |
# 입력 초기화 기능
|
| 149 |
if clear_button:
|
| 150 |
-
|
|
|
|
|
|
|
| 151 |
|
| 152 |
# 추가 정보 및 FAQ
|
| 153 |
add_vertical_space(2)
|
|
|
|
| 75 |
yield collected_text
|
| 76 |
time.sleep(0.03)
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
# Streamlit Interface
|
| 79 |
st.set_page_config(
|
| 80 |
page_title="주류 페어링 마스터",
|
|
|
|
| 132 |
for partial_output in generate_pairing_recommendation(input_text, input_type, situation):
|
| 133 |
output_text = partial_output
|
| 134 |
output_area.markdown(output_text)
|
|
|
|
| 135 |
except Exception as e:
|
| 136 |
st.error(f"오류가 발생했습니다: {str(e)}")
|
| 137 |
else:
|
|
|
|
| 139 |
|
| 140 |
# 입력 초기화 기능
|
| 141 |
if clear_button:
|
| 142 |
+
st.session_state.input_text_anjoo = ""
|
| 143 |
+
st.session_state.input_text_liquor = ""
|
| 144 |
+
st.session_state.situation = ""
|
| 145 |
|
| 146 |
# 추가 정보 및 FAQ
|
| 147 |
add_vertical_space(2)
|