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_with_UI.py
Browse files- use_with_UI.py +4 -0
use_with_UI.py
CHANGED
|
@@ -82,6 +82,10 @@ else:
|
|
| 82 |
if img:
|
| 83 |
st.divider()
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
# Use columns to keep the UI compact and side-by-side
|
| 86 |
col_left, col_right = st.columns(2)
|
| 87 |
|
|
|
|
| 82 |
if img:
|
| 83 |
st.divider()
|
| 84 |
|
| 85 |
+
manual_angle = st.slider("Manual Pre-rotation", min_value=0, max_value=360, value=0, step=90)
|
| 86 |
+
if manual_angle != 0:
|
| 87 |
+
img = img.rotate(manual_angle, expand=True) # expand=True prevents cropping
|
| 88 |
+
|
| 89 |
# Use columns to keep the UI compact and side-by-side
|
| 90 |
col_left, col_right = st.columns(2)
|
| 91 |
|