Spaces:
Sleeping
Sleeping
File size: 523 Bytes
a9e6328 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import onnxruntime as ort
import sys
from pathlib import Path
path = "models/informative_drawings.onnx"
if not Path(path).exists():
print(f"Error: {path} not found")
sys.exit(1)
print(f"Testing {path}...")
try:
session = ort.InferenceSession(path, providers=["CPUExecutionProvider"])
print("✓ Model loaded successfully")
print(f"Inputs: {[i.name for i in session.get_inputs()]}")
print(f"Outputs: {[o.name for o in session.get_outputs()]}")
except Exception as e:
print(f"✗ Failed: {e}")
|