Тёмный

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

Shaw Talebi
Подписаться 28 тыс.
Просмотров 36 тыс.
50% 1

This is the 3rd video in a series on using large language models (LLMs) in practice. Here, I give a beginner-friendly guide to the Hugging Face Transformers library, which provides an easy and cost-free way to work with various open-source language models.
Series Playlist: • Large Language Models ...
📰 Read more: towardsdatascience.com/cracki...
💻 Example code: github.com/ShawhinT/RU-vid-B...
More resources
pipeline() doc: huggingface.co/docs/transform...
pip installation: huggingface.co/docs/transform...
Vanilla Chatbot demo: huggingface.co/spaces/shawhin...
--
Book a call: calendly.com/shawhintalebi
Homepage: shawhintalebi.com/
Socials
/ shawhin
/ shawhintalebi
/ shawhint
/ shawhintalebi
The Data Entrepreneurs
🎥 RU-vid: / @thedataentrepreneurs
👉 Discord: / discord
📰 Medium: / the-data
📅 Events: lu.ma/tde
🗞️ Newsletter: the-data-entrepreneurs.ck.pag...
Support ❤️
www.buymeacoffee.com/shawhint
Intro - 0:00
What is Hugging Face? - 1:05
🤗Transformers - 2:05
Models - 4:40
Installation - 8:24
Sentiment Analysis - 9:49
Summarization - 11:48
Conversational - 13:04
Chatbot UI with Gradio - 14:42
Web app with Spaces - 17:38
What's next? - 20:46

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@ShawhinTalebi
@ShawhinTalebi 10 месяцев назад
More in this series 👇 - Introduction: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-tFHeUSJAYbE.html
 - OpenAI API Intro: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-czvVibB2lRA.html 📰Blog link: towardsdatascience.com/cracking-open-the-hugging-face-transformers-library-350aa0ef0161?sk=225a4171af141daeb3869dcf614201dd 💻Example code: github.com/ShawhinT/RU-vid-Blog/tree/main/LLMs/hugging-face More resources pipeline() doc: huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline.task pip installation: huggingface.co/docs/transformers/installation Vanilla Chatbot demo: huggingface.co/spaces/shawhin/vanilla-chatbot
