Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,38 +39,44 @@ with gr.Blocks(css="""
|
|
39 |
}
|
40 |
|
41 |
h1 {
|
42 |
-
font-size:
|
43 |
color: #00f7ff;
|
44 |
text-align: center;
|
45 |
-
margin-top:
|
46 |
text-transform: uppercase;
|
47 |
-
letter-spacing:
|
|
|
48 |
}
|
49 |
|
50 |
.chat-wrapper {
|
51 |
background-color: #1a1a1a;
|
52 |
-
border-radius:
|
53 |
-
padding:
|
54 |
-
max-width:
|
55 |
margin: auto;
|
56 |
-
box-shadow: 0
|
57 |
-
height:
|
58 |
display: flex;
|
59 |
flex-direction: column;
|
60 |
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
.chat-container {
|
64 |
overflow-y: auto;
|
65 |
flex-grow: 1;
|
66 |
-
padding-right:
|
67 |
-
margin-bottom:
|
68 |
scrollbar-width: thin;
|
69 |
scrollbar-color: #444 #1a1a1a;
|
70 |
}
|
71 |
|
72 |
.chat-container::-webkit-scrollbar {
|
73 |
-
width:
|
74 |
}
|
75 |
|
76 |
.chat-container::-webkit-scrollbar-thumb {
|
@@ -80,8 +86,8 @@ with gr.Blocks(css="""
|
|
80 |
|
81 |
.message {
|
82 |
display: flex;
|
83 |
-
margin-bottom:
|
84 |
-
animation: slideIn 0.
|
85 |
}
|
86 |
|
87 |
.user {
|
@@ -94,30 +100,32 @@ with gr.Blocks(css="""
|
|
94 |
|
95 |
.bubble {
|
96 |
max-width: 75%;
|
97 |
-
padding:
|
98 |
-
border-radius:
|
99 |
font-size: 1.1rem;
|
100 |
line-height: 1.6;
|
101 |
word-break: break-word;
|
102 |
white-space: pre-wrap;
|
103 |
position: relative;
|
104 |
-
box-shadow: 0
|
105 |
-
transition:
|
106 |
}
|
107 |
|
108 |
.user-bubble {
|
109 |
background-color: #00796B;
|
110 |
color: white;
|
111 |
border-bottom-right-radius: 0;
|
|
|
112 |
}
|
113 |
|
114 |
.bot-bubble {
|
115 |
background-color: #2F3136;
|
116 |
color: white;
|
117 |
border-bottom-left-radius: 0;
|
|
|
118 |
}
|
119 |
|
120 |
-
.bot-bubble
|
121 |
content: '';
|
122 |
position: absolute;
|
123 |
left: -8px;
|
@@ -126,7 +134,7 @@ with gr.Blocks(css="""
|
|
126 |
border-right-color: #2F3136;
|
127 |
}
|
128 |
|
129 |
-
.user-bubble
|
130 |
content: '';
|
131 |
position: absolute;
|
132 |
right: -8px;
|
@@ -136,7 +144,7 @@ with gr.Blocks(css="""
|
|
136 |
}
|
137 |
|
138 |
.bubble:hover {
|
139 |
-
transform: scale(1.05);
|
140 |
}
|
141 |
|
142 |
textarea, input[type="text"] {
|
@@ -144,16 +152,15 @@ with gr.Blocks(css="""
|
|
144 |
color: white;
|
145 |
border: 1px solid #555;
|
146 |
border-radius: 14px;
|
147 |
-
padding:
|
148 |
font-size: 1rem;
|
149 |
width: 100%;
|
150 |
-
margin-top: 10px;
|
151 |
}
|
152 |
|
153 |
textarea:focus, input[type="text"]:focus {
|
154 |
outline: none;
|
155 |
border-color: #00f7ff;
|
156 |
-
box-shadow: 0 0
|
157 |
}
|
158 |
|
159 |
button {
|
@@ -162,42 +169,39 @@ with gr.Blocks(css="""
|
|
162 |
font-weight: bold;
|
163 |
border: none;
|
164 |
border-radius: 14px;
|
165 |
-
padding: 14px
|
166 |
-
font-size: 1.
|
167 |
-
margin-top:
|
168 |
-
transition:
|
169 |
}
|
170 |
|
171 |
button:hover {
|
172 |
background-color: #00a67e;
|
173 |
-
transform: scale(1.05);
|
174 |
}
|
175 |
|
176 |
.gradio-button {
|
177 |
background-color: #00C896;
|
178 |
color: white;
|
179 |
-
padding:
|
180 |
border-radius: 14px;
|
181 |
-
font-size: 1rem;
|
182 |
-
transition:
|
183 |
}
|
184 |
|
185 |
.gradio-button:hover {
|
186 |
background-color: #00a67e;
|
187 |
-
transform: scale(1.05);
|
188 |
}
|
189 |
|
190 |
-
@
|
191 |
-
|
192 |
-
|
193 |
-
}
|
194 |
-
h1 {
|
195 |
-
font-size: 2rem;
|
196 |
-
}
|
197 |
}
|
198 |
|
199 |
@keyframes slideIn {
|
200 |
-
0% { transform: translateY(
|
201 |
100% { transform: translateY(0); opacity: 1; }
|
202 |
}
|
203 |
""") as demo:
|
|
|
39 |
}
|
40 |
|
41 |
h1 {
|
42 |
+
font-size: 3rem;
|
43 |
color: #00f7ff;
|
44 |
text-align: center;
|
45 |
+
margin-top: 40px;
|
46 |
text-transform: uppercase;
|
47 |
+
letter-spacing: 3px;
|
48 |
+
animation: glowingText 1.5s infinite alternate;
|
49 |
}
|
50 |
|
51 |
.chat-wrapper {
|
52 |
background-color: #1a1a1a;
|
53 |
+
border-radius: 25px;
|
54 |
+
padding: 50px;
|
55 |
+
max-width: 850px;
|
56 |
margin: auto;
|
57 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
58 |
+
height: 75vh;
|
59 |
display: flex;
|
60 |
flex-direction: column;
|
61 |
justify-content: space-between;
|
62 |
+
transition: box-shadow 0.3s ease;
|
63 |
+
}
|
64 |
+
|
65 |
+
.chat-wrapper:hover {
|
66 |
+
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
|
67 |
}
|
68 |
|
69 |
.chat-container {
|
70 |
overflow-y: auto;
|
71 |
flex-grow: 1;
|
72 |
+
padding-right: 10px;
|
73 |
+
margin-bottom: 20px;
|
74 |
scrollbar-width: thin;
|
75 |
scrollbar-color: #444 #1a1a1a;
|
76 |
}
|
77 |
|
78 |
.chat-container::-webkit-scrollbar {
|
79 |
+
width: 6px;
|
80 |
}
|
81 |
|
82 |
.chat-container::-webkit-scrollbar-thumb {
|
|
|
86 |
|
87 |
.message {
|
88 |
display: flex;
|
89 |
+
margin-bottom: 18px;
|
90 |
+
animation: slideIn 0.5s ease-out;
|
91 |
}
|
92 |
|
93 |
.user {
|
|
|
100 |
|
101 |
.bubble {
|
102 |
max-width: 75%;
|
103 |
+
padding: 14px 18px;
|
104 |
+
border-radius: 18px;
|
105 |
font-size: 1.1rem;
|
106 |
line-height: 1.6;
|
107 |
word-break: break-word;
|
108 |
white-space: pre-wrap;
|
109 |
position: relative;
|
110 |
+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
|
111 |
+
transition: transform 0.2s ease, background-color 0.3s ease;
|
112 |
}
|
113 |
|
114 |
.user-bubble {
|
115 |
background-color: #00796B;
|
116 |
color: white;
|
117 |
border-bottom-right-radius: 0;
|
118 |
+
transform-origin: right center;
|
119 |
}
|
120 |
|
121 |
.bot-bubble {
|
122 |
background-color: #2F3136;
|
123 |
color: white;
|
124 |
border-bottom-left-radius: 0;
|
125 |
+
transform-origin: left center;
|
126 |
}
|
127 |
|
128 |
+
.bot-bubble:after {
|
129 |
content: '';
|
130 |
position: absolute;
|
131 |
left: -8px;
|
|
|
134 |
border-right-color: #2F3136;
|
135 |
}
|
136 |
|
137 |
+
.user-bubble:after {
|
138 |
content: '';
|
139 |
position: absolute;
|
140 |
right: -8px;
|
|
|
144 |
}
|
145 |
|
146 |
.bubble:hover {
|
147 |
+
transform: scale(1.05) rotate(1deg);
|
148 |
}
|
149 |
|
150 |
textarea, input[type="text"] {
|
|
|
152 |
color: white;
|
153 |
border: 1px solid #555;
|
154 |
border-radius: 14px;
|
155 |
+
padding: 14px 16px;
|
156 |
font-size: 1rem;
|
157 |
width: 100%;
|
|
|
158 |
}
|
159 |
|
160 |
textarea:focus, input[type="text"]:focus {
|
161 |
outline: none;
|
162 |
border-color: #00f7ff;
|
163 |
+
box-shadow: 0 0 8px #00f7ff55;
|
164 |
}
|
165 |
|
166 |
button {
|
|
|
169 |
font-weight: bold;
|
170 |
border: none;
|
171 |
border-radius: 14px;
|
172 |
+
padding: 14px 22px;
|
173 |
+
font-size: 1.2rem;
|
174 |
+
margin-top: 12px;
|
175 |
+
transition: background-color 0.3s ease, transform 0.2s ease;
|
176 |
}
|
177 |
|
178 |
button:hover {
|
179 |
background-color: #00a67e;
|
180 |
+
transform: scale(1.05) rotate(2deg);
|
181 |
}
|
182 |
|
183 |
.gradio-button {
|
184 |
background-color: #00C896;
|
185 |
color: white;
|
186 |
+
padding: 14px 20px;
|
187 |
border-radius: 14px;
|
188 |
+
font-size: 1.1rem;
|
189 |
+
transition: background-color 0.3s ease, transform 0.2s ease;
|
190 |
}
|
191 |
|
192 |
.gradio-button:hover {
|
193 |
background-color: #00a67e;
|
194 |
+
transform: scale(1.05) rotate(2deg);
|
195 |
}
|
196 |
|
197 |
+
@keyframes glowingText {
|
198 |
+
0% { text-shadow: 0 0 10px #00f7ff, 0 0 20px #00f7ff, 0 0 30px #00f7ff; }
|
199 |
+
50% { text-shadow: 0 0 20px #00f7ff, 0 0 40px #00f7ff, 0 0 60px #00f7ff; }
|
200 |
+
100% { text-shadow: 0 0 10px #00f7ff, 0 0 20px #00f7ff, 0 0 30px #00f7ff; }
|
|
|
|
|
|
|
201 |
}
|
202 |
|
203 |
@keyframes slideIn {
|
204 |
+
0% { transform: translateY(10px); opacity: 0; }
|
205 |
100% { transform: translateY(0); opacity: 1; }
|
206 |
}
|
207 |
""") as demo:
|