File size: 49,069 Bytes
911417c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting ollama\n",
      "  Using cached ollama-0.4.7-py3-none-any.whl.metadata (4.7 kB)\n",
      "Collecting httpx<0.29,>=0.27 (from ollama)\n",
      "  Using cached httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB)\n",
      "Collecting pydantic<3.0.0,>=2.9.0 (from ollama)\n",
      "  Using cached pydantic-2.10.6-py3-none-any.whl.metadata (30 kB)\n",
      "Collecting anyio (from httpx<0.29,>=0.27->ollama)\n",
      "  Using cached anyio-4.9.0-py3-none-any.whl.metadata (4.7 kB)\n",
      "Requirement already satisfied: certifi in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from httpx<0.29,>=0.27->ollama) (2025.1.31)\n",
      "Collecting httpcore==1.* (from httpx<0.29,>=0.27->ollama)\n",
      "  Using cached httpcore-1.0.7-py3-none-any.whl.metadata (21 kB)\n",
      "Requirement already satisfied: idna in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from httpx<0.29,>=0.27->ollama) (3.10)\n",
      "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<0.29,>=0.27->ollama)\n",
      "  Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)\n",
      "Collecting annotated-types>=0.6.0 (from pydantic<3.0.0,>=2.9.0->ollama)\n",
      "  Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)\n",
      "Collecting pydantic-core==2.27.2 (from pydantic<3.0.0,>=2.9.0->ollama)\n",
      "  Downloading pydantic_core-2.27.2-cp39-cp39-win_amd64.whl.metadata (6.7 kB)\n",
      "Requirement already satisfied: typing-extensions>=4.12.2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from pydantic<3.0.0,>=2.9.0->ollama) (4.12.2)\n",
      "Requirement already satisfied: exceptiongroup>=1.0.2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from anyio->httpx<0.29,>=0.27->ollama) (1.2.2)\n",
      "Collecting sniffio>=1.1 (from anyio->httpx<0.29,>=0.27->ollama)\n",
      "  Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)\n",
      "Using cached ollama-0.4.7-py3-none-any.whl (13 kB)\n",
      "Using cached httpx-0.28.1-py3-none-any.whl (73 kB)\n",
      "Using cached httpcore-1.0.7-py3-none-any.whl (78 kB)\n",
      "Using cached pydantic-2.10.6-py3-none-any.whl (431 kB)\n",
      "Downloading pydantic_core-2.27.2-cp39-cp39-win_amd64.whl (2.0 MB)\n",
      "   ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
      "   ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
      "   --------------------- ------------------ 1.0/2.0 MB 5.0 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 2.0/2.0 MB 6.5 MB/s eta 0:00:00\n",
      "Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)\n",
      "Using cached anyio-4.9.0-py3-none-any.whl (100 kB)\n",
      "Using cached h11-0.14.0-py3-none-any.whl (58 kB)\n",
      "Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)\n",
      "Installing collected packages: sniffio, pydantic-core, h11, annotated-types, pydantic, httpcore, anyio, httpx, ollama\n",
      "Successfully installed annotated-types-0.7.0 anyio-4.9.0 h11-0.14.0 httpcore-1.0.7 httpx-0.28.1 ollama-0.4.7 pydantic-2.10.6 pydantic-core-2.27.2 sniffio-1.3.1\n"
     ]
    }
   ],
   "source": [
    "!pip install ollama"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting sentence-transformers\n",
      "  Downloading sentence_transformers-3.4.1-py3-none-any.whl.metadata (10 kB)\n",
      "Collecting faiss-cpu\n",
      "  Downloading faiss_cpu-1.10.0-cp39-cp39-win_amd64.whl.metadata (4.5 kB)\n",
      "Collecting transformers<5.0.0,>=4.41.0 (from sentence-transformers)\n",
      "  Downloading transformers-4.49.0-py3-none-any.whl.metadata (44 kB)\n",
      "Collecting tqdm (from sentence-transformers)\n",
      "  Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)\n",
      "Requirement already satisfied: torch>=1.11.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from sentence-transformers) (2.6.0+cu118)\n",
      "Requirement already satisfied: scikit-learn in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from sentence-transformers) (1.6.1)\n",
      "Requirement already satisfied: scipy in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from sentence-transformers) (1.13.1)\n",
      "Collecting huggingface-hub>=0.20.0 (from sentence-transformers)\n",
      "  Downloading huggingface_hub-0.29.3-py3-none-any.whl.metadata (13 kB)\n",
      "Requirement already satisfied: Pillow in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from sentence-transformers) (11.0.0)\n",
      "Requirement already satisfied: numpy<3.0,>=1.25.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from faiss-cpu) (2.0.2)\n",
      "Requirement already satisfied: packaging in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from faiss-cpu) (24.2)\n",
      "Requirement already satisfied: filelock in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (3.13.1)\n",
      "Requirement already satisfied: fsspec>=2023.5.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2024.6.1)\n",
      "Collecting pyyaml>=5.1 (from huggingface-hub>=0.20.0->sentence-transformers)\n",
      "  Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl.metadata (2.1 kB)\n",
      "Requirement already satisfied: requests in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2.32.3)\n",
      "Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (4.12.2)\n",
      "Requirement already satisfied: networkx in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.2.1)\n",
      "Requirement already satisfied: jinja2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.1.4)\n",
      "Requirement already satisfied: sympy==1.13.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (1.13.1)\n",
      "Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from sympy==1.13.1->torch>=1.11.0->sentence-transformers) (1.3.0)\n",
      "Requirement already satisfied: colorama in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tqdm->sentence-transformers) (0.4.6)\n",
      "Collecting regex!=2019.12.17 (from transformers<5.0.0,>=4.41.0->sentence-transformers)\n",
      "  Using cached regex-2024.11.6-cp39-cp39-win_amd64.whl.metadata (41 kB)\n",
      "Collecting tokenizers<0.22,>=0.21 (from transformers<5.0.0,>=4.41.0->sentence-transformers)\n",
      "  Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl.metadata (6.9 kB)\n",
      "Collecting safetensors>=0.4.1 (from transformers<5.0.0,>=4.41.0->sentence-transformers)\n",
      "  Downloading safetensors-0.5.3-cp38-abi3-win_amd64.whl.metadata (3.9 kB)\n",
      "Requirement already satisfied: joblib>=1.2.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from scikit-learn->sentence-transformers) (1.4.2)\n",
      "Requirement already satisfied: threadpoolctl>=3.1.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from scikit-learn->sentence-transformers) (3.5.0)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from jinja2->torch>=1.11.0->sentence-transformers) (3.0.2)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.4.1)\n",
      "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.10)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2.3.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2025.1.31)\n",
      "Downloading sentence_transformers-3.4.1-py3-none-any.whl (275 kB)\n",
      "Downloading faiss_cpu-1.10.0-cp39-cp39-win_amd64.whl (13.7 MB)\n",
      "   ---------------------------------------- 0.0/13.7 MB ? eta -:--:--\n",
      "   ---- ----------------------------------- 1.6/13.7 MB 9.4 MB/s eta 0:00:02\n",
      "   ----------- ---------------------------- 3.9/13.7 MB 10.7 MB/s eta 0:00:01\n",
      "   ------------- -------------------------- 4.7/13.7 MB 10.6 MB/s eta 0:00:01\n",
      "   ---------------- ----------------------- 5.8/13.7 MB 7.7 MB/s eta 0:00:02\n",
      "   -------------------- ------------------- 7.1/13.7 MB 6.9 MB/s eta 0:00:01\n",
      "   --------------------- ------------------ 7.3/13.7 MB 6.5 MB/s eta 0:00:01\n",
      "   ---------------------- ----------------- 7.6/13.7 MB 5.8 MB/s eta 0:00:02\n",
      "   -------------------------- ------------- 8.9/13.7 MB 5.7 MB/s eta 0:00:01\n",
      "   --------------------------- ------------ 9.4/13.7 MB 5.4 MB/s eta 0:00:01\n",
      "   ----------------------------- ---------- 10.2/13.7 MB 4.9 MB/s eta 0:00:01\n",
      "   -------------------------------- ------- 11.3/13.7 MB 4.9 MB/s eta 0:00:01\n",
      "   ---------------------------------- ----- 11.8/13.7 MB 4.8 MB/s eta 0:00:01\n",
      "   ------------------------------------- -- 12.8/13.7 MB 4.7 MB/s eta 0:00:01\n",
      "   ---------------------------------------  13.4/13.7 MB 4.6 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 13.7/13.7 MB 4.5 MB/s eta 0:00:00\n",
      "Downloading huggingface_hub-0.29.3-py3-none-any.whl (468 kB)\n",
      "Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)\n",
      "Downloading transformers-4.49.0-py3-none-any.whl (10.0 MB)\n",
      "   ---------------------------------------- 0.0/10.0 MB ? eta -:--:--\n",
      "   --- ------------------------------------ 0.8/10.0 MB 3.7 MB/s eta 0:00:03\n",
      "   ------ --------------------------------- 1.6/10.0 MB 4.0 MB/s eta 0:00:03\n",
      "   --------- ------------------------------ 2.4/10.0 MB 4.1 MB/s eta 0:00:02\n",
      "   ------------ --------------------------- 3.1/10.0 MB 3.8 MB/s eta 0:00:02\n",
      "   --------------- ------------------------ 3.9/10.0 MB 3.9 MB/s eta 0:00:02\n",
      "   ------------------- -------------------- 5.0/10.0 MB 4.0 MB/s eta 0:00:02\n",
      "   ----------------------- ---------------- 5.8/10.0 MB 4.0 MB/s eta 0:00:02\n",
      "   --------------------------- ------------ 6.8/10.0 MB 4.1 MB/s eta 0:00:01\n",
      "   ----------------------------- ---------- 7.3/10.0 MB 4.1 MB/s eta 0:00:01\n",
      "   --------------------------------- ------ 8.4/10.0 MB 4.0 MB/s eta 0:00:01\n",
      "   ----------------------------------- ---- 8.9/10.0 MB 3.8 MB/s eta 0:00:01\n",
      "   ------------------------------------- -- 9.4/10.0 MB 3.7 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 10.0/10.0 MB 3.6 MB/s eta 0:00:00\n",
      "Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl (162 kB)\n",
      "Using cached regex-2024.11.6-cp39-cp39-win_amd64.whl (274 kB)\n",
      "Downloading safetensors-0.5.3-cp38-abi3-win_amd64.whl (308 kB)\n",
      "Downloading tokenizers-0.21.1-cp39-abi3-win_amd64.whl (2.4 MB)\n",
      "   ---------------------------------------- 0.0/2.4 MB ? eta -:--:--\n",
      "   -------- ------------------------------- 0.5/2.4 MB 3.4 MB/s eta 0:00:01\n",
      "   --------------------- ------------------ 1.3/2.4 MB 3.5 MB/s eta 0:00:01\n",
      "   ---------------------------------- ----- 2.1/2.4 MB 3.6 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 2.4/2.4 MB 3.3 MB/s eta 0:00:00\n",
      "Installing collected packages: tqdm, safetensors, regex, pyyaml, faiss-cpu, huggingface-hub, tokenizers, transformers, sentence-transformers\n",
      "Successfully installed faiss-cpu-1.10.0 huggingface-hub-0.29.3 pyyaml-6.0.2 regex-2024.11.6 safetensors-0.5.3 sentence-transformers-3.4.1 tokenizers-0.21.1 tqdm-4.67.1 transformers-4.49.0\n"
     ]
    }
   ],
   "source": [
    "!pip install sentence-transformers faiss-cpu"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The capital of Italy is **Rome**. \n",
      "\n",
      "It’s a common misconception that it’s Florence, but Rome is the official capital. 😊\n"
     ]
    }
   ],
   "source": [
    "import ollama\n",
    "\n",
    "def get_chatbot_response(model_name, messages):\n",
    "    response = ollama.chat(model=model_name, messages=messages)\n",
    "    return response['message']['content']\n",
    "\n",
    "# Example Usage\n",
    "model_name = \"gemma3:1b\"  # Can be replaced with 'gemma', 'llama3', etc.\n",
    "messages = [{'role': 'user', 'content': \"What's the capital of Italy?\"}]\n",
    "response = get_chatbot_response(model_name, messages)\n",
    "print(response)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting tf_keras\n",
      "  Downloading tf_keras-2.19.0-py3-none-any.whl.metadata (1.8 kB)\n",
      "Collecting tensorflow<2.20,>=2.19 (from tf_keras)\n",
      "  Downloading tensorflow-2.19.0-cp39-cp39-win_amd64.whl.metadata (4.1 kB)\n",
      "Requirement already satisfied: absl-py>=1.0.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (2.1.0)\n",
      "Requirement already satisfied: astunparse>=1.6.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (1.6.3)\n",
      "Requirement already satisfied: flatbuffers>=24.3.25 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (25.2.10)\n",
      "Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (0.6.0)\n",
      "Requirement already satisfied: google-pasta>=0.1.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (0.2.0)\n",
      "Requirement already satisfied: libclang>=13.0.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (18.1.1)\n",
      "Requirement already satisfied: opt-einsum>=2.3.2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (3.4.0)\n",
      "Requirement already satisfied: packaging in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (24.2)\n",
      "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.3 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (5.29.3)\n",
      "Requirement already satisfied: requests<3,>=2.21.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (2.32.3)\n",
      "Requirement already satisfied: setuptools in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (75.8.0)\n",
      "Requirement already satisfied: six>=1.12.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (1.17.0)\n",
      "Requirement already satisfied: termcolor>=1.1.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (2.5.0)\n",
      "Requirement already satisfied: typing-extensions>=3.6.6 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (4.12.2)\n",
      "Requirement already satisfied: wrapt>=1.11.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (1.17.2)\n",
      "Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (1.70.0)\n",
      "Collecting tensorboard~=2.19.0 (from tensorflow<2.20,>=2.19->tf_keras)\n",
      "  Downloading tensorboard-2.19.0-py3-none-any.whl.metadata (1.8 kB)\n",
      "Requirement already satisfied: keras>=3.5.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (3.9.0)\n",
      "Requirement already satisfied: numpy<2.2.0,>=1.26.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (2.0.2)\n",
      "Requirement already satisfied: h5py>=3.11.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (3.13.0)\n",
      "Collecting ml-dtypes<1.0.0,>=0.5.1 (from tensorflow<2.20,>=2.19->tf_keras)\n",
      "  Downloading ml_dtypes-0.5.1-cp39-cp39-win_amd64.whl.metadata (22 kB)\n",
      "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf_keras) (0.31.0)\n",
      "Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from astunparse>=1.6.0->tensorflow<2.20,>=2.19->tf_keras) (0.45.1)\n",
      "Requirement already satisfied: rich in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (13.9.4)\n",
      "Requirement already satisfied: namex in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (0.0.8)\n",
      "Requirement already satisfied: optree in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (0.14.1)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf_keras) (3.4.1)\n",
      "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf_keras) (3.10)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf_keras) (2.3.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf_keras) (2025.1.31)\n",
      "Requirement already satisfied: markdown>=2.6.8 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (3.7)\n",
      "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (0.7.2)\n",
      "Requirement already satisfied: werkzeug>=1.0.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (3.1.3)\n",
      "Requirement already satisfied: importlib-metadata>=4.4 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from markdown>=2.6.8->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (8.6.1)\n",
      "Requirement already satisfied: MarkupSafe>=2.1.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from werkzeug>=1.0.1->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (3.0.2)\n",
      "Requirement already satisfied: markdown-it-py>=2.2.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (3.0.0)\n",
      "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (2.19.1)\n",
      "Requirement already satisfied: zipp>=3.20 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf_keras) (3.21.0)\n",
      "Requirement already satisfied: mdurl~=0.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from markdown-it-py>=2.2.0->rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf_keras) (0.1.2)\n",
      "Downloading tf_keras-2.19.0-py3-none-any.whl (1.7 MB)\n",
      "   ---------------------------------------- 0.0/1.7 MB ? eta -:--:--\n",
      "   ---------------------------------------- 0.0/1.7 MB ? eta -:--:--\n",
      "   ------------------------ --------------- 1.0/1.7 MB 4.2 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 1.7/1.7 MB 4.9 MB/s eta 0:00:00\n",
      "Downloading tensorflow-2.19.0-cp39-cp39-win_amd64.whl (375.7 MB)\n",
      "   ---------------------------------------- 0.0/375.7 MB ? eta -:--:--\n",
      "   ---------------------------------------- 1.3/375.7 MB 8.4 MB/s eta 0:00:45\n",
      "   ---------------------------------------- 2.9/375.7 MB 7.3 MB/s eta 0:00:52\n",
      "   ---------------------------------------- 3.9/375.7 MB 6.7 MB/s eta 0:00:56\n",
      "    --------------------------------------- 5.5/375.7 MB 6.8 MB/s eta 0:00:55\n",
      "    --------------------------------------- 7.3/375.7 MB 7.2 MB/s eta 0:00:52\n",
      "    --------------------------------------- 8.9/375.7 MB 7.2 MB/s eta 0:00:52\n",
      "   - -------------------------------------- 10.7/375.7 MB 7.5 MB/s eta 0:00:49\n",
      "   - -------------------------------------- 12.6/375.7 MB 7.7 MB/s eta 0:00:47\n",
      "   - -------------------------------------- 13.4/375.7 MB 7.2 MB/s eta 0:00:51\n",
      "   - -------------------------------------- 15.2/375.7 MB 7.4 MB/s eta 0:00:50\n",
      "   - -------------------------------------- 17.3/375.7 MB 7.6 MB/s eta 0:00:48\n",
      "   - -------------------------------------- 18.6/375.7 MB 7.5 MB/s eta 0:00:48\n",
      "   -- ------------------------------------- 20.2/375.7 MB 7.5 MB/s eta 0:00:48\n",
      "   -- ------------------------------------- 22.5/375.7 MB 7.8 MB/s eta 0:00:46\n",
      "   -- ------------------------------------- 24.1/375.7 MB 7.7 MB/s eta 0:00:46\n",
      "   -- ------------------------------------- 26.0/375.7 MB 7.8 MB/s eta 0:00:45\n",
      "   -- ------------------------------------- 27.8/375.7 MB 7.9 MB/s eta 0:00:45\n",
      "   --- ------------------------------------ 29.6/375.7 MB 7.9 MB/s eta 0:00:44\n",
      "   --- ------------------------------------ 32.0/375.7 MB 8.1 MB/s eta 0:00:43\n",
      "   --- ------------------------------------ 34.3/375.7 MB 8.3 MB/s eta 0:00:42\n",
      "   --- ------------------------------------ 35.9/375.7 MB 8.2 MB/s eta 0:00:42\n",
      "   ---- ----------------------------------- 38.3/375.7 MB 8.4 MB/s eta 0:00:41\n",
      "   ---- ----------------------------------- 40.9/375.7 MB 8.6 MB/s eta 0:00:40\n",
      "   ---- ----------------------------------- 43.0/375.7 MB 8.7 MB/s eta 0:00:39\n",
      "   ---- ----------------------------------- 45.4/375.7 MB 8.7 MB/s eta 0:00:38\n",
      "   ---- ----------------------------------- 46.7/375.7 MB 8.6 MB/s eta 0:00:39\n",
      "   ----- ---------------------------------- 47.7/375.7 MB 8.7 MB/s eta 0:00:38\n",
      "   ----- ---------------------------------- 49.3/375.7 MB 8.5 MB/s eta 0:00:39\n",
      "   ----- ---------------------------------- 51.1/375.7 MB 8.5 MB/s eta 0:00:39\n",
      "   ----- ---------------------------------- 53.2/375.7 MB 8.6 MB/s eta 0:00:38\n",
      "   ----- ---------------------------------- 55.1/375.7 MB 8.6 MB/s eta 0:00:38\n",
      "   ------ --------------------------------- 57.7/375.7 MB 8.7 MB/s eta 0:00:37\n",
      "   ------ --------------------------------- 59.8/375.7 MB 8.8 MB/s eta 0:00:36\n",
      "   ------ --------------------------------- 62.1/375.7 MB 8.8 MB/s eta 0:00:36\n",
      "   ------ --------------------------------- 64.2/375.7 MB 8.9 MB/s eta 0:00:35\n",
      "   ------- -------------------------------- 66.3/375.7 MB 9.0 MB/s eta 0:00:35\n",
      "   ------- -------------------------------- 68.4/375.7 MB 8.9 MB/s eta 0:00:35\n",
      "   ------- -------------------------------- 70.8/375.7 MB 9.0 MB/s eta 0:00:34\n",
      "   ------- -------------------------------- 73.1/375.7 MB 9.1 MB/s eta 0:00:34\n",
      "   -------- ------------------------------- 75.5/375.7 MB 9.1 MB/s eta 0:00:33\n",
      "   -------- ------------------------------- 77.9/375.7 MB 9.2 MB/s eta 0:00:33\n",
      "   -------- ------------------------------- 80.7/375.7 MB 9.3 MB/s eta 0:00:32\n",
      "   -------- ------------------------------- 82.6/375.7 MB 9.3 MB/s eta 0:00:32\n",
      "   --------- ------------------------------ 85.5/375.7 MB 9.4 MB/s eta 0:00:31\n",
      "   --------- ------------------------------ 87.8/375.7 MB 9.4 MB/s eta 0:00:31\n",
      "   --------- ------------------------------ 89.9/375.7 MB 9.5 MB/s eta 0:00:31\n",
      "   --------- ------------------------------ 92.8/375.7 MB 9.5 MB/s eta 0:00:30\n",
      "   ---------- ----------------------------- 95.7/375.7 MB 9.6 MB/s eta 0:00:30\n",
      "   ---------- ----------------------------- 97.8/375.7 MB 9.6 MB/s eta 0:00:29\n",
      "   ---------- ----------------------------- 99.9/375.7 MB 9.6 MB/s eta 0:00:29\n",
      "   ---------- ----------------------------- 100.4/375.7 MB 9.7 MB/s eta 0:00:29\n",
      "   ---------- ----------------------------- 102.2/375.7 MB 9.5 MB/s eta 0:00:29\n",
      "   ----------- ---------------------------- 104.9/375.7 MB 9.6 MB/s eta 0:00:29\n",
      "   ----------- ---------------------------- 107.7/375.7 MB 9.7 MB/s eta 0:00:28\n",
      "   ----------- ---------------------------- 109.3/375.7 MB 9.6 MB/s eta 0:00:28\n",
      "   ----------- ---------------------------- 112.2/375.7 MB 9.7 MB/s eta 0:00:28\n",
      "   ------------ --------------------------- 115.1/375.7 MB 9.8 MB/s eta 0:00:27\n",
      "   ------------ --------------------------- 117.7/375.7 MB 9.8 MB/s eta 0:00:27\n",
      "   ------------ --------------------------- 120.3/375.7 MB 9.9 MB/s eta 0:00:26\n",
      "   ------------- -------------------------- 123.2/375.7 MB 9.9 MB/s eta 0:00:26\n",
      "   ------------ -------------------------- 125.0/375.7 MB 10.0 MB/s eta 0:00:26\n",
      "   ------------- -------------------------- 127.4/375.7 MB 9.9 MB/s eta 0:00:25\n",
      "   ------------- ------------------------- 130.0/375.7 MB 10.0 MB/s eta 0:00:25\n",
      "   ------------- ------------------------- 131.9/375.7 MB 10.0 MB/s eta 0:00:25\n",
      "   ------------- ------------------------- 133.4/375.7 MB 10.0 MB/s eta 0:00:25\n",
      "   -------------- ------------------------ 135.8/375.7 MB 10.0 MB/s eta 0:00:25\n",
      "   -------------- ------------------------ 138.1/375.7 MB 10.0 MB/s eta 0:00:24\n",
      "   -------------- ------------------------ 141.0/375.7 MB 10.0 MB/s eta 0:00:24\n",
      "   -------------- ------------------------ 143.7/375.7 MB 10.1 MB/s eta 0:00:24\n",
      "   --------------- ----------------------- 146.5/375.7 MB 10.1 MB/s eta 0:00:23\n",
      "   --------------- ----------------------- 148.9/375.7 MB 10.1 MB/s eta 0:00:23\n",
      "   --------------- ----------------------- 151.5/375.7 MB 10.2 MB/s eta 0:00:23\n",
      "   ---------------- ---------------------- 154.7/375.7 MB 10.3 MB/s eta 0:00:22\n",
      "   ---------------- ---------------------- 156.5/375.7 MB 10.2 MB/s eta 0:00:22\n",
      "   ---------------- ---------------------- 158.9/375.7 MB 10.3 MB/s eta 0:00:22\n",
      "   ---------------- ---------------------- 161.2/375.7 MB 10.3 MB/s eta 0:00:21\n",
      "   ---------------- ---------------------- 163.3/375.7 MB 10.3 MB/s eta 0:00:21\n",
      "   ----------------- --------------------- 165.4/375.7 MB 10.3 MB/s eta 0:00:21\n",
      "   ----------------- --------------------- 168.6/375.7 MB 10.3 MB/s eta 0:00:21\n",
      "   ----------------- --------------------- 170.4/375.7 MB 10.3 MB/s eta 0:00:20\n",
      "   ----------------- --------------------- 173.0/375.7 MB 10.3 MB/s eta 0:00:20\n",
      "   ------------------ -------------------- 175.9/375.7 MB 10.4 MB/s eta 0:00:20\n",
      "   ------------------ -------------------- 176.9/375.7 MB 10.3 MB/s eta 0:00:20\n",
      "   ------------------ -------------------- 180.4/375.7 MB 10.4 MB/s eta 0:00:19\n",
      "   ------------------- ------------------- 183.2/375.7 MB 10.4 MB/s eta 0:00:19\n",
      "   ------------------- ------------------- 184.5/375.7 MB 10.4 MB/s eta 0:00:19\n",
      "   ------------------- ------------------- 187.2/375.7 MB 10.4 MB/s eta 0:00:19\n",
      "   ------------------- ------------------- 190.3/375.7 MB 10.5 MB/s eta 0:00:18\n",
      "   ------------------- ------------------- 191.9/375.7 MB 10.4 MB/s eta 0:00:18\n",
      "   -------------------- ------------------ 194.5/375.7 MB 10.5 MB/s eta 0:00:18\n",
      "   -------------------- ------------------ 197.7/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   -------------------- ------------------ 199.0/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   -------------------- ------------------ 201.3/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   --------------------- ----------------- 203.4/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   --------------------- ----------------- 205.5/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   --------------------- ----------------- 207.6/375.7 MB 10.5 MB/s eta 0:00:17\n",
      "   --------------------- ----------------- 210.8/375.7 MB 10.5 MB/s eta 0:00:16\n",
      "   ---------------------- ---------------- 213.1/375.7 MB 10.6 MB/s eta 0:00:16\n",
      "   ---------------------- ---------------- 215.5/375.7 MB 10.5 MB/s eta 0:00:16\n",
      "   ---------------------- ---------------- 217.3/375.7 MB 10.5 MB/s eta 0:00:16\n",
      "   ---------------------- ---------------- 221.0/375.7 MB 10.6 MB/s eta 0:00:15\n",
      "   ----------------------- --------------- 223.6/375.7 MB 10.6 MB/s eta 0:00:15\n",
      "   ----------------------- --------------- 226.2/375.7 MB 10.6 MB/s eta 0:00:15\n",
      "   ----------------------- --------------- 228.9/375.7 MB 10.7 MB/s eta 0:00:14\n",
      "   ------------------------ -------------- 231.5/375.7 MB 10.7 MB/s eta 0:00:14\n",
      "   ------------------------ -------------- 233.6/375.7 MB 10.7 MB/s eta 0:00:14\n",
      "   ------------------------ -------------- 236.7/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   ------------------------ -------------- 238.6/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   ------------------------- ------------- 240.9/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   ------------------------- ------------- 243.3/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   ------------------------- ------------- 243.8/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   ------------------------- ------------- 247.2/375.7 MB 10.7 MB/s eta 0:00:13\n",
      "   -------------------------- ------------ 251.1/375.7 MB 10.7 MB/s eta 0:00:12\n",
      "   -------------------------- ------------ 252.2/375.7 MB 10.7 MB/s eta 0:00:12\n",
      "   -------------------------- ------------ 256.4/375.7 MB 10.8 MB/s eta 0:00:12\n",
      "   -------------------------- ------------ 259.8/375.7 MB 10.8 MB/s eta 0:00:11\n",
      "   --------------------------- ----------- 261.9/375.7 MB 10.8 MB/s eta 0:00:11\n",
      "   --------------------------- ----------- 264.2/375.7 MB 10.9 MB/s eta 0:00:11\n",
      "   --------------------------- ----------- 266.6/375.7 MB 11.0 MB/s eta 0:00:10\n",
      "   --------------------------- ----------- 267.9/375.7 MB 10.9 MB/s eta 0:00:10\n",
      "   --------------------------- ----------- 267.9/375.7 MB 10.9 MB/s eta 0:00:10\n",
      "   ---------------------------- ---------- 270.3/375.7 MB 10.9 MB/s eta 0:00:10\n",
      "   ---------------------------- ---------- 271.8/375.7 MB 10.9 MB/s eta 0:00:10\n",
      "   ---------------------------- ---------- 274.5/375.7 MB 10.9 MB/s eta 0:00:10\n",
      "   ---------------------------- ---------- 276.3/375.7 MB 11.0 MB/s eta 0:00:10\n",
      "   ---------------------------- ---------- 277.6/375.7 MB 10.9 MB/s eta 0:00:09\n",
      "   ----------------------------- --------- 280.8/375.7 MB 11.0 MB/s eta 0:00:09\n",
      "   ----------------------------- --------- 283.4/375.7 MB 11.1 MB/s eta 0:00:09\n",
      "   ----------------------------- --------- 284.4/375.7 MB 11.1 MB/s eta 0:00:09\n",
      "   ----------------------------- --------- 287.0/375.7 MB 11.1 MB/s eta 0:00:09\n",
      "   ------------------------------ -------- 289.1/375.7 MB 11.1 MB/s eta 0:00:08\n",
      "   ------------------------------ -------- 290.5/375.7 MB 11.1 MB/s eta 0:00:08\n",
      "   ------------------------------ -------- 291.8/375.7 MB 11.0 MB/s eta 0:00:08\n",
      "   ------------------------------ -------- 295.4/375.7 MB 11.1 MB/s eta 0:00:08\n",
      "   ------------------------------ -------- 297.5/375.7 MB 11.1 MB/s eta 0:00:08\n",
      "   ------------------------------- ------- 300.7/375.7 MB 11.1 MB/s eta 0:00:07\n",
      "   ------------------------------- ------- 304.1/375.7 MB 11.2 MB/s eta 0:00:07\n",
      "   ------------------------------- ------- 306.4/375.7 MB 11.2 MB/s eta 0:00:07\n",
      "   ------------------------------- ------- 308.3/375.7 MB 11.2 MB/s eta 0:00:07\n",
      "   -------------------------------- ------ 310.9/375.7 MB 11.2 MB/s eta 0:00:06\n",
      "   -------------------------------- ------ 314.3/375.7 MB 11.4 MB/s eta 0:00:06\n",
      "   -------------------------------- ------ 315.4/375.7 MB 11.3 MB/s eta 0:00:06\n",
      "   --------------------------------- ----- 318.0/375.7 MB 11.3 MB/s eta 0:00:06\n",
      "   --------------------------------- ----- 320.1/375.7 MB 11.3 MB/s eta 0:00:05\n",
      "   --------------------------------- ----- 323.0/375.7 MB 11.3 MB/s eta 0:00:05\n",
      "   --------------------------------- ----- 326.1/375.7 MB 11.4 MB/s eta 0:00:05\n",
      "   ---------------------------------- ---- 329.3/375.7 MB 11.5 MB/s eta 0:00:05\n",
      "   ---------------------------------- ---- 331.9/375.7 MB 11.5 MB/s eta 0:00:04\n",
      "   ---------------------------------- ---- 335.5/375.7 MB 11.5 MB/s eta 0:00:04\n",
      "   ----------------------------------- --- 338.7/375.7 MB 11.6 MB/s eta 0:00:04\n",
      "   ----------------------------------- --- 341.3/375.7 MB 11.5 MB/s eta 0:00:03\n",
      "   ----------------------------------- --- 343.1/375.7 MB 11.5 MB/s eta 0:00:03\n",
      "   ----------------------------------- --- 346.0/375.7 MB 11.6 MB/s eta 0:00:03\n",
      "   ------------------------------------ -- 348.4/375.7 MB 11.5 MB/s eta 0:00:03\n",
      "   ------------------------------------ -- 351.5/375.7 MB 11.6 MB/s eta 0:00:03\n",
      "   ------------------------------------ -- 355.5/375.7 MB 11.6 MB/s eta 0:00:02\n",
      "   ------------------------------------- - 357.3/375.7 MB 11.6 MB/s eta 0:00:02\n",
      "   ------------------------------------- - 360.2/375.7 MB 11.6 MB/s eta 0:00:02\n",
      "   ------------------------------------- - 363.3/375.7 MB 11.7 MB/s eta 0:00:02\n",
      "   ------------------------------------- - 365.7/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------  368.8/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------  372.0/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------  374.3/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------  375.7/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------  375.7/375.7 MB 11.8 MB/s eta 0:00:01\n",
      "   --------------------------------------- 375.7/375.7 MB 11.6 MB/s eta 0:00:00\n",
      "Downloading ml_dtypes-0.5.1-cp39-cp39-win_amd64.whl (209 kB)\n",
      "Downloading tensorboard-2.19.0-py3-none-any.whl (5.5 MB)\n",
      "   ---------------------------------------- 0.0/5.5 MB ? eta -:--:--\n",
      "   ------------------------ --------------- 3.4/5.5 MB 20.2 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 5.5/5.5 MB 14.0 MB/s eta 0:00:00\n",
      "Installing collected packages: ml-dtypes, tensorboard, tensorflow, tf_keras\n",
      "  Attempting uninstall: ml-dtypes\n",
      "    Found existing installation: ml-dtypes 0.4.1\n",
      "    Uninstalling ml-dtypes-0.4.1:\n",
      "      Successfully uninstalled ml-dtypes-0.4.1\n",
      "  Attempting uninstall: tensorboard\n",
      "    Found existing installation: tensorboard 2.18.0\n",
      "    Uninstalling tensorboard-2.18.0:\n",
      "      Successfully uninstalled tensorboard-2.18.0\n",
      "  Attempting uninstall: tensorflow\n",
      "    Found existing installation: tensorflow 2.18.0\n",
      "    Uninstalling tensorflow-2.18.0:\n",
      "      Successfully uninstalled tensorflow-2.18.0\n",
      "  Rolling back uninstall of tensorflow\n",
      "  Moving to c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages\\tensorflow-2.18.0.dist-info\\\n",
      "   from C:\\Users\\alokd\\miniconda3\\envs\\chat\\Lib\\site-packages\\~ensorflow-2.18.0.dist-info\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  WARNING: Failed to remove contents in a temporary directory 'C:\\Users\\alokd\\miniconda3\\envs\\chat\\Lib\\site-packages\\~l_dtypes'.\n",
      "  You can safely remove it manually.\n",
      "ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\\\Users\\\\alokd\\\\miniconda3\\\\envs\\\\chat\\\\Lib\\\\site-packages\\\\tensorflow\\\\compiler\\\\mlir\\\\lite\\\\python\\\\_pywrap_converter_api.pyd'\n",
      "Consider using the `--user` option or check the permissions.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "!pip install tf_keras"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting tf-keras\n",
      "  Using cached tf_keras-2.19.0-py3-none-any.whl.metadata (1.8 kB)\n",
      "Collecting tensorflow<2.20,>=2.19 (from tf-keras)\n",
      "  Using cached tensorflow-2.19.0-cp39-cp39-win_amd64.whl.metadata (4.1 kB)\n",
      "Requirement already satisfied: absl-py>=1.0.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (2.1.0)\n",
      "Requirement already satisfied: astunparse>=1.6.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (1.6.3)\n",
      "Requirement already satisfied: flatbuffers>=24.3.25 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (25.2.10)\n",
      "Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (0.6.0)\n",
      "Requirement already satisfied: google-pasta>=0.1.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (0.2.0)\n",
      "Requirement already satisfied: libclang>=13.0.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (18.1.1)\n",
      "Requirement already satisfied: opt-einsum>=2.3.2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (3.4.0)\n",
      "Requirement already satisfied: packaging in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (24.2)\n",
      "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.3 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (5.29.3)\n",
      "Requirement already satisfied: requests<3,>=2.21.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (2.32.3)\n",
      "Requirement already satisfied: setuptools in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (75.8.0)\n",
      "Requirement already satisfied: six>=1.12.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (1.17.0)\n",
      "Requirement already satisfied: termcolor>=1.1.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (2.5.0)\n",
      "Requirement already satisfied: typing-extensions>=3.6.6 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (4.12.2)\n",
      "Requirement already satisfied: wrapt>=1.11.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (1.17.2)\n",
      "Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (1.70.0)\n",
      "Collecting tensorboard~=2.19.0 (from tensorflow<2.20,>=2.19->tf-keras)\n",
      "  Using cached tensorboard-2.19.0-py3-none-any.whl.metadata (1.8 kB)\n",
      "Requirement already satisfied: keras>=3.5.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (3.9.0)\n",
      "Requirement already satisfied: numpy<2.2.0,>=1.26.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (2.0.2)\n",
      "Requirement already satisfied: h5py>=3.11.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (3.13.0)\n",
      "Collecting ml-dtypes<1.0.0,>=0.5.1 (from tensorflow<2.20,>=2.19->tf-keras)\n",
      "  Using cached ml_dtypes-0.5.1-cp39-cp39-win_amd64.whl.metadata (22 kB)\n",
      "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorflow<2.20,>=2.19->tf-keras) (0.31.0)\n",
      "Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from astunparse>=1.6.0->tensorflow<2.20,>=2.19->tf-keras) (0.45.1)\n",
      "Requirement already satisfied: rich in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (13.9.4)\n",
      "Requirement already satisfied: namex in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (0.0.8)\n",
      "Requirement already satisfied: optree in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (0.14.1)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf-keras) (3.4.1)\n",
      "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf-keras) (3.10)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf-keras) (2.3.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow<2.20,>=2.19->tf-keras) (2025.1.31)\n",
      "Requirement already satisfied: markdown>=2.6.8 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (3.7)\n",
      "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (0.7.2)\n",
      "Requirement already satisfied: werkzeug>=1.0.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (3.1.3)\n",
      "Requirement already satisfied: importlib-metadata>=4.4 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from markdown>=2.6.8->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (8.6.1)\n",
      "Requirement already satisfied: MarkupSafe>=2.1.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from werkzeug>=1.0.1->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (3.0.2)\n",
      "Requirement already satisfied: markdown-it-py>=2.2.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (3.0.0)\n",
      "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (2.19.1)\n",
      "Requirement already satisfied: zipp>=3.20 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard~=2.19.0->tensorflow<2.20,>=2.19->tf-keras) (3.21.0)\n",
      "Requirement already satisfied: mdurl~=0.1 in c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages (from markdown-it-py>=2.2.0->rich->keras>=3.5.0->tensorflow<2.20,>=2.19->tf-keras) (0.1.2)\n",
      "Using cached tf_keras-2.19.0-py3-none-any.whl (1.7 MB)\n",
      "Using cached tensorflow-2.19.0-cp39-cp39-win_amd64.whl (375.7 MB)\n",
      "Using cached ml_dtypes-0.5.1-cp39-cp39-win_amd64.whl (209 kB)\n",
      "Using cached tensorboard-2.19.0-py3-none-any.whl (5.5 MB)\n",
      "Installing collected packages: ml-dtypes, tensorboard, tensorflow, tf-keras\n",
      "  Attempting uninstall: ml-dtypes\n",
      "    Found existing installation: ml-dtypes 0.4.1\n",
      "    Uninstalling ml-dtypes-0.4.1:\n",
      "      Successfully uninstalled ml-dtypes-0.4.1\n",
      "  Attempting uninstall: tensorboard\n",
      "    Found existing installation: tensorboard 2.18.0\n",
      "    Uninstalling tensorboard-2.18.0:\n",
      "      Successfully uninstalled tensorboard-2.18.0\n",
      "  Attempting uninstall: tensorflow\n",
      "    Found existing installation: tensorflow 2.18.0\n",
      "    Uninstalling tensorflow-2.18.0:\n",
      "      Successfully uninstalled tensorflow-2.18.0\n",
      "  Rolling back uninstall of tensorflow\n",
      "  Moving to c:\\users\\alokd\\miniconda3\\envs\\chat\\lib\\site-packages\\tensorflow-2.18.0.dist-info\\\n",
      "   from C:\\Users\\alokd\\miniconda3\\envs\\chat\\Lib\\site-packages\\~ensorflow-2.18.0.dist-info\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'c:\\\\Users\\\\alokd\\\\miniconda3\\\\envs\\\\chat\\\\Lib\\\\site-packages\\\\tensorflow\\\\compiler\\\\mlir\\\\lite\\\\python\\\\_pywrap_converter_api.pyd'\n",
      "Consider using the `--user` option or check the permissions.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "pip install tf-keras"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "chat",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.21"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}