The Hugging Face Transformers Library | Example Code + Chatbot UI with Gradio

  Рет қаралды 71,371

Shaw Talebi

Shaw Talebi

Күн бұрын

Пікірлер: 102
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
👉More on LLMs: kzbin.info/aero/PLz-ep5RbHosU2hnz5ejezwaYpdMutMVB0
@zahrahameed4098
@zahrahameed4098 8 ай бұрын
Your teaching method is exceptional, providing a balanced blend of theory and practical implementation. I would greatly appreciate it if you could create a video tutorial on training InsightFace using a custom dataset. I'm undertaking my thesis on this topic but struggling to find adequate instructional resources.
@ShawhinTalebi
@ShawhinTalebi 8 ай бұрын
Thanks for the suggestion. I added it to my list :)
@Hys-01
@Hys-01 7 ай бұрын
so much more helpful than every other tutorial on youtube! Straight to the point, very relevant and quick. Thanks so much!
@helrod6131
@helrod6131 Жыл бұрын
Appreciate you walking through this in an easy-to-understand style.
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Happy to help! I’m glad it was clear 😁
@孙姣姣
@孙姣姣 9 ай бұрын
I think your video about LLM is the best one in the youtube, thanks very much!!!
@sitimariyah5972
@sitimariyah5972 4 ай бұрын
Very useful for me as a beginner, keep creating great tutorial videos. Thanks :)
@muhammadroshanmughees1586
@muhammadroshanmughees1586 Жыл бұрын
I didn't know of the huggingface spaces. It is amazing. Thank you for this
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
You’re welcome, I’m glad it was helpful :)
@jakewastaken
@jakewastaken 9 ай бұрын
I’ve been living under a rock and just learned about both Hugging Face and Jupyter. Consider my mind blown 😂
@mohammadalibazyar5079
@mohammadalibazyar5079 10 ай бұрын
Thanks for compiling the stuff....amazing!
@ShawhinTalebi
@ShawhinTalebi 10 ай бұрын
Happy to help!
@ShaikhSalman-y7w
@ShaikhSalman-y7w 6 ай бұрын
It's very helpful, Thanks for making this video Shaw!.
@jmitterhofer
@jmitterhofer Жыл бұрын
Great work Shaw!!!
@ShawhinTalebi
@ShawhinTalebi 11 ай бұрын
Thanks! :)
@nahidmorady3023
@nahidmorady3023 17 күн бұрын
Hi, dear Farzad,Thank you for the good information you provide us, I want to extract the Persian document into a pdf file, it is not a correct vector and the correct result cannot be returned, have you worked with a Persian document and do you know its challenges?
@newsai-k6d
@newsai-k6d 2 ай бұрын
Love this video, this is what I want to do for news
@newsai-k6d
@newsai-k6d 2 ай бұрын
I love that the chat bot is hard working
@jakewastaken
@jakewastaken 9 ай бұрын
Thanks for this fantastic playlist.
@AngelinaGokhale
@AngelinaGokhale Жыл бұрын
Thank you Shawhin for this really helpful and informative video.
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Thanks! Glad it helped :)
@matthcw8745
@matthcw8745 Жыл бұрын
Extremely useful, I haven't used hugging face, so this is useful!
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Glad it was helpful!
@spotnuru83
@spotnuru83 Жыл бұрын
Really useful for beginners like me, thank you for this
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Glad it was helpful :)
@ifycadeau
@ifycadeau Жыл бұрын
Great video as usual! SO helpful 🙌🏾
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Thanks, glad it was helpful!
@alisohrabi2946
@alisohrabi2946 3 ай бұрын
Nice video buddy. Kepp going and growing your videos. Thanks
@guruprasadn193
@guruprasadn193 Күн бұрын
I want to create LLM model for medical health detection, can you please help me if any reference related to this model.
@anicole14774
@anicole14774 7 ай бұрын
Hello...When i'm trying out the gradio chat interface with the vanilla_chatbox function, I run an error saying that the conversation variable is not defined. Why is this the case?
@ShawhinTalebi
@ShawhinTalebi 7 ай бұрын
I believe there was a transformers library update which broke the could shown in the video. But I have an updated version on the GitHub that should work: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@GBangalore
@GBangalore Жыл бұрын
Great introduction. Thanks for putting this together.
@MattiaGrillo-xu7my
@MattiaGrillo-xu7my 2 ай бұрын
hello I can't seem to make conda env create command work, it shows me "Could not solve for environment specs The following packages are incompatible" then a list of the incompatible packages... anyone can help me solve it?
@ShawhinTalebi
@ShawhinTalebi 2 ай бұрын
Sorry it might only work for Mac OS since that's what I used to make it. You can alternatively try installing the requirement in a fresh env via pip and the requirements.txt file from the repo: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/requirements.txt
@fuad471
@fuad471 6 ай бұрын
nice informative and practical video I learned a lot keep sharing nice videos please
@yumei6607
@yumei6607 6 ай бұрын
Very useful information. I cannot clone the git repository. Got error: invalid path 'TDA/persistent_homology/homology_example_Homology-Changes-Predicted-Crash??.png', Could you please take a look?
@ShawhinTalebi
@ShawhinTalebi 6 ай бұрын
I wasn't able to reproduce this error. Note that GitHub doesn't let you clone a part of a repo so you have to download the whole thing: github.com/ShawhinT/KZbin-Blog.git
@AniHunsaker
@AniHunsaker 8 ай бұрын
This is so helpful! can you record a video guiding us how data scientists can work in Transformers library if they work with low-resource languages?
@ShawhinTalebi
@ShawhinTalebi 7 ай бұрын
Thanks for the suggestion! What's an example of a low-resource language?
@iamchiragdahiya
@iamchiragdahiya 4 ай бұрын
Amazing Stuff!
@BhavaniShankar-x7w
@BhavaniShankar-x7w 3 ай бұрын
Really Nice video with practical use. i am running same code in colab but when i click submit i am getting error screen is there any specific things i need to follow because you used conda. this can be implemented in any other than conda same code ? can you explain the steps in detail i am new to this and want to learn
@ShawhinTalebi
@ShawhinTalebi 3 ай бұрын
There was an update to HF since I posted this video. You can find a new version of the example code here: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@jobarmure6169
@jobarmure6169 7 ай бұрын
thx, I love how it was simple and helpful
@ReyhanehHosseinpour
@ReyhanehHosseinpour 4 ай бұрын
How did you get Conversation class? I was unable to get it from transformers...
@ShawhinTalebi
@ShawhinTalebi 3 ай бұрын
Good question. That class has been deprecated. Check out the updated example code here: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@donaldwedding5500
@donaldwedding5500 18 сағат бұрын
@@ShawhinTalebi I don't see the new code. I believe the link is still importing Conversations. Do you have the updated code?
@snehilseenu
@snehilseenu 3 ай бұрын
I am getting error, while using the Conversation module: cannot import name 'Conversation' from 'transformers', did anyone run through this error, please help.
@ShawhinTalebi
@ShawhinTalebi 3 ай бұрын
Thanks for raising this! There was an update to the lib since I posted this video. You can find an updated version of the example code here: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@SimontheWryMan
@SimontheWryMan Ай бұрын
Firstly, this is great so thanks. A couple of things: 1) To run on windows, I had ChatGPT create a new yml file that removed the Mac libraries and made the library calls less release dependent; and 2) I think that the Conversation object from the transformers library has been deprecated from HuggingFace and so I updated the pipelines to text2text-generation. I'm newer to this and so I could be wrong. If someone could confirm, that would be great.
@ShawhinTalebi
@ShawhinTalebi Ай бұрын
Thanks for your comment! The code in the video is outdated, but I've updated the example code on GitHub: github.com/ShawhinT/KZbin-Blog/tree/main/LLMs/hugging-face. For windows, you can install the packages in the requirements.txt file instead of the .yml file.
@ncjatin
@ncjatin 6 ай бұрын
We dont need to create and use HuggingFace tokens to use these models ?
@ShawhinTalebi
@ShawhinTalebi 6 ай бұрын
Not if you are running these models locally!
@lalpremi
@lalpremi 10 ай бұрын
Thank you for sharing, have a great day :-)
@zihadedu6328
@zihadedu6328 5 ай бұрын
you really deserve a subscribe
@vipulbawankar3980
@vipulbawankar3980 Жыл бұрын
Really great content!!
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Glad you enjoyed it :)
@Deejayy08
@Deejayy08 7 ай бұрын
Great videos.. do you have something similar for AWS bedrock?
@ShawhinTalebi
@ShawhinTalebi 7 ай бұрын
I do not but that's a great topic for a future video :)
@shayanshafiqahmad
@shayanshafiqahmad 4 ай бұрын
@@ShawhinTalebi Sure it is. Waiting eagerly for that one too. :)
@Techbro-ho3pp
@Techbro-ho3pp 11 ай бұрын
Thank you for pulling all actionable code in one place and the appropriate amount of technical details. Many of YT videos lab notebooks are stale considering version changes in library. Yours is the first one that worked! In a span of 12 mins, I could complete two of your exercise. While trying the chatbot example, when I import gradio in colab, it causes import of PyTorch and memory spikes and sometimes colab free vm collapses. BTW I want to implement a RAG example to query my pdf with tables. Since my laptop is under resources, was looking for some links or videos on how to push a RAG app to H.F. Would appreciate if you point me to one if you have it, or a better link.
@ShawhinTalebi
@ShawhinTalebi 11 ай бұрын
Great to hear! I'm not a Collab user so not sure what's going on with that Gradio import. I found this video helpful on RAG with docs: kzbin.info/www/bejne/jX2ah2yAit5lqac
@Techbro-ho3pp
@Techbro-ho3pp 11 ай бұрын
Thank you Shaw! Do you host or attend live AI related meetups in Dallas area? @@ShawhinTalebi
@ShawhinTalebi
@ShawhinTalebi 11 ай бұрын
Yes, I host at least 1 meet-up a quarter via The Data Entrepreneurs community Events: lu.ma/tde
@alemayehudendir3890
@alemayehudendir3890 11 ай бұрын
Amazing! Thank you so much.
@ShawhinTalebi
@ShawhinTalebi 11 ай бұрын
Happy to help!
@hanimahdi7244
@hanimahdi7244 11 ай бұрын
Great video, Thank you!
@ShawhinTalebi
@ShawhinTalebi 11 ай бұрын
Happy to help!
@himanshupatidar8040
@himanshupatidar8040 10 ай бұрын
it seems vanilla chat-bot is showing error as of current date.
@ShawhinTalebi
@ShawhinTalebi 10 ай бұрын
Thanks for pointing that out! It seems like hugging face updated the lib. I fixed the code on the GitHub repo.
@60pluscrazy
@60pluscrazy Жыл бұрын
Thanks, excellent 👍
@KumR
@KumR Жыл бұрын
Great Intro Shaw
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Thanks, glad it helped!
@TheCloudShepherd
@TheCloudShepherd Жыл бұрын
Where did you get the Conversation class?
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Good question. I forgot to show the imports in the slides, but Conversation() comes from the Transformers library. Here's the full notebook: github.com/ShawhinT/KZbin-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@habibverse
@habibverse 5 ай бұрын
you are amazing man !!!
@arturoruiz6274
@arturoruiz6274 5 ай бұрын
Conversation module is no longer available for those following these tutorials.
@ShawhinTalebi
@ShawhinTalebi 5 ай бұрын
Thanks for calling that out! While I can't update the video, updated code is available on GitHub: github.com/ShawhinT/KZbin-Blog/tree/main/LLMs/hugging-face
@ShaliniAgarwal-qk7gi
@ShaliniAgarwal-qk7gi 2 ай бұрын
@@ShawhinTalebi Thank you! I was looking for this comment and your answer.
@emanuelokoth1973
@emanuelokoth1973 Жыл бұрын
This solved me big time, I am working on a client project and this app I'm surprised it's general purpose and answers fitness related questions that is exactly what I'm working on. Big Thanks! Is there a way to fine-tune the model more for my fitness AI?? Big Thanks!
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
That’s awesome, glad it helped! I talk about fine-tuning in another video: kzbin.info/www/bejne/m3SZeZdnnauppdU
@emanuelokoth1973
@emanuelokoth1973 Жыл бұрын
@@ShawhinTalebi cool let me check that out! was actually looking on how to fine tune this, since the first is a bitt simple!
@souravbarua3991
@souravbarua3991 10 ай бұрын
Thank you for sharing. Please make same video using hf api.
@ShawhinTalebi
@ShawhinTalebi 10 ай бұрын
Thanks for the rec! Anything specific you'd like to see?
@souravbarua3991
@souravbarua3991 10 ай бұрын
@@ShawhinTalebi when we are using transformers pipeline, everytime the model 1st downloads and then it works. I want to know is there any way so that we can call the above models with hf api/token?
@ShawhinTalebi
@ShawhinTalebi 8 ай бұрын
HF's endpoints might help: huggingface.co/inference-endpoints/dedicated
@hugopristauz538
@hugopristauz538 5 ай бұрын
super helpful
@amparoconsuelo9451
@amparoconsuelo9451 Жыл бұрын
Please display the full code and mention the Python version and system configuration, folders, files, etc.
@ShawhinTalebi
@ShawhinTalebi Жыл бұрын
Code and env files are available here: github.com/ShawhinT/KZbin-Blog/tree/main/LLMs/hugging-face
@servelotfi
@servelotfi 6 ай бұрын
عالی بود thanks alot
@djentlover
@djentlover 6 ай бұрын
Anaconda doesn't find all the depencies when I try to create the environment. What should I do?
@ShawhinTalebi
@ShawhinTalebi 6 ай бұрын
Are you using the .yml file from the GitHub repo? If that's not working, you can try making a fresh env and installing transformers following this guide: huggingface.co/docs/transformers/en/installation#install-with-conda
@djentlover
@djentlover 6 ай бұрын
@@ShawhinTalebi Yes I used your GitHub link and your yml file. Using a M1 mac. Thank you. I will try that.
@friedrichdergroe9664
@friedrichdergroe9664 9 ай бұрын
The sentiment analysis is strange. I put in: "It is fun to hurt people" and it came back with a .99 POSITIVE. I guess it has no clue about morality and values. Also, I have not used Python in a while, and I suppose it has trouble dealing with dependencies, because I had to install tensorflow and tf-keras separately. But it works.
@ShawhinTalebi
@ShawhinTalebi 9 ай бұрын
Thanks for raising this, it's a super important point. While I suspect larger and more recent models will handle that example better, accounting for these edge cases is a major challenge when working with language models.
@sathvikmalgikar2842
@sathvikmalgikar2842 6 ай бұрын
Thanks !
@hachemimokrane2810
@hachemimokrane2810 Ай бұрын
Transformer et pytorch sont gourmands en memoire
@SphereofTime
@SphereofTime Жыл бұрын
6:41
@nathamuni9435
@nathamuni9435 3 ай бұрын
to much effort
Fine-tuning Large Language Models (LLMs) | w/ Example Code
28:18
Shaw Talebi
Рет қаралды 377 М.
The OpenAI (Python) API | Introduction & Example Code
23:46
Shaw Talebi
Рет қаралды 44 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
Prompt Engineering: How to Trick AI into Solving Your Problems
29:58
What to Build with AI - Ideas from 10 Hugging Face Spaces
18:13
Harshit Tyagi
Рет қаралды 14 М.
A Practical Introduction to Large Language Models (LLMs)
14:57
Shaw Talebi
Рет қаралды 91 М.
Run ALL Your AI Locally in Minutes (LLMs, RAG, and more)
20:19
Cole Medin
Рет қаралды 310 М.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 332 М.
Qwen Just Casually Started the Local AI Revolution
16:05
Cole Medin
Рет қаралды 118 М.
Unlock the Power of AI with Ollama and Hugging Face
8:03
Matt Williams
Рет қаралды 28 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54