Instructions to use LH-Tech-AI/GyroScope with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LH-Tech-AI/GyroScope with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="LH-Tech-AI/GyroScope") 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("LH-Tech-AI/GyroScope") model = AutoModelForImageClassification.from_pretrained("LH-Tech-AI/GyroScope") - Notebooks
- Google Colab
- Kaggle
Update use.py
Browse files
use.py
CHANGED
|
@@ -57,7 +57,7 @@ def fix_image_from_url(url: str):
|
|
| 57 |
|
| 58 |
fig, axes = plt.subplots(1, 2, figsize=(12, 5))
|
| 59 |
axes[0].imshow(img); axes[0].set_title("Input"); axes[0].axis("off")
|
| 60 |
-
axes[1].imshow(corrected); axes[1].set_title("
|
| 61 |
plt.tight_layout(); plt.show()
|
| 62 |
return corrected
|
| 63 |
|
|
|
|
| 57 |
|
| 58 |
fig, axes = plt.subplots(1, 2, figsize=(12, 5))
|
| 59 |
axes[0].imshow(img); axes[0].set_title("Input"); axes[0].axis("off")
|
| 60 |
+
axes[1].imshow(corrected); axes[1].set_title("Corrected"); axes[1].axis("off")
|
| 61 |
plt.tight_layout(); plt.show()
|
| 62 |
return corrected
|
| 63 |
|