Nilayan87/ocean_hazard_onnx
By Nilayan87 · ↓ 0 · ♥ 0 · Updated 2025-09-20
What's in this repo
This page lists the files in Nilayan87/ocean_hazard_onnx, including model.onnx, model_quantized.onnx.
- 2 ONNX models (.onnx files)
- 13 files, including 5 .json, 2 .onnx, 1 .md, 1 .py, 1 .txt, 1 .model
- Last updated 2025-09-20
ONNX files
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
🌊 Ocean Hazard Detection (Quantized ONNX)
This repository contains a quantized ONNX version of the Ocean Hazard Detection model, optimized for faster inference and lower memory usage.
The model can classify social media posts into:
- Hazard Report
- Non-Hazard
📂 Files
model_quantized.onnx: Quantized ONNX modelconfig.json: Model configurationtokenizer.json,spiece.model: Tokenizer filesspecial_tokens_map.json,tokenizer_config.json: Tokenizer configsort_config.json: ONNX Runtime configuration
🚀 Usage Example
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer
import torch
# Load model + tokenizer
model = ORTModelForSequenceClassification.from_pretrained("Nilayan87/ocean_hazard_onnx")
tokenizer = AutoTokenizer.from_pretrained("Nilayan87/ocean_hazard_onnx")
# Example input
text = "Cyclone alert near Vizag coast ⚠️ stay safe!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
# Prediction
pred = torch.argmax(outputs.logits, dim=1).item()
print("Prediction:", pred)
Files (13)
.gitattributes
README.md
app.py
config.json
model.onnx
ONNX
model_quantized.onnx
ONNX
ocean_hazard_onnx/.gitattributes
ort_config.json
requirements.txt
special_tokens_map.json
spiece.model
tokenizer.json
tokenizer_config.json
Related models
More from Nilayan87
No other models by this author.
More models
No task type declared.