@Hys-01
@Hys-01 21 день назад
so much more helpful than every other tutorial on youtube! Straight to the point, very relevant and quick. Thanks so much!
@helrod6131
@helrod6131 7 месяцев назад
Appreciate you walking through this in an easy-to-understand style.
@ShawhinTalebi
@ShawhinTalebi 7 месяцев назад
Happy to help! I’m glad it was clear 😁
@user-xj1pr3pn1p
@user-xj1pr3pn1p 2 месяца назад
I think your video about LLM is the best one in the youtube, thanks very much!!!
@GBangalore
@GBangalore 5 месяцев назад
Great introduction. Thanks for putting this together.
@jmitterhofer
@jmitterhofer 5 месяцев назад
Great work Shaw!!!
@ShawhinTalebi
@ShawhinTalebi 5 месяцев назад
Thanks! :)
@mohammadalibazyar5079
@mohammadalibazyar5079 3 месяца назад
Thanks for compiling the stuff....amazing!
@ShawhinTalebi
@ShawhinTalebi 3 месяца назад
Happy to help!
@muhammadroshanmughees1586
@muhammadroshanmughees1586 7 месяцев назад
I didn't know of the huggingface spaces. It is amazing. Thank you for this
@ShawhinTalebi
@ShawhinTalebi 7 месяцев назад
You’re welcome, I’m glad it was helpful :)
@jakewastaken
@jakewastaken 2 месяца назад
I’ve been living under a rock and just learned about both Hugging Face and Jupyter. Consider my mind blown 😂
@ifycadeau
@ifycadeau 10 месяцев назад
Great video as usual! SO helpful 🙌🏾
@ShawhinTalebi
@ShawhinTalebi 10 месяцев назад
Thanks, glad it was helpful!
@jakewastaken
@jakewastaken 2 месяца назад
Thanks for this fantastic playlist.
@user-ms3nf6tv6h
@user-ms3nf6tv6h 7 месяцев назад
Thank you Shawhin for this really helpful and informative video.
@ShawhinTalebi
@ShawhinTalebi 7 месяцев назад
Thanks! Glad it helped :)
@matthcw8745
@matthcw8745 6 месяцев назад
Extremely useful, I haven't used hugging face, so this is useful!
@ShawhinTalebi
@ShawhinTalebi 6 месяцев назад
Glad it was helpful!
@user-vw1or7qt9w
@user-vw1or7qt9w 2 дня назад
It's very helpful, Thanks for making this video Shaw!.
@jobarmure6169
@jobarmure6169 21 день назад
thx, I love how it was simple and helpful
@spotnuru83
@spotnuru83 5 месяцев назад
Really useful for beginners like me, thank you for this
@ShawhinTalebi
@ShawhinTalebi 5 месяцев назад
Glad it was helpful :)
@fuad471
@fuad471 14 дней назад
nice informative and practical video I learned a lot keep sharing nice videos please
@zahrahameed4098
@zahrahameed4098 2 месяца назад
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 2 месяца назад
Thanks for the suggestion. I added it to my list :)
@KumR
@KumR 6 месяцев назад
Great Intro Shaw
@ShawhinTalebi
@ShawhinTalebi 6 месяцев назад
Thanks, glad it helped!
@vipulbawankar3980
@vipulbawankar3980 6 месяцев назад
Really great content!!
@ShawhinTalebi
@ShawhinTalebi 6 месяцев назад
Glad you enjoyed it :)
@lalpremi
@lalpremi 4 месяца назад
Thank you for sharing, have a great day :-)
@alemayehudendir3890
@alemayehudendir3890 4 месяца назад
Amazing! Thank you so much.
@ShawhinTalebi
@ShawhinTalebi 4 месяца назад
Happy to help!
@hanimahdi7244
@hanimahdi7244 5 месяцев назад
Great video, Thank you!
@ShawhinTalebi
@ShawhinTalebi 5 месяцев назад
Happy to help!
@60pluscrazy
@60pluscrazy 7 месяцев назад
Thanks, excellent 👍
@sathvikmalgikar2842
@sathvikmalgikar2842 2 дня назад
Thanks !
@AniHunsaker
@AniHunsaker Месяц назад
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 Месяц назад
Thanks for the suggestion! What's an example of a low-resource language?
@emanuelokoth1973
@emanuelokoth1973 8 месяцев назад
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 8 месяцев назад
That’s awesome, glad it helped! I talk about fine-tuning in another video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eC6Hd1hFvos.html
@emanuelokoth1973
@emanuelokoth1973 8 месяцев назад
@@ShawhinTalebi cool let me check that out! was actually looking on how to fine tune this, since the first is a bitt simple!
@Techbro-ho3pp
@Techbro-ho3pp 5 месяцев назад
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 5 месяцев назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-WL7V9JUy2sE.html
@Techbro-ho3pp
@Techbro-ho3pp 5 месяцев назад
Thank you Shaw! Do you host or attend live AI related meetups in Dallas area? @@ShawhinTalebi
@ShawhinTalebi
@ShawhinTalebi 4 месяца назад
Yes, I host at least 1 meet-up a quarter via The Data Entrepreneurs community Events: lu.ma/tde
@Deejayy08
@Deejayy08 Месяц назад
Great videos.. do you have something similar for AWS bedrock?
@ShawhinTalebi
@ShawhinTalebi Месяц назад
I do not but that's a great topic for a future video :)
@souravbarua3991
@souravbarua3991 4 месяца назад
Thank you for sharing. Please make same video using hf api.
@ShawhinTalebi
@ShawhinTalebi 4 месяца назад
Thanks for the rec! Anything specific you'd like to see?
@souravbarua3991
@souravbarua3991 4 месяца назад
@@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 Месяц назад
HF's endpoints might help: huggingface.co/inference-endpoints/dedicated
@TheCloudShepherd
@TheCloudShepherd 7 месяцев назад
Where did you get the Conversation class?
@ShawhinTalebi
@ShawhinTalebi 6 месяцев назад
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/RU-vid-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@anicole14774
@anicole14774 Месяц назад
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 Месяц назад
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/RU-vid-Blog/blob/main/LLMs/hugging-face/hf-sandbox.ipynb
@ncjatin
@ncjatin 15 дней назад
We dont need to create and use HuggingFace tokens to use these models ?
@ShawhinTalebi
@ShawhinTalebi 14 дней назад
Not if you are running these models locally!
@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 14 часов назад
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/RU-vid-Blog.git
@friedrichdergroe9664
@friedrichdergroe9664 2 месяца назад
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 2 месяца назад
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.
@djentlover
@djentlover 7 дней назад
Anaconda doesn't find all the depencies when I try to create the environment. What should I do?
@ShawhinTalebi
@ShawhinTalebi 7 дней назад
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.
@amparoconsuelo9451
@amparoconsuelo9451 7 месяцев назад
Please display the full code and mention the Python version and system configuration, folders, files, etc.
@ShawhinTalebi
@ShawhinTalebi 6 месяцев назад
Code and env files are available here: github.com/ShawhinT/RU-vid-Blog/tree/main/LLMs/hugging-face
@himanshupatidar8040
@himanshupatidar8040 4 месяца назад
it seems vanilla chat-bot is showing error as of current date.
@ShawhinTalebi
@ShawhinTalebi 4 месяца назад
Thanks for pointing that out! It seems like hugging face updated the lib. I fixed the code on the GitHub repo.
@forheuristiclifeksh7836
@forheuristiclifeksh7836 7 месяцев назад
6:41
Далее
A Complete Overview of Word Embeddings
17:17
Просмотров 98 тыс.
Opa-singillar kelganda😂😂😂
00:47
Просмотров 412 тыс.
heavy boot #tiktok
00:16
Просмотров 887 тыс.
Let's build GPT: from scratch, in code, spelled out.
1:56:20
What is LangChain?
8:08
Просмотров 146 тыс.
I Analyzed My Finance With Local LLMs
17:51
Просмотров 417 тыс.
I wish every AI Engineer could watch this.
33:49
Просмотров 48 тыс.
The OpenAI (Python) API | Introduction & Example Code
23:46
Run your own AI (but private)
22:13
Просмотров 1,2 млн
Opa-singillar kelganda😂😂😂
00:47
Просмотров 412 тыс.