Spaces:
Running
Running
alibidaran
commited on
Commit
•
c18889e
1
Parent(s):
63292fe
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,11 @@ import numpy as np
|
|
4 |
from PIL import Image
|
5 |
import cv2
|
6 |
from torchvision import models,transforms
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
tfms = transforms.Compose([
|
9 |
transforms.ToTensor(),
|
|
|
4 |
from PIL import Image
|
5 |
import cv2
|
6 |
from torchvision import models,transforms
|
7 |
+
core = Core()
|
8 |
+
|
9 |
+
# Read model to OpenVINO Runtime
|
10 |
+
model_onnx = core.read_model(model=onnx_path)
|
11 |
+
compiled_model_onnx = core.compile_model(model=model_onnx, device_name='CPU')
|
12 |
|
13 |
tfms = transforms.Compose([
|
14 |
transforms.ToTensor(),
|