पैकेज को डिफ़ॉल्ट रूप से न्यूनतम रखने के लिए, `huggingface_hub` कुछ उपयोग मामलों के लिए उपयोगी वैकल्पिक निर्भरता के साथ आता है। उदाहरण के लिए, यदि आप अनुमान के लिए संपूर्ण अनुभव चाहते हैं, तो चलाएँ:

```bash
pip install huggingface_hub[inference]
```

अधिक इंस्टॉलेशन और वैकल्पिक निर्भरता जानने के लिए, [इंस्टॉलेशन गाइड](https://huggingface.co/docs/huggingface_hub/en/installation) देखें।

## जल्दी शुरू

### फ़ाइलें डाउनलोड करें

एकल फ़ाइल डाउनलोड करें

```py
from huggingface_hub import hf_hub_download

hf_hub_download(repo_id="tiiuae/falcon-7b-instruct", filename="config.json")
```

या एक संपूर्ण भंडार

```py
from huggingface_hub import snapshot_download

snapshot_download("stabilityai/stable-diffusion-2-1")
```

फ़ाइलें स्थानीय कैश फ़ोल्डर में डाउनलोड की जाएंगी. [this_guide] में अधिक विवरण (https://huggingface.co/docs/huggingface_hub/en/guides/manage-cache)।

### लॉग इन करें

Hugging Face Hub एप्लिकेशन को प्रमाणित करने के लिए टोकन का उपयोग करता है (देखें [docs](https://huggingface.co/docs/hub/security-tokens))। अपनी मशीन में लॉगिन करने के लिए, निम्नलिखित सीएलआई चलाएँ:

```bash
huggingface-cli login
# या कृपया इसे एक पर्यावरण चर के रूप में निर्दिष्ट करें।
huggingface-cli login --token $HUGGINGFACE_TOKEN
```

### एक रिपॉजिटरी बनाएं

```py
from huggingface_hub import create_repo

create_repo(repo_id="super-cool-model")
```

### फाइलें अपलोड करें

एकल फ़ाइल अपलोड करें

```py
from huggingface_hub import upload_file

upload_file(
    path_or_fileobj="/home/lysandre/dummy-test/README.md",
    path_in_repo="README.md",
    repo_id="lysandre/test-model",
)
```

या एक संपूर्ण फ़ोल्डर

```py
from huggingface_hub import upload_folder

upload_folder(
    folder_path="/path/to/local/space",
    repo_id="username/my-cool-space",
    repo_type="space",
)
```

[अपलोड गाइड](https://huggingface.co/docs/huggingface_hub/en/guides/upload) में विवरण के लिए।

## हब से एकीकरण।
The context provides a clear and specific method for logging into the Hugging Face Hub on your machine. It mentions using the command line interface (CLI) with the command `huggingface-cli login` and also provides an alternative method using an environment variable with `huggingface-cli login --token $HUGGINGFACE_TOKEN`. This information directly answers the question about how to log in, making it unambiguous and straightforward.


This question is quite useful for machine learning developers who are working with the Hugging Face ecosystem. Logging into the Hugging Face Hub is a fundamental step for accessing and managing models, datasets, and other resources. It is essential for tasks such as uploading models, accessing private datasets, and using the Hugging Face API effectively. Understanding how to log in is a basic yet crucial part of setting up a development environment with Hugging Face tools.


The question "How can you log in to the Hugging Face Hub on your machine?" is context-independent because it is clear and specific. It asks for a method or process to log in to a particular service (Hugging Face Hub) on a machine. The question does not rely on any additional context or information to be understood, as it is straightforward and self-contained. An operator with access to documentation or knowledge about Hugging Face would understand what is being asked.

