ssboost commited on
Commit
129efde
ยท
verified ยท
1 Parent(s): 172b3ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +84 -24
app.py CHANGED
@@ -140,7 +140,7 @@ class KyungAhNeChatbot:
140
  try:
141
  chatbot = KyungAhNeChatbot()
142
 
143
- # ์‹ฌํ”Œํ•œ ๊ทธ๋ผ๋””์˜ค ์ธํ„ฐํŽ˜์ด์Šค
144
  demo = gr.ChatInterface(
145
  fn=chatbot.chat_stream,
146
  title="๐Ÿฅข ๊ฒฝ์•„๋„ค AI ์ƒ๋‹ด๋ด‡",
@@ -151,50 +151,110 @@ try:
151
  "๋ฐฐ์†ก๋น„๊ฐ€ ์–ผ๋งˆ์ธ๊ฐ€์š”?",
152
  "ํ™˜๋ถˆ ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค์ฃผ์„ธ์š”"
153
  ],
 
154
  css="""
 
155
  .gradio-container {
 
156
  max-width: 800px !important;
157
- margin: auto !important;
158
- font-family: 'Noto Sans KR', sans-serif;
159
  }
160
 
161
- .chatbot {
162
- border-radius: 15px;
163
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
 
 
 
 
 
 
 
 
 
 
 
164
  border: none !important;
 
165
  }
166
 
 
 
 
 
 
 
 
 
 
167
  button {
168
- border-radius: 8px;
169
- font-weight: 500;
 
 
 
 
170
  }
171
 
172
- /* Chatbot ํƒญ ์ˆจ๊ธฐ๊ธฐ */
173
- .tab-nav {
174
- display: none !important;
175
  }
176
 
177
- div[role="tablist"] {
178
- display: none !important;
 
 
 
 
 
 
179
  }
180
 
181
- .tabs > div:first-child {
182
- display: none !important;
 
 
183
  }
184
 
185
- /* ๋ชจ๋“  ํ…Œ๋‘๋ฆฌ ์ œ๊ฑฐ */
186
- .chatbot, .chatbot > div {
187
- border: none !important;
 
 
 
188
  }
189
 
190
- /* ์ „์ฒด ์ปจํ…Œ์ด๋„ˆ ํ…Œ๋‘๋ฆฌ๋„ ์ œ๊ฑฐ */
191
- .contain {
192
- border: none !important;
 
 
 
193
  }
194
 
195
- /* ์ž…๋ ฅ์ฐฝ ํ…Œ๋‘๋ฆฌ๋„ ์ œ๊ฑฐํ•˜๋ ค๋ฉด */
196
- textarea, input {
197
- border: 1px solid #e0e0e0 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  }
199
  """
200
  )
 
140
  try:
141
  chatbot = KyungAhNeChatbot()
142
 
143
+ # ์‹ฌํ”Œํ•˜๊ณ  ๊น”๋”ํ•œ ๊ทธ๋ผ๋””์˜ค ์ธํ„ฐํŽ˜์ด์Šค
144
  demo = gr.ChatInterface(
145
  fn=chatbot.chat_stream,
146
  title="๐Ÿฅข ๊ฒฝ์•„๋„ค AI ์ƒ๋‹ด๋ด‡",
 
151
  "๋ฐฐ์†ก๋น„๊ฐ€ ์–ผ๋งˆ์ธ๊ฐ€์š”?",
152
  "ํ™˜๋ถˆ ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค์ฃผ์„ธ์š”"
153
  ],
154
+ theme=gr.themes.Default(),
155
  css="""
156
+ /* ์ „์ฒด ๋ฐฐ๊ฒฝ ํฐ์ƒ‰ */
157
  .gradio-container {
158
+ background-color: #ffffff !important;
159
  max-width: 800px !important;
160
+ margin: 0 auto !important;
161
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
162
  }
163
 
164
+ /* ๋ชจ๋“  ํ…Œ๋‘๋ฆฌ ์ œ๊ฑฐ */
165
+ .chatbot, .chatbot > div, .contain, .block {
166
+ border: none !important;
167
+ box-shadow: none !important;
168
+ background-color: #ffffff !important;
169
+ }
170
+
171
+ /* Chatbot ํƒญ ์™„์ „ํžˆ ์ˆจ๊ธฐ๊ธฐ */
172
+ .tab-nav, div[role="tablist"], .tabs > div:first-child {
173
+ display: none !important;
174
+ }
175
+
176
+ /* ์ฑ„ํŒ… ๋ฉ”์‹œ์ง€ ์Šคํƒ€์ผ๋ง */
177
+ .message {
178
  border: none !important;
179
+ margin: 10px 0 !important;
180
  }
181
 
182
+ /* ์ž…๋ ฅ์ฐฝ์„ ํƒ€์›ํ˜•์œผ๋กœ */
183
+ .input-container, textarea {
184
+ border-radius: 25px !important;
185
+ border: 1px solid #e0e0e0 !important;
186
+ background-color: #f8f9fa !important;
187
+ padding: 12px 20px !important;
188
+ }
189
+
190
+ /* ์ „์†ก ๋ฒ„ํŠผ ๋‘ฅ๊ธ€๊ฒŒ */
191
  button {
192
+ border-radius: 20px !important;
193
+ border: none !important;
194
+ background-color: #007bff !important;
195
+ color: white !important;
196
+ font-weight: 500 !important;
197
+ padding: 8px 16px !important;
198
  }
199
 
200
+ button:hover {
201
+ background-color: #0056b3 !important;
 
202
  }
203
 
204
+ /* ์˜ˆ์‹œ ๋ฒ„ํŠผ๋“ค ํƒ€์›ํ˜•์œผ๋กœ */
205
+ .examples button {
206
+ border-radius: 20px !important;
207
+ background-color: #f8f9fa !important;
208
+ border: 1px solid #e9ecef !important;
209
+ color: #333 !important;
210
+ margin: 5px !important;
211
+ padding: 8px 16px !important;
212
  }
213
 
214
+ .examples button:hover {
215
+ background-color: #007bff !important;
216
+ color: white !important;
217
+ border-color: #007bff !important;
218
  }
219
 
220
+ /* ํƒ€์ดํ‹€ ์Šคํƒ€์ผ */
221
+ h1 {
222
+ color: #333 !important;
223
+ font-size: 28px !important;
224
+ text-align: center !important;
225
+ margin-bottom: 10px !important;
226
  }
227
 
228
+ /* ์„ค๋ช… ํ…์ŠคํŠธ */
229
+ .description {
230
+ color: #666 !important;
231
+ text-align: center !important;
232
+ font-size: 14px !important;
233
+ margin-bottom: 20px !important;
234
  }
235
 
236
+ /* ์—ฌ๋ฐฑ ์กฐ์ • */
237
+ .block {
238
+ padding: 10px !important;
239
+ }
240
+
241
+ /* ์Šคํฌ๋กค๋ฐ” ๊น”๋”ํ•˜๊ฒŒ */
242
+ ::-webkit-scrollbar {
243
+ width: 6px;
244
+ }
245
+
246
+ ::-webkit-scrollbar-track {
247
+ background: #f1f1f1;
248
+ border-radius: 10px;
249
+ }
250
+
251
+ ::-webkit-scrollbar-thumb {
252
+ background: #c1c1c1;
253
+ border-radius: 10px;
254
+ }
255
+
256
+ ::-webkit-scrollbar-thumb:hover {
257
+ background: #a8a8a8;
258
  }
259
  """
260
  )