Instructions to use Nekshay/Finetuned-MobilVIT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nekshay/Finetuned-MobilVIT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Nekshay/Finetuned-MobilVIT") 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("Nekshay/Finetuned-MobilVIT") model = AutoModelForImageClassification.from_pretrained("Nekshay/Finetuned-MobilVIT") - Notebooks
- Google Colab
- Kaggle
Update table_deskew.py
Browse files- table_deskew.py +20 -0
table_deskew.py
CHANGED
|
@@ -103,3 +103,23 @@ if __name__ == "__main__":
|
|
| 103 |
out_img = fix_orientation_and_deskew(img)
|
| 104 |
cv2.imwrite("out_img_fixed.png", out_img)
|
| 105 |
print("Image processing complete. Saved as 'out_img_fixed.png'.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
out_img = fix_orientation_and_deskew(img)
|
| 104 |
cv2.imwrite("out_img_fixed.png", out_img)
|
| 105 |
print("Image processing complete. Saved as 'out_img_fixed.png'.")
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
import subprocess
|
| 109 |
+
|
| 110 |
+
cert_file = "certis3.crt"
|
| 111 |
+
|
| 112 |
+
try:
|
| 113 |
+
result = subprocess.run(
|
| 114 |
+
["openssl", "x509", "-in", cert_file, "-text", "-noout"],
|
| 115 |
+
capture_output=True,
|
| 116 |
+
text=True,
|
| 117 |
+
check=True
|
| 118 |
+
)
|
| 119 |
+
print("Certificate Details:\n")
|
| 120 |
+
print(result.stdout)
|
| 121 |
+
except subprocess.CalledProcessError as e:
|
| 122 |
+
print("Error running openssl command:")
|
| 123 |
+
print(e.stderr)
|
| 124 |
+
except FileNotFoundError:
|
| 125 |
+
print("OpenSSL executable not found. Ensure it's installed and in PATH.")
|