├── Imtiaz AI.css
├── Imtiaz AI.html
├── Imtiaz AI.js
├── MidhunChatBotWithOpenAIAndLangChain.ipynb
└── README.md
/Imtiaz AI.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Outfit&family=Bree+Serif&family=Caveat:wght@400;700&family=Lobster&family=Monoton&family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display+SC:ital,wght@0,400;0,700;1,700&family=Playfair+Display:ital,wght@0,400;0,700;1,700&family=Roboto:ital,wght@0,400;0,700;1,400;1,700&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,700&family=Work+Sans:ital,wght@0,400;0,700;1,700&display=swap');
2 |
3 | body {
4 | margin: 0px;
5 | background: linear-gradient(to right, rgb(0, 0, 0), #1F2937);
6 | }
7 |
8 | * {
9 | font-family: Outfit;
10 | }
11 |
12 | .main-container {
13 | display: flex;
14 | flex-direction: row;
15 | justify-content: space-between;
16 | box-sizing: border-box;
17 | overflow: hidden;
18 | }
19 |
20 | .description-container {
21 | display: flex;
22 | flex-direction: column;
23 | align-self: flex-start;
24 | gap: 54px;
25 | width: 65%;
26 | padding-top: 56px;
27 | padding-bottom: 56px;
28 | padding-left: 56px;
29 | padding-right: 12px;
30 | height: 100vh;
31 | box-sizing: border-box;
32 | }
33 |
34 | .project-details-container {
35 | align-items: flex-start;
36 | display: flex;
37 | flex: none;
38 | flex-direction: column;
39 | flex-wrap: nowrap;
40 | gap: 16px;
41 | height: min-content;
42 | justify-content: flex-start;
43 | overflow: visible;
44 | padding: 0;
45 | position: relative;
46 | width: 100%;
47 | }
48 |
49 | .project-heading {
50 | flex: none;
51 | height: auto;
52 | position: relative;
53 | width: 100%;
54 | }
55 |
56 | .heading {
57 | background-image: url(https://framerusercontent.com/images/2IaeICXvsJApqTXCae1q1dVMVIE.jpg);
58 | background-size: cover;
59 | background-repeat: no-repeat;
60 | background-position: 0% 0%;
61 | background-clip: text;
62 | -webkit-background-clip: text;
63 | -webkit-text-fill-color: transparent;
64 | color: rgb(136, 136, 136);
65 | font-size: 80px;
66 | font-family: Outfit, sans-serif;
67 | font-style: normal;
68 | font-weight: 900;
69 | text-align: left;
70 | letter-spacing: 0px;
71 | white-space: normal;
72 | line-height: 1;
73 | margin: 0px;
74 | padding: 0px 0px 10px;
75 | }
76 |
77 | .project-description {
78 | position: relative;
79 | white-space: pre-wrap;
80 | max-width: 569px;
81 | word-break: break-word;
82 | outline: none;
83 | display: flex;
84 | flex-direction: column;
85 | justify-content: flex-start;
86 | flex-shrink: 0;
87 | transform: none;
88 | }
89 |
90 | .description {
91 | font-family: Outfit, sans-serif;
92 | font-size: 16px;
93 | font-style: normal;
94 | font-weight: 400;
95 | letter-spacing: 0px;
96 | line-height: 24px;
97 | color: rgb(148, 163, 184);
98 | margin: 0px;
99 | }
100 |
101 | .i-have-learnt-section {
102 | align-items: flex-start;
103 | display: flex;
104 | flex: none;
105 | flex-direction: column;
106 | flex-wrap: nowrap;
107 | gap: 16px;
108 | height: min-content;
109 | justify-content: flex-start;
110 | overflow: visible;
111 | padding: 0;
112 | position: relative;
113 | width: 100%;
114 | z-index: 1;
115 | }
116 |
117 | .i-have-learnt {
118 | font-family: Outfit, sans-serif;
119 | font-size: 16px;
120 | font-style: normal;
121 | font-weight: 400;
122 | letter-spacing: 0px;
123 | line-height: 24px;
124 | color: rgb(148, 163, 184);
125 | margin: 0px;
126 | }
127 |
128 | .profile-section {
129 | display: flex;
130 | flex-direction: row;
131 | gap: 16px;
132 | justify-content: flex-start;
133 | align-items: center;
134 | max-width: 1000px;
135 | overflow: visible;
136 | padding: 0;
137 | position: relative;
138 | width: 100%;
139 | }
140 |
141 | .profile-pic-container {
142 | width: 66px;
143 | position: relative;
144 | aspect-ratio: 1 / 1;
145 | height: 66px;
146 | border-radius: 40px;
147 | box-shadow: 0 10px 25px #400363, 0 -5px 25px #008bc7;
148 | }
149 |
150 | .profile-pic {
151 | position: absolute;
152 | top: 0;
153 | bottom: 0;
154 | left: 0;
155 | right: 0;
156 | border-radius: inherit;
157 | }
158 |
159 | .student-pic {
160 | display: block;
161 | width: 100%;
162 | height: 100%;
163 | border-radius: inherit;
164 | object-position: center;
165 | object-fit: cover;
166 | image-rendering: auto;
167 | }
168 |
169 | .profile-info-container {
170 | align-items: flex-start;
171 | display: flex;
172 | flex-direction: column;
173 | gap: 5px;
174 | justify-content: flex-start;
175 | overflow: visible;
176 | padding: 0;
177 | position: relative;
178 | }
179 |
180 | .name {
181 | font-size: 30px;
182 | margin: 0px;
183 | color: white;
184 | font-weight: 600;
185 | }
186 |
187 | .bot-extra-info {
188 | color: rgba(212, 212, 212, 0.6);
189 | margin: 0px;
190 | font-weight: 400;
191 | font-family: Outfit, Sans-Serif;
192 | }
193 |
194 | .topics-list {
195 | align-items: center;
196 | display: flex;
197 | flex: none;
198 | flex-direction: row;
199 | flex-wrap: wrap;
200 | gap: 24px;
201 | height: min-content;
202 | justify-content: flex-start;
203 | overflow: visible;
204 | padding: 0;
205 | position: relative;
206 | width: 100%;
207 | }
208 |
209 | .topic-icon {
210 | box-sizing: border-box;
211 | flex-shrink: 0;
212 | /* width: 64px;
213 | height: 64px; */
214 | display: flex;
215 | flex-direction: column;
216 | justify-content: flex-start;
217 | align-items: center;
218 | padding: 20px 16px;
219 | /* -webkit-backdrop-filter: blur(10px); */
220 | /* backdrop-filter: blur(10px); */
221 | background-color: rgba(30, 41, 59, 0.2);
222 | /* overflow: hidden; */
223 | position: relative;
224 | align-content: center;
225 | flex-wrap: nowrap;
226 | gap: 0;
227 | border-radius: 16px;
228 | border: 1px solid #1e293b;
229 | opacity: 1;
230 | transform: none;
231 | cursor: pointer;
232 | }
233 |
234 | @keyframes beating {
235 | 0% {
236 | font-size: 10px;
237 | }
238 |
239 | 100% {
240 | font-size: 20px;
241 | }
242 | }
243 |
244 |
245 | .heart-beat {
246 | width: 10px;
247 | height: 10px;
248 | animation: beating 0.8s infinite;
249 | font-size: 10px;
250 | display: inline-flex;
251 | align-items: center;
252 | justify-content: center;
253 | margin-right: 6px;
254 | }
255 |
256 | .footer-section {
257 | display: flex;
258 | align-items: flex-end;
259 | justify-content: flex-start;
260 | gap: 8px;
261 | flex-grow: 1;
262 | flex-wrap: wrap;
263 | }
264 |
265 | .footer-info {
266 | font-family: Outfit, sans-serif;
267 | font-size: 16px;
268 | font-style: normal;
269 | font-weight: 400;
270 | letter-spacing: 0px;
271 | line-height: 24px;
272 | color: rgb(148, 163, 184);
273 | }
274 |
275 | .share-now {
276 | display: flex;
277 | align-items: flex-end;
278 | }
279 |
280 | .icons-container {
281 | height: 100%;
282 | display: flex;
283 | align-items: flex-end;
284 | gap: 16px;
285 | margin-bottom: -4px;
286 | }
287 |
288 | .divider-container {
289 | flex: none;
290 | height: 24px;
291 | position: relative;
292 | width: 2px;
293 | flex-shrink: 0;
294 | fill: rgba(0, 0, 0, 1);
295 | background: rgb(148, 163, 184);
296 | }
297 |
298 | .divider {
299 | width: 100%;
300 | height: 100%;
301 | aspect-ratio: inherit;
302 | }
303 |
304 | .share-now-text {
305 | margin: 0px;
306 | }
307 |
308 | .zoom-svg {
309 | transform: scale(1.5);
310 | /* Zoom the SVG by 1.5 times on hover */
311 | }
312 |
313 | @media screen and (max-width: 1199px) {
314 | .divider-container {
315 | display: none;
316 | }
317 |
318 | .footer-section {
319 | flex-direction: column;
320 | align-items: flex-start;
321 | justify-content: flex-end;
322 | }
323 | }
324 |
325 | .chat-bot-container {
326 | height: 100vh;
327 | width: 35%;
328 | box-sizing: border-box;
329 | }
330 |
331 | .chat-bot-container-iframe {}
332 |
333 | .social-icon {
334 | cursor: pointer;
335 | }
336 |
337 | .gradio-logo {
338 | width: 26px;
339 | height: 26px;
340 | border-radius: 8px;
341 | }
342 |
343 | .open-ai-logo {
344 | margin: 2px;
345 | }
346 |
347 | .hugging-face-logo {
348 | width: 26px;
349 | height: 26px;
350 | }
351 |
352 | .langchain-logo {
353 | width: 26px;
354 | height: 26px;
355 | border-radius: 8px;
356 | }
357 |
358 | .playht-logo {
359 | width: 26px;
360 | height: 26px;
361 | border-radius: 8px;
362 | }
363 |
364 | .gradio-container {
365 | border: 0px !important;
366 | margin: 0px !important;
367 | height: 100%;
368 | }
369 |
370 | .main {
371 | background: transparent;
372 | height: 100%;
373 | }
374 |
375 | .contain {
376 | height: 100%;
377 | }
378 |
379 | .wrap {
380 | height: 100%;
381 | }
382 |
383 | #component-0 {
384 | height: 100%;
385 | }
386 |
387 | #component-1 {
388 | padding: 0px;
389 | height: 100%;
390 | }
391 |
392 | #component-2 {
393 | height: 100% !important;
394 | }
395 |
396 | .footer-mobile {
397 | display: none;
398 | }
399 |
400 | .footer-desktop {
401 | display: flex;
402 | }
403 |
404 | @media screen and (max-width: 950px) {
405 | body {
406 | background: linear-gradient(to bottom, rgb(0, 0, 0), #1F2937);
407 | }
408 |
409 | .main-container {
410 | flex-direction: column;
411 | }
412 |
413 | .description-container {
414 | width: 100%;
415 | height: 100%;
416 | padding-right: 56px;
417 | }
418 |
419 | .chat-bot-container {
420 | width: 100%;
421 | height: 600px;
422 | padding: unset;
423 | padding-left: 56px;
424 | padding-right: 56px;
425 | padding-bottom: 56px;
426 | box-sizing: border-box;
427 | }
428 |
429 | .footer-desktop {
430 | display: none;
431 | }
432 |
433 | .footer-mobile {
434 | display: flex;
435 | margin-left: 56px;
436 | margin-bottom: 30px;
437 | align-items: center;
438 | }
439 |
440 | .share-now {
441 | flex-direction: column;
442 | align-items: center;
443 | gap: 6px
444 | }
445 | }
446 |
447 | @media screen and (max-width: 576px) {
448 | .description-container {
449 | padding: 32px 24px;
450 | }
451 |
452 | .chat-bot-container {
453 | padding-left: 24px;
454 | padding-right: 24px;
455 | padding-bottom: 32px;
456 | }
457 | }
458 |
459 |
460 | .tooltip {
461 | position: relative;
462 | }
463 |
464 | /* Tooltip text */
465 | .tooltip .tooltiptext {
466 | visibility: hidden;
467 | width: 120px;
468 | background-color: rgb(148, 163, 184);
469 | color: black;
470 | text-align: center;
471 | padding: 5px 5px;
472 | border-radius: 6px;
473 | position: absolute;
474 | z-index: 70;
475 | top: 40px;
476 | }
477 |
478 | /* Show the tooltip text when you mouse over the tooltip container */
479 | .tooltip:hover .tooltiptext {
480 | visibility: visible;
481 | }
482 |
483 | .about-section {
484 | color: rgba(212, 212, 212, 0.6);
485 | border-radius: 8px;
486 | border: 1px solid #1e293b;
487 | opacity: 1;
488 | padding: 8px;
489 | margin-top: 20px;
490 | width: 100%;
491 | max-width: 761px;
492 | box-sizing: border-box;
493 | }
494 |
495 | .zoom-svg {
496 | pointer-events: none;
497 | }
--------------------------------------------------------------------------------
/Imtiaz AI.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |

15 |
16 |
17 |
18 |
Midhun
19 |
20 |
21 |
22 |
23 |
24 |
My Generative AI
25 |
26 |
27 |
Imtiaz can be your All-in-One Assistant, from answering questions to engaging in casual conversations
28 |
29 |
30 |
31 |
32 |
I've learnt:
33 |
34 |
48 |
64 |
80 |
86 |
92 |
98 |
99 |
100 |
101 |
130 |
131 |
132 |
133 |
134 |
135 |
164 |
165 |
166 |
167 |
168 |
--------------------------------------------------------------------------------
/Imtiaz AI.js:
--------------------------------------------------------------------------------
1 | const socialIconButtons = document.getElementsByClassName("social-icon");
2 |
3 | function postToSocialMedia(classList) {
4 | const content = `Check out my cool generative AI Project 😎 \n${window.location.href.toString()}`;
5 | if (classList.contains("twitter")) {
6 | const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent(
7 | content
8 | )}`;
9 | window.open(url);
10 | } else if (classList.contains("linkedin")) {
11 | const url = `https://www.linkedin.com/share?text=${encodeURIComponent(
12 | content
13 | )}`;
14 | window.open(url);
15 | } else if (classList.contains("whatsapp")) {
16 | window.open(`https://api.whatsapp.com/send?text=${encodeURIComponent(content)}`);
17 | }
18 | }
19 |
20 | const addEventListenersToSocialIconButton = () => {
21 | for (let i = 0; i < socialIconButtons.length; i++) {
22 | socialIconButtons[i].addEventListener("click", () =>
23 | postToSocialMedia(socialIconButtons[i].classList)
24 | );
25 | }
26 | };
27 |
28 | addEventListenersToSocialIconButton();
29 |
30 | const skillIcon = document.getElementsByClassName("tooltip");
31 |
32 |
33 | const addEventListenersToSkillIcon = () => {
34 | for (let i = 0; i < skillIcon.length; i++) {
35 | skillIcon[i].addEventListener("click", (e) => {
36 | console.log(e.target)
37 | updateDescription(e.target.id);
38 | });
39 | }
40 | };
41 |
42 | addEventListenersToSkillIcon();
43 |
44 | const descriptionDiv = document.getElementsByClassName("about-section");
45 | const updateDescription = (id) => {
46 | let description = "";
47 |
48 | switch (id) {
49 | case "googleColab":
50 | description = "Google Colab: User-friendly platform for code writing, execution, and sharing. Beloved by AI experts, students, developers, and researchers for data analysis, ML, and AI exploration.";
51 | break;
52 | case "gradio":
53 | description = "Gradio: A user-friendly tool that allows to create and share interactive Al Apps without extensive Coding Knowledge.";
54 | break;
55 | case "openAi":
56 | description = "OpenAI: An AI-based chat service powered by Open AI's language model. OpenAI APIs offer access to advanced language models and AI capabilities. Integrate NLP, text generation, and more into your apps to revolutionize communication and problem-solving. ";
57 | break;
58 | case "playHt":
59 | description = "PlayHT: PlayHT is a platform that allows you to clone voices using artificial intelligence. The platform uses a deep learning model to train a voice clone that sounds almost exactly like the original voice.";
60 | break;
61 | case "huggingFace":
62 | description = "HuggingFace: The ultimate destination for building, training, and deploying cutting-edge machine learning models! Revolutionize your AI projects with state-of-the-art NLP and more!";
63 | break;
64 | case "langChain":
65 | description = "LangChain: Seamlessly combine Large Language Models (LLMs) with external computation/data. Build chatbots, analyze data effortlessly. Open source for contributions.";
66 | break;
67 | default:
68 | description = "Description of the selected icon will appear here.";
69 | }
70 | for (let i = 0; i < descriptionDiv.length; i++) {
71 | descriptionDiv[i].textContent = description;
72 | }
73 | };
74 |
75 | updateDescription("googleColab");
--------------------------------------------------------------------------------
/MidhunChatBotWithOpenAIAndLangChain.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "VclINVmUGsb1"
7 | },
8 | "source": [
9 | "**How to get Open AI API Key?**\n",
10 | "- Go to https://platform.openai.com/account/api-keys\n",
11 | "- Create a new Secret Key\n",
12 | "- Copy the Secret Key for your use."
13 | ]
14 | },
15 | {
16 | "cell_type": "code",
17 | "execution_count": null,
18 | "metadata": {
19 | "colab": {
20 | "background_save": true,
21 | "base_uri": "https://localhost:8080/"
22 | },
23 | "collapsed": true,
24 | "id": "SPyLmKojGGwP",
25 | "outputId": "f8d98047-093a-4284-d18e-ee9b14999667"
26 | },
27 | "outputs": [
28 | {
29 | "name": "stdout",
30 | "output_type": "stream",
31 | "text": [
32 | "Requirement already satisfied: langchain in /usr/local/lib/python3.11/dist-packages (0.3.25)\n",
33 | "Requirement already satisfied: langchain-core<1.0.0,>=0.3.58 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.59)\n",
34 | "Requirement already satisfied: langchain-text-splitters<1.0.0,>=0.3.8 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.8)\n",
35 | "Requirement already satisfied: langsmith<0.4,>=0.1.17 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.42)\n",
36 | "Requirement already satisfied: pydantic<3.0.0,>=2.7.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.11.4)\n",
37 | "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.0.40)\n",
38 | "Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.32.3)\n",
39 | "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.11/dist-packages (from langchain) (6.0.2)\n",
40 | "Requirement already satisfied: tenacity!=8.4.0,<10.0.0,>=8.1.0 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.58->langchain) (9.1.2)\n",
41 | "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.58->langchain) (1.33)\n",
42 | "Requirement already satisfied: packaging<25,>=23.2 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.58->langchain) (24.2)\n",
43 | "Requirement already satisfied: typing-extensions>=4.7 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.58->langchain) (4.13.2)\n",
44 | "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (0.28.1)\n",
45 | "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (3.10.18)\n",
46 | "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (1.0.0)\n",
47 | "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (0.23.0)\n",
48 | "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (0.7.0)\n",
49 | "Requirement already satisfied: pydantic-core==2.33.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (2.33.2)\n",
50 | "Requirement already satisfied: typing-inspection>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (0.4.0)\n",
51 | "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.4.2)\n",
52 | "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.10)\n",
53 | "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (2.4.0)\n",
54 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (2025.4.26)\n",
55 | "Requirement already satisfied: greenlet>=1 in /usr/local/lib/python3.11/dist-packages (from SQLAlchemy<3,>=1.4->langchain) (3.2.1)\n",
56 | "Requirement already satisfied: anyio in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (4.9.0)\n",
57 | "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (1.0.9)\n",
58 | "Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (0.16.0)\n",
59 | "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.11/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<1.0.0,>=0.3.58->langchain) (3.0.0)\n",
60 | "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.17->langchain) (1.3.1)\n",
61 | "Requirement already satisfied: openai in /usr/local/lib/python3.11/dist-packages (1.77.0)\n",
62 | "Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.11/dist-packages (from openai) (4.9.0)\n",
63 | "Requirement already satisfied: distro<2,>=1.7.0 in /usr/local/lib/python3.11/dist-packages (from openai) (1.9.0)\n",
64 | "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from openai) (0.28.1)\n",
65 | "Requirement already satisfied: jiter<1,>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from openai) (0.9.0)\n",
66 | "Requirement already satisfied: pydantic<3,>=1.9.0 in /usr/local/lib/python3.11/dist-packages (from openai) (2.11.4)\n",
67 | "Requirement already satisfied: sniffio in /usr/local/lib/python3.11/dist-packages (from openai) (1.3.1)\n",
68 | "Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.11/dist-packages (from openai) (4.67.1)\n",
69 | "Requirement already satisfied: typing-extensions<5,>=4.11 in /usr/local/lib/python3.11/dist-packages (from openai) (4.13.2)\n",
70 | "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.11/dist-packages (from anyio<5,>=3.5.0->openai) (3.10)\n",
71 | "Requirement already satisfied: certifi in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->openai) (2025.4.26)\n",
72 | "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->openai) (1.0.9)\n",
73 | "Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai) (0.16.0)\n",
74 | "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3,>=1.9.0->openai) (0.7.0)\n",
75 | "Requirement already satisfied: pydantic-core==2.33.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<3,>=1.9.0->openai) (2.33.2)\n",
76 | "Requirement already satisfied: typing-inspection>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3,>=1.9.0->openai) (0.4.0)\n",
77 | "Collecting gradio\n",
78 | " Downloading gradio-5.29.0-py3-none-any.whl.metadata (16 kB)\n",
79 | "Collecting aiofiles<25.0,>=22.0 (from gradio)\n",
80 | " Downloading aiofiles-24.1.0-py3-none-any.whl.metadata (10 kB)\n",
81 | "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (4.9.0)\n",
82 | "Collecting fastapi<1.0,>=0.115.2 (from gradio)\n",
83 | " Downloading fastapi-0.115.12-py3-none-any.whl.metadata (27 kB)\n",
84 | "Collecting ffmpy (from gradio)\n",
85 | " Downloading ffmpy-0.5.0-py3-none-any.whl.metadata (3.0 kB)\n",
86 | "Collecting gradio-client==1.10.0 (from gradio)\n",
87 | " Downloading gradio_client-1.10.0-py3-none-any.whl.metadata (7.1 kB)\n",
88 | "Collecting groovy~=0.1 (from gradio)\n",
89 | " Downloading groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB)\n",
90 | "Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.28.1)\n",
91 | "Requirement already satisfied: huggingface-hub>=0.28.1 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.31.1)\n",
92 | "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.1.6)\n",
93 | "Requirement already satisfied: markupsafe<4.0,>=2.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.0.2)\n",
94 | "Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.0.2)\n",
95 | "Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (3.10.18)\n",
96 | "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from gradio) (24.2)\n",
97 | "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.2.2)\n",
98 | "Requirement already satisfied: pillow<12.0,>=8.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (11.2.1)\n",
99 | "Requirement already satisfied: pydantic<2.12,>=2.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (2.11.4)\n",
100 | "Collecting pydub (from gradio)\n",
101 | " Downloading pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n",
102 | "Collecting python-multipart>=0.0.18 (from gradio)\n",
103 | " Downloading python_multipart-0.0.20-py3-none-any.whl.metadata (1.8 kB)\n",
104 | "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (6.0.2)\n",
105 | "Collecting ruff>=0.9.3 (from gradio)\n",
106 | " Downloading ruff-0.11.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (25 kB)\n",
107 | "Collecting safehttpx<0.2.0,>=0.1.6 (from gradio)\n",
108 | " Downloading safehttpx-0.1.6-py3-none-any.whl.metadata (4.2 kB)\n",
109 | "Collecting semantic-version~=2.0 (from gradio)\n",
110 | " Downloading semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n",
111 | "Collecting starlette<1.0,>=0.40.0 (from gradio)\n",
112 | " Downloading starlette-0.46.2-py3-none-any.whl.metadata (6.2 kB)\n",
113 | "Collecting tomlkit<0.14.0,>=0.12.0 (from gradio)\n",
114 | " Downloading tomlkit-0.13.2-py3-none-any.whl.metadata (2.7 kB)\n",
115 | "Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.11/dist-packages (from gradio) (0.15.3)\n",
116 | "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.11/dist-packages (from gradio) (4.13.2)\n",
117 | "Collecting uvicorn>=0.14.0 (from gradio)\n",
118 | " Downloading uvicorn-0.34.2-py3-none-any.whl.metadata (6.5 kB)\n",
119 | "Requirement already satisfied: fsspec in /usr/local/lib/python3.11/dist-packages (from gradio-client==1.10.0->gradio) (2025.3.2)\n",
120 | "Requirement already satisfied: websockets<16.0,>=10.0 in /usr/local/lib/python3.11/dist-packages (from gradio-client==1.10.0->gradio) (15.0.1)\n",
121 | "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.11/dist-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n",
122 | "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
123 | "Requirement already satisfied: certifi in /usr/local/lib/python3.11/dist-packages (from httpx>=0.24.1->gradio) (2025.4.26)\n",
124 | "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx>=0.24.1->gradio) (1.0.9)\n",
125 | "Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.16.0)\n",
126 | "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (3.18.0)\n",
127 | "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (2.32.3)\n",
128 | "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (4.67.1)\n",
129 | "Requirement already satisfied: hf-xet<2.0.0,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.1->gradio) (1.1.0)\n",
130 | "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2.9.0.post0)\n",
131 | "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2025.2)\n",
132 | "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas<3.0,>=1.0->gradio) (2025.2)\n",
133 | "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<2.12,>=2.0->gradio) (0.7.0)\n",
134 | "Requirement already satisfied: pydantic-core==2.33.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<2.12,>=2.0->gradio) (2.33.2)\n",
135 | "Requirement already satisfied: typing-inspection>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<2.12,>=2.0->gradio) (0.4.0)\n",
136 | "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.8)\n",
137 | "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
138 | "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.11/dist-packages (from typer<1.0,>=0.12->gradio) (13.9.4)\n",
139 | "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.17.0)\n",
140 | "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.11/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
141 | "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.19.1)\n",
142 | "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface-hub>=0.28.1->gradio) (3.4.2)\n",
143 | "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface-hub>=0.28.1->gradio) (2.4.0)\n",
144 | "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.11/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
145 | "Downloading gradio-5.29.0-py3-none-any.whl (54.1 MB)\n",
146 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.1/54.1 MB\u001b[0m \u001b[31m15.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
147 | "\u001b[?25hDownloading gradio_client-1.10.0-py3-none-any.whl (322 kB)\n",
148 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m322.9/322.9 kB\u001b[0m \u001b[31m24.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
149 | "\u001b[?25hDownloading aiofiles-24.1.0-py3-none-any.whl (15 kB)\n",
150 | "Downloading fastapi-0.115.12-py3-none-any.whl (95 kB)\n",
151 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m95.2/95.2 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
152 | "\u001b[?25hDownloading groovy-0.1.2-py3-none-any.whl (14 kB)\n",
153 | "Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)\n",
154 | "Downloading ruff-0.11.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)\n",
155 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m11.5/11.5 MB\u001b[0m \u001b[31m96.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
156 | "\u001b[?25hDownloading safehttpx-0.1.6-py3-none-any.whl (8.7 kB)\n",
157 | "Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
158 | "Downloading starlette-0.46.2-py3-none-any.whl (72 kB)\n",
159 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.0/72.0 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
160 | "\u001b[?25hDownloading tomlkit-0.13.2-py3-none-any.whl (37 kB)\n",
161 | "Downloading uvicorn-0.34.2-py3-none-any.whl (62 kB)\n",
162 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
163 | "\u001b[?25hDownloading ffmpy-0.5.0-py3-none-any.whl (6.0 kB)\n",
164 | "Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
165 | "Installing collected packages: pydub, uvicorn, tomlkit, semantic-version, ruff, python-multipart, groovy, ffmpy, aiofiles, starlette, safehttpx, gradio-client, fastapi, gradio\n",
166 | "Successfully installed aiofiles-24.1.0 fastapi-0.115.12 ffmpy-0.5.0 gradio-5.29.0 gradio-client-1.10.0 groovy-0.1.2 pydub-0.25.1 python-multipart-0.0.20 ruff-0.11.9 safehttpx-0.1.6 semantic-version-2.10.0 starlette-0.46.2 tomlkit-0.13.2 uvicorn-0.34.2\n",
167 | "Collecting langchain_community\n",
168 | " Downloading langchain_community-0.3.24-py3-none-any.whl.metadata (2.5 kB)\n",
169 | "Requirement already satisfied: langchain-core<1.0.0,>=0.3.59 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (0.3.59)\n",
170 | "Requirement already satisfied: langchain<1.0.0,>=0.3.25 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (0.3.25)\n",
171 | "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (2.0.40)\n",
172 | "Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (2.32.3)\n",
173 | "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (6.0.2)\n",
174 | "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (3.11.15)\n",
175 | "Requirement already satisfied: tenacity!=8.4.0,<10,>=8.1.0 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (9.1.2)\n",
176 | "Collecting dataclasses-json<0.7,>=0.5.7 (from langchain_community)\n",
177 | " Downloading dataclasses_json-0.6.7-py3-none-any.whl.metadata (25 kB)\n",
178 | "Collecting pydantic-settings<3.0.0,>=2.4.0 (from langchain_community)\n",
179 | " Downloading pydantic_settings-2.9.1-py3-none-any.whl.metadata (3.8 kB)\n",
180 | "Requirement already satisfied: langsmith<0.4,>=0.1.125 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (0.3.42)\n",
181 | "Collecting httpx-sse<1.0.0,>=0.4.0 (from langchain_community)\n",
182 | " Downloading httpx_sse-0.4.0-py3-none-any.whl.metadata (9.0 kB)\n",
183 | "Requirement already satisfied: numpy>=1.26.2 in /usr/local/lib/python3.11/dist-packages (from langchain_community) (2.0.2)\n",
184 | "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (2.6.1)\n",
185 | "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (1.3.2)\n",
186 | "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (25.3.0)\n",
187 | "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (1.6.0)\n",
188 | "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (6.4.3)\n",
189 | "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (0.3.1)\n",
190 | "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain_community) (1.20.0)\n",
191 | "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7,>=0.5.7->langchain_community)\n",
192 | " Downloading marshmallow-3.26.1-py3-none-any.whl.metadata (7.3 kB)\n",
193 | "Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.7,>=0.5.7->langchain_community)\n",
194 | " Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)\n",
195 | "Requirement already satisfied: langchain-text-splitters<1.0.0,>=0.3.8 in /usr/local/lib/python3.11/dist-packages (from langchain<1.0.0,>=0.3.25->langchain_community) (0.3.8)\n",
196 | "Requirement already satisfied: pydantic<3.0.0,>=2.7.4 in /usr/local/lib/python3.11/dist-packages (from langchain<1.0.0,>=0.3.25->langchain_community) (2.11.4)\n",
197 | "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.59->langchain_community) (1.33)\n",
198 | "Requirement already satisfied: packaging<25,>=23.2 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.59->langchain_community) (24.2)\n",
199 | "Requirement already satisfied: typing-extensions>=4.7 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.59->langchain_community) (4.13.2)\n",
200 | "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.125->langchain_community) (0.28.1)\n",
201 | "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.125->langchain_community) (3.10.18)\n",
202 | "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.125->langchain_community) (1.0.0)\n",
203 | "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.125->langchain_community) (0.23.0)\n",
204 | "Collecting python-dotenv>=0.21.0 (from pydantic-settings<3.0.0,>=2.4.0->langchain_community)\n",
205 | " Downloading python_dotenv-1.1.0-py3-none-any.whl.metadata (24 kB)\n",
206 | "Requirement already satisfied: typing-inspection>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from pydantic-settings<3.0.0,>=2.4.0->langchain_community) (0.4.0)\n",
207 | "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain_community) (3.4.2)\n",
208 | "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain_community) (3.10)\n",
209 | "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain_community) (2.4.0)\n",
210 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain_community) (2025.4.26)\n",
211 | "Requirement already satisfied: greenlet>=1 in /usr/local/lib/python3.11/dist-packages (from SQLAlchemy<3,>=1.4->langchain_community) (3.2.1)\n",
212 | "Requirement already satisfied: anyio in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.125->langchain_community) (4.9.0)\n",
213 | "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.23.0->langsmith<0.4,>=0.1.125->langchain_community) (1.0.9)\n",
214 | "Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.125->langchain_community) (0.16.0)\n",
215 | "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.11/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<1.0.0,>=0.3.59->langchain_community) (3.0.0)\n",
216 | "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain<1.0.0,>=0.3.25->langchain_community) (0.7.0)\n",
217 | "Requirement already satisfied: pydantic-core==2.33.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain<1.0.0,>=0.3.25->langchain_community) (2.33.2)\n",
218 | "Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain_community)\n",
219 | " Downloading mypy_extensions-1.1.0-py3-none-any.whl.metadata (1.1 kB)\n",
220 | "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.11/dist-packages (from anyio->httpx<1,>=0.23.0->langsmith<0.4,>=0.1.125->langchain_community) (1.3.1)\n",
221 | "Downloading langchain_community-0.3.24-py3-none-any.whl (2.5 MB)\n",
222 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.5/2.5 MB\u001b[0m \u001b[31m53.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
223 | "\u001b[?25hDownloading dataclasses_json-0.6.7-py3-none-any.whl (28 kB)\n",
224 | "Downloading httpx_sse-0.4.0-py3-none-any.whl (7.8 kB)\n",
225 | "Downloading pydantic_settings-2.9.1-py3-none-any.whl (44 kB)\n",
226 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.4/44.4 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
227 | "\u001b[?25hDownloading marshmallow-3.26.1-py3-none-any.whl (50 kB)\n",
228 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.9/50.9 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
229 | "\u001b[?25hDownloading python_dotenv-1.1.0-py3-none-any.whl (20 kB)\n",
230 | "Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n",
231 | "Downloading mypy_extensions-1.1.0-py3-none-any.whl (5.0 kB)\n",
232 | "Installing collected packages: python-dotenv, mypy-extensions, marshmallow, httpx-sse, typing-inspect, pydantic-settings, dataclasses-json, langchain_community\n",
233 | "Successfully installed dataclasses-json-0.6.7 httpx-sse-0.4.0 langchain_community-0.3.24 marshmallow-3.26.1 mypy-extensions-1.1.0 pydantic-settings-2.9.1 python-dotenv-1.1.0 typing-inspect-0.9.0\n",
234 | "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.11/dist-packages (0.31.1)\n",
235 | "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (3.18.0)\n",
236 | "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (2025.3.2)\n",
237 | "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (24.2)\n",
238 | "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (6.0.2)\n",
239 | "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (2.32.3)\n",
240 | "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (4.67.1)\n",
241 | "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (4.13.2)\n",
242 | "Requirement already satisfied: hf-xet<2.0.0,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from huggingface_hub) (1.1.0)\n",
243 | "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface_hub) (3.4.2)\n",
244 | "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface_hub) (3.10)\n",
245 | "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface_hub) (2.4.0)\n",
246 | "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->huggingface_hub) (2025.4.26)\n"
247 | ]
248 | }
249 | ],
250 | "source": [
251 | "!pip install langchain\n",
252 | "!pip install openai\n",
253 | "!pip install gradio\n",
254 | "!pip install langchain_community\n",
255 | "!pip install huggingface_hub"
256 | ]
257 | },
258 | {
259 | "cell_type": "markdown",
260 | "metadata": {
261 | "id": "JhO7eYfNRGU6"
262 | },
263 | "source": [
264 | "\n",
265 | "- Similar to Open AI Mondel we can also use HuggingFace Transformer Models.\n",
266 | "- Reference links: https://python.langchain.com/docs/integrations/providers/huggingface , https://python.langchain.com/docs/integrations/llms/huggingface_hub.html\n",
267 | "\n"
268 | ]
269 | },
270 | {
271 | "cell_type": "code",
272 | "execution_count": 2,
273 | "metadata": {
274 | "id": "OJfjEJbwGmbI"
275 | },
276 | "outputs": [],
277 | "source": [
278 | "import os\n",
279 | "import gradio as gr\n",
280 | "from langchain.chat_models import ChatOpenAI\n",
281 | "from langchain import LLMChain, PromptTemplate\n",
282 | "from langchain.memory import ConversationBufferMemory"
283 | ]
284 | },
285 | {
286 | "cell_type": "code",
287 | "execution_count": 15,
288 | "metadata": {
289 | "id": "fci9byLAGrW6"
290 | },
291 | "outputs": [],
292 | "source": [
293 | "prompt = PromptTemplate(\n",
294 | " input_variables=[\"chat_history\", \"user_message\"], template=template\n",
295 | ")\n",
296 | "\n",
297 | "OPENAI_API_KEY=\"sk-proj-VYbXhlRkAJ0tVUQU0UXST3BlbkFJbbA8flEhAzuQY27WulAJ\"\n",
298 | "os.environ[\"OPENAI_API_KEY\"] = OPENAI_API_KEY"
299 | ]
300 | },
301 | {
302 | "cell_type": "markdown",
303 | "metadata": {
304 | "id": "Zml50BCveTWy"
305 | },
306 | "source": []
307 | },
308 | {
309 | "cell_type": "code",
310 | "execution_count": 16,
311 | "metadata": {
312 | "colab": {
313 | "base_uri": "https://localhost:8080/"
314 | },
315 | "id": "IdEV6hMJG4xt",
316 | "outputId": "2ad842cf-c92d-4f03-dc08-0c12b8935683"
317 | },
318 | "outputs": [
319 | {
320 | "output_type": "stream",
321 | "name": "stderr",
322 | "text": [
323 | ":1: LangChainDeprecationWarning: The class `LLMChain` was deprecated in LangChain 0.1.17 and will be removed in 1.0. Use :meth:`~RunnableSequence, e.g., `prompt | llm`` instead.\n",
324 | " llm_chain = LLMChain(\n"
325 | ]
326 | }
327 | ],
328 | "source": [
329 | "llm_chain = LLMChain(\n",
330 | " llm=ChatOpenAI(temperature='0.5', model_name=\"gpt-3.5-turbo\"),\n",
331 | " prompt=prompt,\n",
332 | " verbose=True,\n",
333 | " memory=memory,\n",
334 | ")"
335 | ]
336 | },
337 | {
338 | "cell_type": "code",
339 | "execution_count": 5,
340 | "metadata": {
341 | "id": "Wl77cfyIG85T"
342 | },
343 | "outputs": [],
344 | "source": [
345 | "def get_text_response(user_message,history):\n",
346 | " response = llm_chain.predict(user_message = user_message)\n",
347 | " return response"
348 | ]
349 | },
350 | {
351 | "cell_type": "code",
352 | "execution_count": 6,
353 | "metadata": {
354 | "id": "0JxyOMt_HAr-",
355 | "colab": {
356 | "base_uri": "https://localhost:8080/"
357 | },
358 | "outputId": "4ba2a159-0eb9-48a0-f62e-e19c43511555"
359 | },
360 | "outputs": [
361 | {
362 | "output_type": "stream",
363 | "name": "stderr",
364 | "text": [
365 | "/usr/local/lib/python3.11/dist-packages/gradio/chat_interface.py:338: UserWarning: The 'tuples' format for chatbot messages is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style 'role' and 'content' keys.\n",
366 | " self.chatbot = Chatbot(\n"
367 | ]
368 | }
369 | ],
370 | "source": [
371 | "demo = gr.ChatInterface(get_text_response, examples=[\"How are you doing?\",\"What are your interests?\",\"Sugest me a movie ?\"])"
372 | ]
373 | },
374 | {
375 | "cell_type": "code",
376 | "execution_count": 7,
377 | "metadata": {
378 | "colab": {
379 | "base_uri": "https://localhost:8080/",
380 | "height": 652
381 | },
382 | "id": "sWVT_2_KHE2G",
383 | "outputId": "71743f99-1386-4b44-f2e4-769b87bf8f50"
384 | },
385 | "outputs": [
386 | {
387 | "output_type": "stream",
388 | "name": "stdout",
389 | "text": [
390 | "It looks like you are running Gradio on a hosted a Jupyter notebook. For the Gradio app to work, sharing must be enabled. Automatically setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
391 | "\n",
392 | "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
393 | "* Running on public URL: https://1e968b4100df9cb371.gradio.live\n",
394 | "\n",
395 | "This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
396 | ]
397 | },
398 | {
399 | "output_type": "display_data",
400 | "data": {
401 | "text/plain": [
402 | ""
403 | ],
404 | "text/html": [
405 | ""
406 | ]
407 | },
408 | "metadata": {}
409 | }
410 | ],
411 | "source": [
412 | "if __name__ == \"__main__\":\n",
413 | " demo.launch() #To create a public link, set `share=True` in `launch()`. To enable errors and logs, set `debug=True` in `launch()`."
414 | ]
415 | },
416 | {
417 | "cell_type": "code",
418 | "execution_count": 8,
419 | "metadata": {
420 | "id": "PvYWPZnSQr02"
421 | },
422 | "outputs": [],
423 | "source": [
424 | "# from langchain.llms import HuggingFacePipeline\n",
425 | "# hf = HuggingFacePipeline.from_model_id(\n",
426 | "# model_id=\"gpt2\",\n",
427 | "# task=\"text-generation\",)"
428 | ]
429 | },
430 | {
431 | "cell_type": "markdown",
432 | "metadata": {
433 | "id": "YLLzAlLeIlcF"
434 | },
435 | "source": [
436 | "##**Publishing your code to Hugging Face**"
437 | ]
438 | },
439 | {
440 | "cell_type": "code",
441 | "execution_count": 9,
442 | "metadata": {
443 | "colab": {
444 | "base_uri": "https://localhost:8080/",
445 | "height": 17,
446 | "referenced_widgets": [
447 | "bd8106806d464e5183e311e09699846c",
448 | "cb65d541529a4ad6a8e36fc7ec88f010",
449 | "f42943748e8b4f82ba83e3f721b51c83",
450 | "b2cc398ac807455783a1053f61ef2259",
451 | "d4fae658ed8b442eaa3f1cf33f5a88e4",
452 | "a7d649c94b9343d6947cddd5952c2db5",
453 | "be0f1f22977e44f7aaa194bb3d737e64",
454 | "dbae5684e6ab458084eaf9f7695d0fdd",
455 | "5af7ca76465241019143dbb17e99513c",
456 | "6deec8f8a2de44e3a62bd6356bb4fdec",
457 | "472410f35448465c9bc787e0c82bd315",
458 | "4b976127614747d28f0442d5367406f8",
459 | "e3ef3b20c8ee47b680a3f9ce01abf962",
460 | "87bf66460f53462eaa4ff30f6cb4c280",
461 | "dafe404f90534606856f0487536a5d37",
462 | "0f49d71a741b4e65af9404a56510feb2",
463 | "8bc4dec4cd20432eba64801a3c15f559",
464 | "35f112028a294be69003137a861dee96",
465 | "e11b74b42e83459c99bf36f44d3ece60",
466 | "2c2f55ba80ac465b999db3027cdbed5e"
467 | ]
468 | },
469 | "id": "ZmFkrSfFI2hv",
470 | "outputId": "7b43675c-7d90-4fda-f7c6-51bc240a7b83"
471 | },
472 | "outputs": [
473 | {
474 | "output_type": "display_data",
475 | "data": {
476 | "text/plain": [
477 | "VBox(children=(HTML(value='
:10: LangChainDeprecationWarning: Please see the migration guide at: https://python.langchain.com/docs/versions/migrating_memory/\n",
510 | " memory = ConversationBufferMemory(memory_key=\"chat_history\")\n"
511 | ]
512 | }
513 | ],
514 | "source": [
515 | "template = \"\"\"Meet Imtiaz, your youthful and witty personal assistant! At 20 years old, he's full of energy and always eager to help. Imtiaz's goal is to assist you with any questions or problems you might have. His enthusiasm shines through in every response, making interactions with his enjoyable and engaging...\n",
516 | "{chat_history}\n",
517 | "User: {user_message}\n",
518 | "Chatbot:\"\"\"\n",
519 | "\n",
520 | "prompt = PromptTemplate(\n",
521 | " input_variables=[\"chat_history\", \"user_message\"], template=template\n",
522 | ")\n",
523 | "\n",
524 | "memory = ConversationBufferMemory(memory_key=\"chat_history\")"
525 | ]
526 | },
527 | {
528 | "cell_type": "code",
529 | "execution_count": 11,
530 | "metadata": {
531 | "id": "3ijRWEjlI8NI"
532 | },
533 | "outputs": [],
534 | "source": [
535 | "from huggingface_hub import HfApi\n",
536 | "api = HfApi()"
537 | ]
538 | },
539 | {
540 | "cell_type": "code",
541 | "execution_count": 12,
542 | "metadata": {
543 | "id": "zPcVNQxpJBT7"
544 | },
545 | "outputs": [],
546 | "source": [
547 | "HUGGING_FACE_REPO_ID = \"Imtiaz404/MyFirstGenAI\""
548 | ]
549 | },
550 | {
551 | "cell_type": "markdown",
552 | "metadata": {
553 | "id": "Jc4apOwzTzYS"
554 | },
555 | "source": [
556 | "**Adding Secret Variables in Hugging Face Account:**\n",
557 | "\n",
558 | "- Open your Space\n",
559 | "- Click on Settings Button\n",
560 | "- Checkout to **Variables and secrets** section\n",
561 | "- Create New Secrets"
562 | ]
563 | },
564 | {
565 | "cell_type": "markdown",
566 | "metadata": {
567 | "id": "LAj6X5xwJWGh"
568 | },
569 | "source": [
570 | "*Note*: Make sure to add your **OPENAI_API_KEY** in Secret key"
571 | ]
572 | },
573 | {
574 | "cell_type": "code",
575 | "execution_count": 13,
576 | "metadata": {
577 | "colab": {
578 | "base_uri": "https://localhost:8080/"
579 | },
580 | "id": "d9LOTbYubojs",
581 | "outputId": "824ef743-94fd-4f70-b5cd-bcf261a7d4d3"
582 | },
583 | "outputs": [
584 | {
585 | "output_type": "stream",
586 | "name": "stdout",
587 | "text": [
588 | "--2025-05-13 03:41:01-- https://s3.ap-south-1.amazonaws.com/cdn1.ccbp.in/GenAI-Workshop/ChatBotWithOpenAIAndLangChain/app.py\n",
589 | "Resolving s3.ap-south-1.amazonaws.com (s3.ap-south-1.amazonaws.com)... 52.219.160.169, 3.5.210.130, 16.12.36.61, ...\n",
590 | "Connecting to s3.ap-south-1.amazonaws.com (s3.ap-south-1.amazonaws.com)|52.219.160.169|:443... connected.\n",
591 | "HTTP request sent, awaiting response... 200 OK\n",
592 | "Length: 984 [text/x-python]\n",
593 | "Saving to: ‘/content/ChatBotWithOpenAI/app.py’\n",
594 | "\n",
595 | "app.py 100%[===================>] 984 --.-KB/s in 0s \n",
596 | "\n",
597 | "2025-05-13 03:41:02 (35.7 MB/s) - ‘/content/ChatBotWithOpenAI/app.py’ saved [984/984]\n",
598 | "\n",
599 | "--2025-05-13 03:41:02-- https://s3.ap-south-1.amazonaws.com/cdn1.ccbp.in/GenAI-Workshop/ChatBotWithOpenAIAndLangChain/requirements.txt\n",
600 | "Resolving s3.ap-south-1.amazonaws.com (s3.ap-south-1.amazonaws.com)... 52.219.160.169, 3.5.210.130, 16.12.36.61, ...\n",
601 | "Connecting to s3.ap-south-1.amazonaws.com (s3.ap-south-1.amazonaws.com)|52.219.160.169|:443... connected.\n",
602 | "HTTP request sent, awaiting response... 200 OK\n",
603 | "Length: 16 [text/plain]\n",
604 | "Saving to: ‘/content/ChatBotWithOpenAI/requirements.txt’\n",
605 | "\n",
606 | "requirements.txt 100%[===================>] 16 --.-KB/s in 0s \n",
607 | "\n",
608 | "2025-05-13 03:41:03 (392 KB/s) - ‘/content/ChatBotWithOpenAI/requirements.txt’ saved [16/16]\n",
609 | "\n"
610 | ]
611 | }
612 | ],
613 | "source": [
614 | "%mkdir /content/ChatBotWithOpenAI\n",
615 | "!wget -P /content/ChatBotWithOpenAI/ https://s3.ap-south-1.amazonaws.com/cdn1.ccbp.in/GenAI-Workshop/ChatBotWithOpenAIAndLangChain/app.py\n",
616 | "!wget -P /content/ChatBotWithOpenAI/ https://s3.ap-south-1.amazonaws.com/cdn1.ccbp.in/GenAI-Workshop/ChatBotWithOpenAIAndLangChain/requirements.txt"
617 | ]
618 | },
619 | {
620 | "cell_type": "code",
621 | "execution_count": 14,
622 | "metadata": {
623 | "colab": {
624 | "base_uri": "https://localhost:8080/",
625 | "height": 274
626 | },
627 | "id": "nF-XF-_gJF8g",
628 | "outputId": "42d3fde3-cfdf-4812-cdf2-97ec0649f231"
629 | },
630 | "outputs": [
631 | {
632 | "output_type": "stream",
633 | "name": "stdout",
634 | "text": [
635 | "/content/ChatBotWithOpenAI\n"
636 | ]
637 | },
638 | {
639 | "output_type": "stream",
640 | "name": "stderr",
641 | "text": [
642 | "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
643 | "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
644 | "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
645 | "You will be able to reuse this secret in all of your notebooks.\n",
646 | "Please note that authentication is recommended but still optional to access public models or datasets.\n",
647 | " warnings.warn(\n",
648 | "No files have been modified since last commit. Skipping to prevent empty commit.\n",
649 | "WARNING:huggingface_hub.hf_api:No files have been modified since last commit. Skipping to prevent empty commit.\n",
650 | "No files have been modified since last commit. Skipping to prevent empty commit.\n",
651 | "WARNING:huggingface_hub.hf_api:No files have been modified since last commit. Skipping to prevent empty commit.\n"
652 | ]
653 | },
654 | {
655 | "output_type": "execute_result",
656 | "data": {
657 | "text/plain": [
658 | "CommitInfo(commit_url='https://huggingface.co/spaces/Imtiaz404/MyFirstGenAI/commit/411f0bada5e3bb71aafbed16ff4e4429bc9b9e0f', commit_message='Upload app.py with huggingface_hub', commit_description='', oid='411f0bada5e3bb71aafbed16ff4e4429bc9b9e0f', pr_url=None, repo_url=RepoUrl('https://huggingface.co/spaces/Imtiaz404/MyFirstGenAI', endpoint='https://huggingface.co', repo_type='space', repo_id='Imtiaz404/MyFirstGenAI'), pr_revision=None, pr_num=None)"
659 | ],
660 | "application/vnd.google.colaboratory.intrinsic+json": {
661 | "type": "string"
662 | }
663 | },
664 | "metadata": {},
665 | "execution_count": 14
666 | }
667 | ],
668 | "source": [
669 | "%cd /content/ChatBotWithOpenAI\n",
670 | "\n",
671 | "api.upload_file(\n",
672 | " path_or_fileobj=\"./requirements.txt\",\n",
673 | " path_in_repo=\"requirements.txt\",\n",
674 | " repo_id=HUGGING_FACE_REPO_ID,\n",
675 | " repo_type=\"space\")\n",
676 | "\n",
677 | "api.upload_file(\n",
678 | " path_or_fileobj=\"./app.py\",\n",
679 | " path_in_repo=\"app.py\",\n",
680 | " repo_id=HUGGING_FACE_REPO_ID,\n",
681 | " repo_type=\"space\")"
682 | ]
683 | }
684 | ],
685 | "metadata": {
686 | "colab": {
687 | "provenance": []
688 | },
689 | "kernelspec": {
690 | "display_name": "Python 3",
691 | "name": "python3"
692 | },
693 | "language_info": {
694 | "name": "python"
695 | },
696 | "widgets": {
697 | "application/vnd.jupyter.widget-state+json": {
698 | "bd8106806d464e5183e311e09699846c": {
699 | "model_module": "@jupyter-widgets/controls",
700 | "model_name": "VBoxModel",
701 | "model_module_version": "1.5.0",
702 | "state": {
703 | "_dom_classes": [],
704 | "_model_module": "@jupyter-widgets/controls",
705 | "_model_module_version": "1.5.0",
706 | "_model_name": "VBoxModel",
707 | "_view_count": null,
708 | "_view_module": "@jupyter-widgets/controls",
709 | "_view_module_version": "1.5.0",
710 | "_view_name": "VBoxView",
711 | "box_style": "",
712 | "children": [],
713 | "layout": "IPY_MODEL_be0f1f22977e44f7aaa194bb3d737e64"
714 | }
715 | },
716 | "cb65d541529a4ad6a8e36fc7ec88f010": {
717 | "model_module": "@jupyter-widgets/controls",
718 | "model_name": "HTMLModel",
719 | "model_module_version": "1.5.0",
720 | "state": {
721 | "_dom_classes": [],
722 | "_model_module": "@jupyter-widgets/controls",
723 | "_model_module_version": "1.5.0",
724 | "_model_name": "HTMLModel",
725 | "_view_count": null,
726 | "_view_module": "@jupyter-widgets/controls",
727 | "_view_module_version": "1.5.0",
728 | "_view_name": "HTMLView",
729 | "description": "",
730 | "description_tooltip": null,
731 | "layout": "IPY_MODEL_dbae5684e6ab458084eaf9f7695d0fdd",
732 | "placeholder": "",
733 | "style": "IPY_MODEL_5af7ca76465241019143dbb17e99513c",
734 | "value": "
Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. "
735 | }
736 | },
737 | "f42943748e8b4f82ba83e3f721b51c83": {
738 | "model_module": "@jupyter-widgets/controls",
739 | "model_name": "PasswordModel",
740 | "model_module_version": "1.5.0",
741 | "state": {
742 | "_dom_classes": [],
743 | "_model_module": "@jupyter-widgets/controls",
744 | "_model_module_version": "1.5.0",
745 | "_model_name": "PasswordModel",
746 | "_view_count": null,
747 | "_view_module": "@jupyter-widgets/controls",
748 | "_view_module_version": "1.5.0",
749 | "_view_name": "PasswordView",
750 | "continuous_update": true,
751 | "description": "Token:",
752 | "description_tooltip": null,
753 | "disabled": false,
754 | "layout": "IPY_MODEL_6deec8f8a2de44e3a62bd6356bb4fdec",
755 | "placeholder": "",
756 | "style": "IPY_MODEL_472410f35448465c9bc787e0c82bd315",
757 | "value": ""
758 | }
759 | },
760 | "b2cc398ac807455783a1053f61ef2259": {
761 | "model_module": "@jupyter-widgets/controls",
762 | "model_name": "CheckboxModel",
763 | "model_module_version": "1.5.0",
764 | "state": {
765 | "_dom_classes": [],
766 | "_model_module": "@jupyter-widgets/controls",
767 | "_model_module_version": "1.5.0",
768 | "_model_name": "CheckboxModel",
769 | "_view_count": null,
770 | "_view_module": "@jupyter-widgets/controls",
771 | "_view_module_version": "1.5.0",
772 | "_view_name": "CheckboxView",
773 | "description": "Add token as git credential?",
774 | "description_tooltip": null,
775 | "disabled": false,
776 | "indent": true,
777 | "layout": "IPY_MODEL_4b976127614747d28f0442d5367406f8",
778 | "style": "IPY_MODEL_e3ef3b20c8ee47b680a3f9ce01abf962",
779 | "value": true
780 | }
781 | },
782 | "d4fae658ed8b442eaa3f1cf33f5a88e4": {
783 | "model_module": "@jupyter-widgets/controls",
784 | "model_name": "ButtonModel",
785 | "model_module_version": "1.5.0",
786 | "state": {
787 | "_dom_classes": [],
788 | "_model_module": "@jupyter-widgets/controls",
789 | "_model_module_version": "1.5.0",
790 | "_model_name": "ButtonModel",
791 | "_view_count": null,
792 | "_view_module": "@jupyter-widgets/controls",
793 | "_view_module_version": "1.5.0",
794 | "_view_name": "ButtonView",
795 | "button_style": "",
796 | "description": "Login",
797 | "disabled": false,
798 | "icon": "",
799 | "layout": "IPY_MODEL_87bf66460f53462eaa4ff30f6cb4c280",
800 | "style": "IPY_MODEL_dafe404f90534606856f0487536a5d37",
801 | "tooltip": ""
802 | }
803 | },
804 | "a7d649c94b9343d6947cddd5952c2db5": {
805 | "model_module": "@jupyter-widgets/controls",
806 | "model_name": "HTMLModel",
807 | "model_module_version": "1.5.0",
808 | "state": {
809 | "_dom_classes": [],
810 | "_model_module": "@jupyter-widgets/controls",
811 | "_model_module_version": "1.5.0",
812 | "_model_name": "HTMLModel",
813 | "_view_count": null,
814 | "_view_module": "@jupyter-widgets/controls",
815 | "_view_module_version": "1.5.0",
816 | "_view_name": "HTMLView",
817 | "description": "",
818 | "description_tooltip": null,
819 | "layout": "IPY_MODEL_0f49d71a741b4e65af9404a56510feb2",
820 | "placeholder": "",
821 | "style": "IPY_MODEL_8bc4dec4cd20432eba64801a3c15f559",
822 | "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. "
823 | }
824 | },
825 | "be0f1f22977e44f7aaa194bb3d737e64": {
826 | "model_module": "@jupyter-widgets/base",
827 | "model_name": "LayoutModel",
828 | "model_module_version": "1.2.0",
829 | "state": {
830 | "_model_module": "@jupyter-widgets/base",
831 | "_model_module_version": "1.2.0",
832 | "_model_name": "LayoutModel",
833 | "_view_count": null,
834 | "_view_module": "@jupyter-widgets/base",
835 | "_view_module_version": "1.2.0",
836 | "_view_name": "LayoutView",
837 | "align_content": null,
838 | "align_items": "center",
839 | "align_self": null,
840 | "border": null,
841 | "bottom": null,
842 | "display": "flex",
843 | "flex": null,
844 | "flex_flow": "column",
845 | "grid_area": null,
846 | "grid_auto_columns": null,
847 | "grid_auto_flow": null,
848 | "grid_auto_rows": null,
849 | "grid_column": null,
850 | "grid_gap": null,
851 | "grid_row": null,
852 | "grid_template_areas": null,
853 | "grid_template_columns": null,
854 | "grid_template_rows": null,
855 | "height": null,
856 | "justify_content": null,
857 | "justify_items": null,
858 | "left": null,
859 | "margin": null,
860 | "max_height": null,
861 | "max_width": null,
862 | "min_height": null,
863 | "min_width": null,
864 | "object_fit": null,
865 | "object_position": null,
866 | "order": null,
867 | "overflow": null,
868 | "overflow_x": null,
869 | "overflow_y": null,
870 | "padding": null,
871 | "right": null,
872 | "top": null,
873 | "visibility": null,
874 | "width": "50%"
875 | }
876 | },
877 | "dbae5684e6ab458084eaf9f7695d0fdd": {
878 | "model_module": "@jupyter-widgets/base",
879 | "model_name": "LayoutModel",
880 | "model_module_version": "1.2.0",
881 | "state": {
882 | "_model_module": "@jupyter-widgets/base",
883 | "_model_module_version": "1.2.0",
884 | "_model_name": "LayoutModel",
885 | "_view_count": null,
886 | "_view_module": "@jupyter-widgets/base",
887 | "_view_module_version": "1.2.0",
888 | "_view_name": "LayoutView",
889 | "align_content": null,
890 | "align_items": null,
891 | "align_self": null,
892 | "border": null,
893 | "bottom": null,
894 | "display": null,
895 | "flex": null,
896 | "flex_flow": null,
897 | "grid_area": null,
898 | "grid_auto_columns": null,
899 | "grid_auto_flow": null,
900 | "grid_auto_rows": null,
901 | "grid_column": null,
902 | "grid_gap": null,
903 | "grid_row": null,
904 | "grid_template_areas": null,
905 | "grid_template_columns": null,
906 | "grid_template_rows": null,
907 | "height": null,
908 | "justify_content": null,
909 | "justify_items": null,
910 | "left": null,
911 | "margin": null,
912 | "max_height": null,
913 | "max_width": null,
914 | "min_height": null,
915 | "min_width": null,
916 | "object_fit": null,
917 | "object_position": null,
918 | "order": null,
919 | "overflow": null,
920 | "overflow_x": null,
921 | "overflow_y": null,
922 | "padding": null,
923 | "right": null,
924 | "top": null,
925 | "visibility": null,
926 | "width": null
927 | }
928 | },
929 | "5af7ca76465241019143dbb17e99513c": {
930 | "model_module": "@jupyter-widgets/controls",
931 | "model_name": "DescriptionStyleModel",
932 | "model_module_version": "1.5.0",
933 | "state": {
934 | "_model_module": "@jupyter-widgets/controls",
935 | "_model_module_version": "1.5.0",
936 | "_model_name": "DescriptionStyleModel",
937 | "_view_count": null,
938 | "_view_module": "@jupyter-widgets/base",
939 | "_view_module_version": "1.2.0",
940 | "_view_name": "StyleView",
941 | "description_width": ""
942 | }
943 | },
944 | "6deec8f8a2de44e3a62bd6356bb4fdec": {
945 | "model_module": "@jupyter-widgets/base",
946 | "model_name": "LayoutModel",
947 | "model_module_version": "1.2.0",
948 | "state": {
949 | "_model_module": "@jupyter-widgets/base",
950 | "_model_module_version": "1.2.0",
951 | "_model_name": "LayoutModel",
952 | "_view_count": null,
953 | "_view_module": "@jupyter-widgets/base",
954 | "_view_module_version": "1.2.0",
955 | "_view_name": "LayoutView",
956 | "align_content": null,
957 | "align_items": null,
958 | "align_self": null,
959 | "border": null,
960 | "bottom": null,
961 | "display": null,
962 | "flex": null,
963 | "flex_flow": null,
964 | "grid_area": null,
965 | "grid_auto_columns": null,
966 | "grid_auto_flow": null,
967 | "grid_auto_rows": null,
968 | "grid_column": null,
969 | "grid_gap": null,
970 | "grid_row": null,
971 | "grid_template_areas": null,
972 | "grid_template_columns": null,
973 | "grid_template_rows": null,
974 | "height": null,
975 | "justify_content": null,
976 | "justify_items": null,
977 | "left": null,
978 | "margin": null,
979 | "max_height": null,
980 | "max_width": null,
981 | "min_height": null,
982 | "min_width": null,
983 | "object_fit": null,
984 | "object_position": null,
985 | "order": null,
986 | "overflow": null,
987 | "overflow_x": null,
988 | "overflow_y": null,
989 | "padding": null,
990 | "right": null,
991 | "top": null,
992 | "visibility": null,
993 | "width": null
994 | }
995 | },
996 | "472410f35448465c9bc787e0c82bd315": {
997 | "model_module": "@jupyter-widgets/controls",
998 | "model_name": "DescriptionStyleModel",
999 | "model_module_version": "1.5.0",
1000 | "state": {
1001 | "_model_module": "@jupyter-widgets/controls",
1002 | "_model_module_version": "1.5.0",
1003 | "_model_name": "DescriptionStyleModel",
1004 | "_view_count": null,
1005 | "_view_module": "@jupyter-widgets/base",
1006 | "_view_module_version": "1.2.0",
1007 | "_view_name": "StyleView",
1008 | "description_width": ""
1009 | }
1010 | },
1011 | "4b976127614747d28f0442d5367406f8": {
1012 | "model_module": "@jupyter-widgets/base",
1013 | "model_name": "LayoutModel",
1014 | "model_module_version": "1.2.0",
1015 | "state": {
1016 | "_model_module": "@jupyter-widgets/base",
1017 | "_model_module_version": "1.2.0",
1018 | "_model_name": "LayoutModel",
1019 | "_view_count": null,
1020 | "_view_module": "@jupyter-widgets/base",
1021 | "_view_module_version": "1.2.0",
1022 | "_view_name": "LayoutView",
1023 | "align_content": null,
1024 | "align_items": null,
1025 | "align_self": null,
1026 | "border": null,
1027 | "bottom": null,
1028 | "display": null,
1029 | "flex": null,
1030 | "flex_flow": null,
1031 | "grid_area": null,
1032 | "grid_auto_columns": null,
1033 | "grid_auto_flow": null,
1034 | "grid_auto_rows": null,
1035 | "grid_column": null,
1036 | "grid_gap": null,
1037 | "grid_row": null,
1038 | "grid_template_areas": null,
1039 | "grid_template_columns": null,
1040 | "grid_template_rows": null,
1041 | "height": null,
1042 | "justify_content": null,
1043 | "justify_items": null,
1044 | "left": null,
1045 | "margin": null,
1046 | "max_height": null,
1047 | "max_width": null,
1048 | "min_height": null,
1049 | "min_width": null,
1050 | "object_fit": null,
1051 | "object_position": null,
1052 | "order": null,
1053 | "overflow": null,
1054 | "overflow_x": null,
1055 | "overflow_y": null,
1056 | "padding": null,
1057 | "right": null,
1058 | "top": null,
1059 | "visibility": null,
1060 | "width": null
1061 | }
1062 | },
1063 | "e3ef3b20c8ee47b680a3f9ce01abf962": {
1064 | "model_module": "@jupyter-widgets/controls",
1065 | "model_name": "DescriptionStyleModel",
1066 | "model_module_version": "1.5.0",
1067 | "state": {
1068 | "_model_module": "@jupyter-widgets/controls",
1069 | "_model_module_version": "1.5.0",
1070 | "_model_name": "DescriptionStyleModel",
1071 | "_view_count": null,
1072 | "_view_module": "@jupyter-widgets/base",
1073 | "_view_module_version": "1.2.0",
1074 | "_view_name": "StyleView",
1075 | "description_width": ""
1076 | }
1077 | },
1078 | "87bf66460f53462eaa4ff30f6cb4c280": {
1079 | "model_module": "@jupyter-widgets/base",
1080 | "model_name": "LayoutModel",
1081 | "model_module_version": "1.2.0",
1082 | "state": {
1083 | "_model_module": "@jupyter-widgets/base",
1084 | "_model_module_version": "1.2.0",
1085 | "_model_name": "LayoutModel",
1086 | "_view_count": null,
1087 | "_view_module": "@jupyter-widgets/base",
1088 | "_view_module_version": "1.2.0",
1089 | "_view_name": "LayoutView",
1090 | "align_content": null,
1091 | "align_items": null,
1092 | "align_self": null,
1093 | "border": null,
1094 | "bottom": null,
1095 | "display": null,
1096 | "flex": null,
1097 | "flex_flow": null,
1098 | "grid_area": null,
1099 | "grid_auto_columns": null,
1100 | "grid_auto_flow": null,
1101 | "grid_auto_rows": null,
1102 | "grid_column": null,
1103 | "grid_gap": null,
1104 | "grid_row": null,
1105 | "grid_template_areas": null,
1106 | "grid_template_columns": null,
1107 | "grid_template_rows": null,
1108 | "height": null,
1109 | "justify_content": null,
1110 | "justify_items": null,
1111 | "left": null,
1112 | "margin": null,
1113 | "max_height": null,
1114 | "max_width": null,
1115 | "min_height": null,
1116 | "min_width": null,
1117 | "object_fit": null,
1118 | "object_position": null,
1119 | "order": null,
1120 | "overflow": null,
1121 | "overflow_x": null,
1122 | "overflow_y": null,
1123 | "padding": null,
1124 | "right": null,
1125 | "top": null,
1126 | "visibility": null,
1127 | "width": null
1128 | }
1129 | },
1130 | "dafe404f90534606856f0487536a5d37": {
1131 | "model_module": "@jupyter-widgets/controls",
1132 | "model_name": "ButtonStyleModel",
1133 | "model_module_version": "1.5.0",
1134 | "state": {
1135 | "_model_module": "@jupyter-widgets/controls",
1136 | "_model_module_version": "1.5.0",
1137 | "_model_name": "ButtonStyleModel",
1138 | "_view_count": null,
1139 | "_view_module": "@jupyter-widgets/base",
1140 | "_view_module_version": "1.2.0",
1141 | "_view_name": "StyleView",
1142 | "button_color": null,
1143 | "font_weight": ""
1144 | }
1145 | },
1146 | "0f49d71a741b4e65af9404a56510feb2": {
1147 | "model_module": "@jupyter-widgets/base",
1148 | "model_name": "LayoutModel",
1149 | "model_module_version": "1.2.0",
1150 | "state": {
1151 | "_model_module": "@jupyter-widgets/base",
1152 | "_model_module_version": "1.2.0",
1153 | "_model_name": "LayoutModel",
1154 | "_view_count": null,
1155 | "_view_module": "@jupyter-widgets/base",
1156 | "_view_module_version": "1.2.0",
1157 | "_view_name": "LayoutView",
1158 | "align_content": null,
1159 | "align_items": null,
1160 | "align_self": null,
1161 | "border": null,
1162 | "bottom": null,
1163 | "display": null,
1164 | "flex": null,
1165 | "flex_flow": null,
1166 | "grid_area": null,
1167 | "grid_auto_columns": null,
1168 | "grid_auto_flow": null,
1169 | "grid_auto_rows": null,
1170 | "grid_column": null,
1171 | "grid_gap": null,
1172 | "grid_row": null,
1173 | "grid_template_areas": null,
1174 | "grid_template_columns": null,
1175 | "grid_template_rows": null,
1176 | "height": null,
1177 | "justify_content": null,
1178 | "justify_items": null,
1179 | "left": null,
1180 | "margin": null,
1181 | "max_height": null,
1182 | "max_width": null,
1183 | "min_height": null,
1184 | "min_width": null,
1185 | "object_fit": null,
1186 | "object_position": null,
1187 | "order": null,
1188 | "overflow": null,
1189 | "overflow_x": null,
1190 | "overflow_y": null,
1191 | "padding": null,
1192 | "right": null,
1193 | "top": null,
1194 | "visibility": null,
1195 | "width": null
1196 | }
1197 | },
1198 | "8bc4dec4cd20432eba64801a3c15f559": {
1199 | "model_module": "@jupyter-widgets/controls",
1200 | "model_name": "DescriptionStyleModel",
1201 | "model_module_version": "1.5.0",
1202 | "state": {
1203 | "_model_module": "@jupyter-widgets/controls",
1204 | "_model_module_version": "1.5.0",
1205 | "_model_name": "DescriptionStyleModel",
1206 | "_view_count": null,
1207 | "_view_module": "@jupyter-widgets/base",
1208 | "_view_module_version": "1.2.0",
1209 | "_view_name": "StyleView",
1210 | "description_width": ""
1211 | }
1212 | },
1213 | "35f112028a294be69003137a861dee96": {
1214 | "model_module": "@jupyter-widgets/controls",
1215 | "model_name": "LabelModel",
1216 | "model_module_version": "1.5.0",
1217 | "state": {
1218 | "_dom_classes": [],
1219 | "_model_module": "@jupyter-widgets/controls",
1220 | "_model_module_version": "1.5.0",
1221 | "_model_name": "LabelModel",
1222 | "_view_count": null,
1223 | "_view_module": "@jupyter-widgets/controls",
1224 | "_view_module_version": "1.5.0",
1225 | "_view_name": "LabelView",
1226 | "description": "",
1227 | "description_tooltip": null,
1228 | "layout": "IPY_MODEL_e11b74b42e83459c99bf36f44d3ece60",
1229 | "placeholder": "",
1230 | "style": "IPY_MODEL_2c2f55ba80ac465b999db3027cdbed5e",
1231 | "value": "Connecting..."
1232 | }
1233 | },
1234 | "e11b74b42e83459c99bf36f44d3ece60": {
1235 | "model_module": "@jupyter-widgets/base",
1236 | "model_name": "LayoutModel",
1237 | "model_module_version": "1.2.0",
1238 | "state": {
1239 | "_model_module": "@jupyter-widgets/base",
1240 | "_model_module_version": "1.2.0",
1241 | "_model_name": "LayoutModel",
1242 | "_view_count": null,
1243 | "_view_module": "@jupyter-widgets/base",
1244 | "_view_module_version": "1.2.0",
1245 | "_view_name": "LayoutView",
1246 | "align_content": null,
1247 | "align_items": null,
1248 | "align_self": null,
1249 | "border": null,
1250 | "bottom": null,
1251 | "display": null,
1252 | "flex": null,
1253 | "flex_flow": null,
1254 | "grid_area": null,
1255 | "grid_auto_columns": null,
1256 | "grid_auto_flow": null,
1257 | "grid_auto_rows": null,
1258 | "grid_column": null,
1259 | "grid_gap": null,
1260 | "grid_row": null,
1261 | "grid_template_areas": null,
1262 | "grid_template_columns": null,
1263 | "grid_template_rows": null,
1264 | "height": null,
1265 | "justify_content": null,
1266 | "justify_items": null,
1267 | "left": null,
1268 | "margin": null,
1269 | "max_height": null,
1270 | "max_width": null,
1271 | "min_height": null,
1272 | "min_width": null,
1273 | "object_fit": null,
1274 | "object_position": null,
1275 | "order": null,
1276 | "overflow": null,
1277 | "overflow_x": null,
1278 | "overflow_y": null,
1279 | "padding": null,
1280 | "right": null,
1281 | "top": null,
1282 | "visibility": null,
1283 | "width": null
1284 | }
1285 | },
1286 | "2c2f55ba80ac465b999db3027cdbed5e": {
1287 | "model_module": "@jupyter-widgets/controls",
1288 | "model_name": "DescriptionStyleModel",
1289 | "model_module_version": "1.5.0",
1290 | "state": {
1291 | "_model_module": "@jupyter-widgets/controls",
1292 | "_model_module_version": "1.5.0",
1293 | "_model_name": "DescriptionStyleModel",
1294 | "_view_count": null,
1295 | "_view_module": "@jupyter-widgets/base",
1296 | "_view_module_version": "1.2.0",
1297 | "_view_name": "StyleView",
1298 | "description_width": ""
1299 | }
1300 | }
1301 | }
1302 | }
1303 | },
1304 | "nbformat": 4,
1305 | "nbformat_minor": 0
1306 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ChatBotWithOpenAI
2 | AI chatbot built using OpenAI’s free API, developed in Google Colab with LangChain, Gradio, and Hugging Face for seamless interaction and NLP integration.
3 |
4 | This is a mini project I developed during my 2nd semester—a simple yet powerful AI chatbot built using OpenAI’s free API. The chatbot leverages modern AI tools to deliver human-like conversations through natural language processing. I used Google Colab as the development platform for writing and executing the code. The core intelligence comes from OpenAI’s language model, integrated via API. To enhance functionality and flexibility, I utilized LangChain for chaining prompts and logic, while Gradio was used to build an interactive user interface without requiring frontend development skills. Hugging Face resources were also explored to understand and integrate additional NLP components. This project gave me hands-on experience in building conversational AI systems, API integration, and working with real-world machine learning tools.
5 |
--------------------------------------------------------------------------------