Spaces:
ll7098ll
/
Paused

ll7098ll commited on
Commit
7bdc14e
·
verified ·
1 Parent(s): d83f187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -3
app.py CHANGED
@@ -6,6 +6,8 @@ from streamlit_extras.colored_header import colored_header
6
  from streamlit_extras.add_vertical_space import add_vertical_space
7
  import markdown
8
  from streamlit_extras.stoggle import stoggle # 추가된 라이브러리
 
 
9
 
10
  # Google Gemini API Key 설정
11
  genai.configure(api_key=os.environ["GEMINI_API_KEY"])
@@ -82,15 +84,23 @@ colored_header(
82
  add_vertical_space(1)
83
 
84
  # 사용자 입력 영역
 
 
 
 
 
 
 
 
85
  tabs = st.tabs(["🍝 안주 입력", "🍇 주류 입력"])
86
 
87
  with tabs[0]:
88
  st.markdown("#### 안주를 입력해 주세요:")
89
- input_text_anjoo = st.text_area("예: 치킨, 육회, 치즈 플래터 등", height=50)
90
 
91
  with tabs[1]:
92
  st.markdown("#### 주류를 입력해 주세요:")
93
- input_text_liquor = st.text_area("예: 맥주, 와인, 소주 등", height=50)
94
 
95
  input_type = "안주" if input_text_anjoo else "주류"
96
  input_text = input_text_anjoo if input_text_anjoo else input_text_liquor
@@ -99,7 +109,9 @@ input_text = input_text_anjoo if input_text_anjoo else input_text_liquor
99
  st.markdown("#### 상황이나 분위기를 입력해 주세요:")
100
  situation = st.text_area("예: 친구들과의 모임, 로맨틱한 데이트, 가족과의 저녁 식사 등", height=100)
101
 
102
- generate_button = st.button("🍻 페어링 추천 받기")
 
 
103
 
104
  # 출력 영역 정의
105
  output_area = st.empty()
@@ -122,3 +134,12 @@ stoggle(
122
  "📜 주류 페어링 FAQ",
123
  "이 앱은 안주와 주류에 대한 전문적인 페어링 정보를 제공합니다. 한국인의 입맛에 맞춘 추천을 통해 최고의 안주와 주류 조합을 즐기세요!\n\n\n**Q: 모든 안주와 주류를 추천받을 수 있나요?**\n\nA: 예, 다양한 안주와 주류에 대해 추천받을 수 있으며, 지속적으로 업데이트됩니다.",
124
  )
 
 
 
 
 
 
 
 
 
 
6
  from streamlit_extras.add_vertical_space import add_vertical_space
7
  import markdown
8
  from streamlit_extras.stoggle import stoggle # 추가된 라이브러리
9
+ from streamlit_extras.animated_button import animated_button # 추가된 라이브러리
10
+ from streamlit_extras.card import card # 추가된 라이브러리
11
 
12
  # Google Gemini API Key 설정
13
  genai.configure(api_key=os.environ["GEMINI_API_KEY"])
 
84
  add_vertical_space(1)
85
 
86
  # 사용자 입력 영역
87
+ card(
88
+ title="안주 또는 주류 입력",
89
+ content="안주 또는 주류를 입력하고, 상황이나 분위기를 선택하여 최적의 페어링을 추천받아보세요.",
90
+ background_color="#f0f2f6"
91
+ )
92
+
93
+ add_vertical_space(1)
94
+
95
  tabs = st.tabs(["🍝 안주 입력", "🍇 주류 입력"])
96
 
97
  with tabs[0]:
98
  st.markdown("#### 안주를 입력해 주세요:")
99
+ input_text_anjoo = st.text_input("예: 치킨, 육회, 치즈 플래터 등")
100
 
101
  with tabs[1]:
102
  st.markdown("#### 주류를 입력해 주세요:")
103
+ input_text_liquor = st.text_input("예: 맥주, 와인, 소주 등")
104
 
105
  input_type = "안주" if input_text_anjoo else "주류"
106
  input_text = input_text_anjoo if input_text_anjoo else input_text_liquor
 
109
  st.markdown("#### 상황이나 분위기를 입력해 주세요:")
110
  situation = st.text_area("예: 친구들과의 모임, 로맨틱한 데이트, 가족과의 저녁 식사 등", height=100)
111
 
112
+ add_vertical_space(1)
113
+
114
+ generate_button = animated_button("🍻 페어링 추천 받기")
115
 
116
  # 출력 영역 정의
117
  output_area = st.empty()
 
134
  "📜 주류 페어링 FAQ",
135
  "이 앱은 안주와 주류에 대한 전문적인 페어링 정보를 제공합니다. 한국인의 입맛에 맞춘 추천을 통해 최고의 안주와 주류 조합을 즐기세요!\n\n\n**Q: 모든 안주와 주류를 추천받을 수 있나요?**\n\nA: 예, 다양한 안주와 주류에 대해 추천받을 수 있으며, 지속적으로 업데이트됩니다.",
136
  )
137
+
138
+ add_vertical_space(2)
139
+
140
+ # 하단부 정보 카드 추가
141
+ card(
142
+ title="🍷 주류 페어링 도우미 정보",
143
+ content="이 도우미는 사용자가 입력한 안주와 주류를 분석하여 최적의 페어링 정보를 제공합니다. 다양한 상황을 고려하여 최적의 맛 경험을 제공하는 것이 목표입니다.",
144
+ background_color="#e0f7fa"
145
+ )