Bhaddy392 commited on
Commit
c0ac905
Β·
verified Β·
1 Parent(s): a6cfbb7

Delete thinking_btn.py

Browse files
Files changed (1) hide show
  1. thinking_btn.py +0 -243
thinking_btn.py DELETED
@@ -1,243 +0,0 @@
1
- CUSTOM_CSS = """
2
- @import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Share+Tech+Mono&display=swap');
3
-
4
- *, *::before, *::after { box-sizing: border-box; }
5
-
6
- body, .gradio-container {
7
- background: #0a0a0a !important;
8
- font-family: 'Rajdhani', sans-serif !important;
9
- color: #e8e0d0 !important;
10
- }
11
-
12
- .braingpt-header {
13
- display: flex;
14
- align-items: center;
15
- gap: 18px;
16
- padding: 18px 24px 10px 24px;
17
- border-bottom: 1px solid #2a1a00;
18
- background: linear-gradient(180deg, #110900 0%, #0a0a0a 100%);
19
- margin-bottom: 8px;
20
- }
21
-
22
- .braingpt-header img {
23
- width: 64px;
24
- height: 64px;
25
- border-radius: 12px;
26
- box-shadow: 0 0 24px #ff6a0055, 0 0 8px #ff4400aa;
27
- }
28
-
29
- .braingpt-title {
30
- font-family: 'Rajdhani', sans-serif;
31
- font-size: 2rem;
32
- font-weight: 700;
33
- letter-spacing: 3px;
34
- background: linear-gradient(90deg, #ff6a00, #ffb347, #ff6a00);
35
- background-size: 200%;
36
- -webkit-background-clip: text;
37
- -webkit-text-fill-color: transparent;
38
- background-clip: text;
39
- animation: shimmer 3s linear infinite;
40
- text-transform: uppercase;
41
- }
42
-
43
- .braingpt-sub {
44
- font-family: 'Share Tech Mono', monospace;
45
- font-size: 0.72rem;
46
- color: #664422;
47
- letter-spacing: 2px;
48
- margin-top: 2px;
49
- }
50
-
51
- @keyframes shimmer {
52
- 0% { background-position: 0% }
53
- 100% { background-position: 200% }
54
- }
55
-
56
- .chatbot {
57
- background: #0d0d0d !important;
58
- border: 1px solid #1f1208 !important;
59
- border-radius: 12px !important;
60
- font-family: 'Rajdhani', sans-serif !important;
61
- font-size: 1.05rem !important;
62
- }
63
-
64
- .message.user {
65
- background: linear-gradient(135deg, #1a0d00, #2a1500) !important;
66
- border: 1px solid #3d1f00 !important;
67
- border-radius: 12px 12px 2px 12px !important;
68
- color: #ffcc88 !important;
69
- font-weight: 600 !important;
70
- }
71
-
72
- .message.bot {
73
- background: linear-gradient(135deg, #0f0f0f, #161208) !important;
74
- border: 1px solid #2b1f00 !important;
75
- border-radius: 12px 12px 12px 2px !important;
76
- color: #e8d8b8 !important;
77
- }
78
-
79
- .thinking-bar {
80
- display: none;
81
- align-items: center;
82
- gap: 10px;
83
- padding: 8px 16px;
84
- margin: 4px 0 8px 0;
85
- background: linear-gradient(90deg, #1a0d00, #0d0d0d);
86
- border-left: 3px solid #ff6a00;
87
- border-radius: 0 8px 8px 0;
88
- font-family: 'Share Tech Mono', monospace;
89
- font-size: 0.8rem;
90
- color: #ff8c33;
91
- letter-spacing: 1px;
92
- animation: pulse-bar 1.5s ease-in-out infinite;
93
- }
94
-
95
- .thinking-bar.active {
96
- display: flex;
97
- }
98
-
99
- .thinking-dots span {
100
- display: inline-block;
101
- width: 6px;
102
- height: 6px;
103
- background: #ff6a00;
104
- border-radius: 50%;
105
- margin: 0 2px;
106
- animation: bounce-dot 1.2s infinite;
107
- }
108
- .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
109
- .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
110
-
111
- @keyframes bounce-dot {
112
- 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
113
- 40% { transform: translateY(-6px); opacity: 1; }
114
- }
115
-
116
- @keyframes pulse-bar {
117
- 0%, 100% { border-left-color: #ff6a00; }
118
- 50% { border-left-color: #ffb347; }
119
- }
120
-
121
- .input-row {
122
- display: flex;
123
- gap: 8px;
124
- padding: 10px 0 4px 0;
125
- align-items: flex-end;
126
- }
127
-
128
- #msg-input textarea {
129
- background: #111 !important;
130
- border: 1px solid #2b1800 !important;
131
- border-radius: 10px !important;
132
- color: #ffcc88 !important;
133
- font-family: 'Rajdhani', sans-serif !important;
134
- font-size: 1rem !important;
135
- caret-color: #ff6a00 !important;
136
- resize: none !important;
137
- padding: 12px 14px !important;
138
- transition: border-color 0.2s;
139
- }
140
-
141
- #msg-input textarea:focus {
142
- border-color: #ff6a00 !important;
143
- box-shadow: 0 0 12px #ff6a0033 !important;
144
- outline: none !important;
145
- }
146
-
147
- #send-btn, #clear-btn {
148
- font-family: 'Rajdhani', sans-serif !important;
149
- font-weight: 700 !important;
150
- letter-spacing: 1.5px !important;
151
- border-radius: 10px !important;
152
- border: none !important;
153
- cursor: pointer !important;
154
- transition: all 0.18s ease !important;
155
- text-transform: uppercase !important;
156
- font-size: 0.9rem !important;
157
- padding: 12px 22px !important;
158
- }
159
-
160
- #send-btn {
161
- background: linear-gradient(135deg, #ff6a00, #cc4400) !important;
162
- color: #fff !important;
163
- box-shadow: 0 0 16px #ff6a0044 !important;
164
- min-width: 110px !important;
165
- }
166
-
167
- #send-btn:hover {
168
- background: linear-gradient(135deg, #ff8c33, #ff5500) !important;
169
- box-shadow: 0 0 28px #ff6a0077 !important;
170
- transform: translateY(-1px) !important;
171
- }
172
-
173
- #send-btn.thinking {
174
- background: linear-gradient(135deg, #2a1500, #1a0d00) !important;
175
- color: #ff8c33 !important;
176
- box-shadow: 0 0 12px #ff6a0033 !important;
177
- pointer-events: none !important;
178
- }
179
-
180
- #clear-btn {
181
- background: #161208 !important;
182
- color: #664422 !important;
183
- border: 1px solid #2b1800 !important;
184
- }
185
-
186
- #clear-btn:hover {
187
- background: #1f1208 !important;
188
- color: #ff8c33 !important;
189
- border-color: #ff6a00 !important;
190
- }
191
-
192
- .examples-table td {
193
- background: #111 !important;
194
- border: 1px solid #1f1200 !important;
195
- color: #cc7733 !important;
196
- font-family: 'Rajdhani', sans-serif !important;
197
- border-radius: 6px !important;
198
- cursor: pointer !important;
199
- transition: background 0.15s, color 0.15s !important;
200
- }
201
-
202
- .examples-table td:hover {
203
- background: #1f1000 !important;
204
- color: #ff8c33 !important;
205
- border-color: #ff6a00 !important;
206
- }
207
-
208
- ::-webkit-scrollbar { width: 5px; }
209
- ::-webkit-scrollbar-track { background: #0a0a0a; }
210
- ::-webkit-scrollbar-thumb { background: #2b1800; border-radius: 4px; }
211
- ::-webkit-scrollbar-thumb:hover { background: #ff6a00; }
212
- """
213
-
214
- THINKING_JS = """
215
- () => {
216
- function setupThinking() {
217
- const sendBtn = document.getElementById('send-btn');
218
- const thinkingBar = document.getElementById('thinking-bar');
219
- if (!sendBtn || !thinkingBar) return;
220
-
221
- const observer = new MutationObserver(() => {
222
- const isLoading = document.querySelector('.generating') !== null
223
- || document.querySelector('.eta-bar') !== null;
224
-
225
- if (isLoading) {
226
- sendBtn.classList.add('thinking');
227
- const span = sendBtn.querySelector('span');
228
- if (span) span.innerText = 'Thinking...';
229
- thinkingBar.classList.add('active');
230
- } else {
231
- sendBtn.classList.remove('thinking');
232
- const span = sendBtn.querySelector('span');
233
- if (span) span.innerText = 'Enviar';
234
- thinkingBar.classList.remove('active');
235
- }
236
- });
237
-
238
- observer.observe(document.body, { childList: true, subtree: true });
239
- }
240
-
241
- setTimeout(setupThinking, 1500);
242
- }
243
- """