cutechicken commited on
Commit
a7a5221
โ€ข
1 Parent(s): c63d3c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +92 -0
app.py CHANGED
@@ -95,6 +95,98 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
95
 
96
  chatbot = gr.Chatbot(height=500)
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  with gr.Blocks(css=CSS) as demo:
99
  gr.HTML(TITLE)
100
  gr.HTML(DESCRIPTION)
 
95
 
96
  chatbot = gr.Chatbot(height=500)
97
 
98
+ CSS = """
99
+ /* ์ „์ฒด ํŽ˜์ด์ง€ ์Šคํƒ€์ผ๋ง */
100
+ body {
101
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
102
+ min-height: 100vh;
103
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
104
+ }
105
+
106
+ /* ๋ฉ”์ธ ์ปจํ…Œ์ด๋„ˆ */
107
+ .container {
108
+ max-width: 1200px;
109
+ margin: 0 auto;
110
+ padding: 2rem;
111
+ background: rgba(255, 255, 255, 0.95);
112
+ border-radius: 20px;
113
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
114
+ backdrop-filter: blur(10px);
115
+ transform: perspective(1000px) translateZ(0);
116
+ transition: all 0.3s ease;
117
+ }
118
+
119
+ /* ์ œ๋ชฉ ์Šคํƒ€์ผ๋ง */
120
+ h1 {
121
+ color: #2d3436;
122
+ font-size: 2.5rem;
123
+ text-align: center;
124
+ margin-bottom: 2rem;
125
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
126
+ transform: perspective(1000px) translateZ(20px);
127
+ }
128
+
129
+ h3 {
130
+ text-align: center;
131
+ color: #2d3436;
132
+ font-size: 1.5rem;
133
+ margin: 1rem 0;
134
+ }
135
+
136
+ /* ์ฑ„ํŒ…๋ฐ•์Šค ์Šคํƒ€์ผ๋ง */
137
+ .chatbox {
138
+ background: white;
139
+ border-radius: 15px;
140
+ box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
141
+ backdrop-filter: blur(4px);
142
+ border: 1px solid rgba(255, 255, 255, 0.18);
143
+ padding: 1rem;
144
+ margin: 1rem 0;
145
+ transform: translateZ(0);
146
+ transition: all 0.3s ease;
147
+ }
148
+
149
+ /* ๋ฉ”์‹œ์ง€ ์Šคํƒ€์ผ๋ง */
150
+ .chatbox .messages .message.user {
151
+ background: linear-gradient(145deg, #e1f5fe, #bbdefb);
152
+ border-radius: 15px;
153
+ padding: 1rem;
154
+ margin: 0.5rem;
155
+ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
156
+ transform: translateZ(10px);
157
+ animation: messageIn 0.3s ease-out;
158
+ }
159
+
160
+ .chatbox .messages .message.bot {
161
+ background: linear-gradient(145deg, #f5f5f5, #eeeeee);
162
+ border-radius: 15px;
163
+ padding: 1rem;
164
+ margin: 0.5rem;
165
+ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
166
+ transform: translateZ(10px);
167
+ animation: messageIn 0.3s ease-out;
168
+ }
169
+
170
+ /* ๋ฒ„ํŠผ ์Šคํƒ€์ผ๋ง */
171
+ .duplicate-button {
172
+ background: linear-gradient(145deg, #24292e, #1a1e22) !important;
173
+ color: white !important;
174
+ border-radius: 100vh !important;
175
+ padding: 0.8rem 1.5rem !important;
176
+ box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2) !important;
177
+ transition: all 0.3s ease !important;
178
+ border: none !important;
179
+ cursor: pointer !important;
180
+ }
181
+
182
+ .duplicate-button:hover {
183
+ transform: translateY(-2px) !important;
184
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
185
+ }
186
+
187
+ /* ์ž…๋ ฅ ํ•„๋“œ ์Šคํƒ€์ผ๋ง */
188
+ """
189
+
190
  with gr.Blocks(css=CSS) as demo:
191
  gr.HTML(TITLE)
192
  gr.HTML(DESCRIPTION)