Instructions to use siddheshtv/BlockNet10 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use siddheshtv/BlockNet10 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="siddheshtv/BlockNet10") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import BlockNet10 model = BlockNet10.from_pretrained("siddheshtv/BlockNet10", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download analytics.py from siddheshtv/BlockNet10: direct link, hf CLI and curl.
- Browser
- Download file 670 Bytes
-
https://huggingface.co/siddheshtv/BlockNet10/resolve/main/analytics.py
- Command line
-
hf download hf://siddheshtv/BlockNet10/analytics.py
-
curl -L -o analytics.py https://huggingface.co/siddheshtv/BlockNet10/resolve/main/analytics.py
670 Bytes
| import matplotlib.pyplot as plt | |
| def model_analytics(train_losses, train_accuracies, test_accuracies): | |
| plt.figure(figsize=(10, 5)) | |
| plt.subplot(1, 2, 1) | |
| plt.plot(train_losses, label='Training Loss') | |
| plt.xlabel('Batch') | |
| plt.ylabel('Loss') | |
| plt.title('Loss per Training Batch') | |
| plt.legend() | |
| plt.subplot(1, 2, 2) | |
| plt.plot(train_accuracies, label='Training Accuracy') | |
| plt.plot(test_accuracies, label='Test Accuracy') | |
| plt.xlabel('Epoch') | |
| plt.ylabel('Accuracy (%)') | |
| plt.title('Training and Test Accuracies') | |
| plt.legend() | |
| plt.tight_layout() | |
| plt.savefig("analytics.png") | |
| return "✅ Figure saved successfully" |