Hugging Face Tutorial for Beginners — Transcript
Full transcript
- 0:00if you're interested about artificial
- 0:02intelligence then I recommend you watch
- 0:05this video because in today's video
- 0:08we're going to talk about tool that
- 0:10could help you run thousand different
- 0:13models on your local computer hey guys
- 0:16my name is lat and welcome back to my
- 0:18channel in this video we're going to
- 0:19talk about hugging
- 0:21face this will be mini tutorial that
- 0:25give you comprehensive understanding
- 0:28what is this hame face and what you can
- 0:30do with it if you're a person who
- 0:33fascinated about artificial intelligence
- 0:36I recommend you watch this video because
- 0:38we will be able to run different AI
- 0:41models on your local computer if you're
- 0:44ready then let's get started first thing
- 0:48first what exactly is hugging face
- 0:51simply put uh it is an open- Source Air
- 0:54Platform that specialize in natural
- 0:56language processing through Transformers
- 0:59models whether you want to analyze text
- 1:02uh generate creative content or even
- 1:05work with images and audio hugin phas
- 1:08have something in store for you to get
- 1:10started with it open huggingface website
- 1:14and create an account there then you
- 1:16will be redirected to your dashboard and
- 1:19then from here we can start explore the
- 1:22website you should be aware of three
- 1:24things models data sets and spaces the
- 1:27huging face model Hub is a repos itory
- 1:30where you can find pre-training models
- 1:32for a wide range of tasks such as
- 1:35natural language processing computer
- 1:37Vision Audio processing and more these
- 1:40models are contributed by the community
- 1:42and hen face itself the data sets
- 1:45library at hugen phas designed to
- 1:47provide a simple and efficient way to
- 1:50access a wide array of data sets they
- 1:53could be useful for machine learning in
- 1:55data driven projects and spaces on hgen
- 1:58phas providing easy to use platform for
- 2:01users to deploy their machine learning
- 2:03models and showcase interactive AI
- 2:06applications so if you want to showcase
- 2:09your AI model hugging face is the best
- 2:12place to do that as you could see here a
- 2:15lot of different models from small and
- 2:18big companies and also from private
- 2:21people let me show you some example I'm
- 2:24going to select a random model let's try
- 2:27image generation first I will select the
- 2:30one that has the most likes okay it's
- 2:33stable diffuser let's try the demo all
- 2:37you need just write a prompt and then
- 2:40press the generate image button and here
- 2:43we go this is my result as you can see
- 2:46it's really easy to use this web
- 2:48interface to try these different models
- 2:51but we also can do this in code and I'm
- 2:53going to show it later okay let's go
- 2:56back to spaces and try some other model
- 2:59all I'm going to try background removal
- 3:02let's see the interface of this AI
- 3:05application I'm going to find some image
- 3:08let's use this
- 3:10image and let's try to run the
- 3:13application all you need just press the
- 3:16submit button it could take some time
- 3:19because application could wait when GPU
- 3:22to become available but usually the
- 3:24waiting time is not that long and as you
- 3:27could see my picture is ready and here
- 3:30we go this is my image without the
- 3:33background and seems it works perfectly
- 3:37that's probably it about spaces let's go
- 3:39to the coding part Hing face
- 3:43Transformers Transformers is a core
- 3:46library that supports a broad array of
- 3:48Transformer models Transformers are a
- 3:52type of deep learning model architecture
- 3:54that excels and understanding the
- 3:57context and nuances of language
- 4:00the library provides a lot of pre
- 4:03trining models and F tuning tools that
- 4:06you can use for different tasks such as
- 4:08text classification tokenization
- 4:11translation summarization and so on I'm
- 4:14going to show you how to use it on Linux
- 4:17but it also available for Windows and
- 4:19Mac if you using terminal as me then the
- 4:23steps will be almost the same before we
- 4:25dive in into the specific applications
- 4:28ensure that your your development
- 4:30environment set up correctly you will
- 4:32need python Transformer library and few
- 4:35other libraries simply copy this command
- 4:38and paste it inside your terminal if you
- 4:41see this error it means you are trying
- 4:44to run the installation package globally
- 4:46but we need to follow the recommendation
- 4:49so we have to create a virtual
- 4:51environment first simply use this
- 4:54command and then activate your virtual
- 4:56environment and after that you can run
- 4:58the previous command and and everything
- 5:01should be okay after we install the
- 5:04Transformer and other libraries we need
- 5:06to install machine learning framework by
- 5:09Toro T are Flor these are two the most
- 5:13popular open source Frameworks by torch
- 5:16was developed by Facebook and tender
- 5:18flow was developed by Google for this
- 5:21tutorial I'm going to use torch the next
- 5:24step is optional if you are using Nvidia
- 5:26graphic card you can follow this step or
- 5:29you can skip it in this step we are
- 5:31going to install Cuda it is a tool for
- 5:34par Computing it allows developers to
- 5:37use Nvidia gpus basically this tool
- 5:41helps you accelerate of computation
- 5:43tasks because it's much faster than CPU
- 5:47to install Coda toolkit you need to open
- 5:49Nvidia website then go to the Cuda
- 5:52download select your operation system
- 5:55and then follow the instruction for
- 5:57Linux I have to run these eight commands
- 6:00in my terminal window for Windows and
- 6:02Mac users steps uh could be different so
- 6:06just follow the instruction okay and now
- 6:09we are ready to explore Transformer in
- 6:11action let's go back to huging faed
- 6:14website and open the models link there
- 6:17are so many different models available
- 6:20some of the models will require the
- 6:22stronger computer power so keep in mind
- 6:25that maybe you can trun them but if you
- 6:28have powerful computer
- 6:30then it won't be a problem on the model
- 6:32page you can apply the filter and select
- 6:34different models from the list there
- 6:37models that helps you work with the
- 6:39computer vision images voices and so on
- 6:43if you want to know a bit more details
- 6:45about specific model simply click on it
- 6:48and then you will see the details
- 6:50sometimes you would need to accept the
- 6:52terms and condition before you are going
- 6:54to use the model and some model don't
- 6:57have it okay let's try one model in next
- 7:00I'm going to use text classification
- 7:02model let's select the most popular one
- 7:05okay this is BG ranker let's try it
- 7:09first simply click at the model and then
- 7:12follow the instructions inside as you
- 7:15could see in this model there's no terms
- 7:17and conditions so I have to just copy
- 7:19and paste the code and run it on my
- 7:22computer keep in mind that the
- 7:24instruction could be for different
- 7:25libraries as well so you don't have to
- 7:27follow everything find the one that
- 7:30related to Transformer and follow the
- 7:32instruction for the Transformer all you
- 7:35would need uh just copy the code into
- 7:38your ID and then run it this particular
- 7:41example of text classification I showed
- 7:44the relevant score for the answer on the
- 7:47specific question and as you could see
- 7:49in the example the first question is
- 7:51what is Panda and the answer is high so
- 7:54the score is negative and it means the
- 7:58answer is a relevant however for the
- 8:01second question we get high score and
- 8:04seems the answer is relevant this is
- 8:06really simple example but it showcase
- 8:09how it's easy to use huging face let me
- 8:12demonstrate for you one more example
- 8:14this time let's try Tex generation model
- 8:17as you could see in the list we have DC
- 8:18car1 Mistral L Lama and many other
- 8:22models I'm going to try P4 mini from
- 8:25Microsoft because it's lightwe and
- 8:27doesn't require a lot of memory Okay
- 8:30click at the model then you can read the
- 8:32instruction or you can click this black
- 8:34button use this model and then copy and
- 8:38paste the code from here keep in mind
- 8:40that sometimes under the button the code
- 8:44is not full you would need to modify it
- 8:46a bit I would recommend you to use the
- 8:48instruction instead but if you have
- 8:50experience you definitely can use this
- 8:53method okay I paste the code and let's
- 8:55try to run it if you will encounter this
- 8:58error like me have on the the screen now
- 9:00it is a probably due to the fact that
- 9:02after you install cro you haven't
- 9:04restart your computer simply restart
- 9:06your computer and the error should gone
- 9:09okay I restarted my computer let's go
- 9:11back to the huging face website I'm
- 9:13going to copy the code from the
- 9:15instruction I will slightly modify the
- 9:17code I will remove first three questions
- 9:20and leave only the last one okay let's
- 9:22try to run the code and see the result
- 9:24and as you could see the model can solve
- 9:28this simple math problem and it gives me
- 9:30correct answer okay let me show you one
- 9:33more example probably the final one this
- 9:35time we will try to work with images I'm
- 9:38going to select image to text model we
- 9:40are going to try a blip from Salesforce
- 9:42this model will help us to understand
- 9:44what is on the picture or basically you
- 9:47can use it to create captions for the
- 9:49pictures for example I'm going to copy
- 9:51the example so simply copy this code and
- 9:54paste it inside your ID first I'm going
- 9:57to use default code and then I will will
- 9:59adjust it to use my picture in this
- 10:02example we see dog beach and the lady
- 10:05let's try to run the code and see what
- 10:07caption we get and here we go this is
- 10:09the result and as you could see the
- 10:12result is correct let's try to modify
- 10:14code a bit this time I'm going to use my
- 10:16picture and let's see if the model can
- 10:19understand it I'm going to use this
- 10:20obsidian sync image let me quickly fix
- 10:23the code and run it and here we go this
- 10:26is the result and as you could see the
- 10:29capture is correct and I think this is
- 10:31the last example I don't think you need
- 10:34any extra details please give it a try
- 10:36try different models and see what you
- 10:38can get in terms of pricing hgen face
- 10:42actually is free but you can get Pro
- 10:44count that gives you additional features
- 10:47I would recommend you to try free first
- 10:49and then decide it if you need the paid
- 10:52one and that's probably it if you will
- 10:54like this video and you will like
- 10:56hugging face I'm going to create a video
- 10:58about how you can train your llm and
- 11:01upload it into huging face if you're
- 11:04interested please let me know in
- 11:06comments below and that's it as you can
- 11:08see it's really easy to use and it's
- 11:11really powerful if you like this video
- 11:13please click like if you don't like this
- 11:15video it's okay please click like but
- 11:19share with me your feedback in comments
- 11:20below watch my other videos because they
- 11:23are really useful and if you haven't
- 11:25subscribed to my channel yet please
- 11:28subscribe and don't forget to click Bell
- 11:32button to get notification about my new
- 11:35videos because they will be really
- 11:38useful okay thank you so much for
- 11:40watching this video till the end thank
- 11:42you so much for your support and I hope
- 11:45to see you in my next video bye
About this transcript
This page contains the full transcript of Hugging Face Tutorial for Beginners by proflead, generated from the public captions YouTube serves with the video. The transcript has 1,909 words across 267 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.