Instructions to use shoni/comic-sans-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shoni/comic-sans-detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="shoni/comic-sans-detector") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("shoni/comic-sans-detector") model = AutoModelForImageClassification.from_pretrained("shoni/comic-sans-detector") - Notebooks
- Google Colab
- Kaggle
readme note
Browse files
README.md
CHANGED
|
@@ -64,7 +64,7 @@ The dataset used for training and evaluation should follow this structure:
|
|
| 64 |
|
| 65 |
### 1. Clone the Repository
|
| 66 |
```bash
|
| 67 |
-
git clone https://huggingface.co/
|
| 68 |
cd comic-sans-detector
|
| 69 |
```
|
| 70 |
|
|
@@ -81,11 +81,11 @@ If your dataset images are not in a consistent format, use `image-format-general
|
|
| 81 |
|
| 82 |
The fine-tuned model can be deployed directly via the Hugging Face Inference API. Once uploaded, the model can be used to classify whether an image contains Comic Sans font.
|
| 83 |
|
| 84 |
-
Example API usage (replace `
|
| 85 |
```python
|
| 86 |
from transformers import pipeline
|
| 87 |
|
| 88 |
-
classifier = pipeline("image-classification", model="
|
| 89 |
result = classifier("path/to/image.jpg")
|
| 90 |
print(result)
|
| 91 |
```
|
|
|
|
| 64 |
|
| 65 |
### 1. Clone the Repository
|
| 66 |
```bash
|
| 67 |
+
git clone https://huggingface.co/shoni/comic-sans-detector
|
| 68 |
cd comic-sans-detector
|
| 69 |
```
|
| 70 |
|
|
|
|
| 81 |
|
| 82 |
The fine-tuned model can be deployed directly via the Hugging Face Inference API. Once uploaded, the model can be used to classify whether an image contains Comic Sans font.
|
| 83 |
|
| 84 |
+
Example API usage (replace `shoni/comic-sans-detector` with your repository name):
|
| 85 |
```python
|
| 86 |
from transformers import pipeline
|
| 87 |
|
| 88 |
+
classifier = pipeline("image-classification", model="shoni/comic-sans-detector")
|
| 89 |
result = classifier("path/to/image.jpg")
|
| 90 |
print(result)
|
| 91 |
```
|