## The Hugging Face Ecosystem
Hugging Face is the GitHub of machine learning — hosting 500K+ models, 100K+ datasets, and providing tools to use them.
### Pipeline API
The simplest way to use any model:
```python from transformers import pipeline
# Text generation generator = pipeline("text-generation", model="meta-llama/Llama-3.1-8B-Instruct") result = generator("The future of AI is", max_new_tokens=100)
# Sentiment analysis classifier = pipeline("sentiment-analysis") result = classifier("I love this product!") # [{"label": "POSITIVE", "score": 0.9998}]
# Summarization summarizer = pipeline("summarization", model="facebook/bart-large-cnn") result = summarizer(long_text, max_length=130, min_length=30) ```
### Available Pipelines
| Pipeline | Use Case | |----------|----------| | text-generation | Chat, completion, creative writing | | text-classification | Sentiment, topic, intent | | summarization | Document summarization | | translation | Language translation | | question-answering | Extract answers from context | | image-classification | Label images | | object-detection | Find objects in images | | automatic-speech-recognition | Transcribe audio |
### Installation
```bash pip install transformers torch # PyTorch backend pip install transformers[tf] # TensorFlow backend ```