F-G Fernandez
commited on
Commit
•
bcbd897
1
Parent(s):
fc36b00
fix: Fixed typo
Browse files
app.py
CHANGED
@@ -16,10 +16,10 @@ from PIL import Image
|
|
16 |
REPO = "frgfm/rexnet1_0x"
|
17 |
|
18 |
# Download model config & checkpoint
|
19 |
-
with open(hf_hub_download(
|
20 |
cfg = json.load(f)
|
21 |
|
22 |
-
ort_session = onnxruntime.InferenceSession(hf_hub_download(
|
23 |
|
24 |
def preprocess_image(pil_img: Image.Image) -> np.ndarray:
|
25 |
"""Preprocess an image for inference
|
|
|
16 |
REPO = "frgfm/rexnet1_0x"
|
17 |
|
18 |
# Download model config & checkpoint
|
19 |
+
with open(hf_hub_download(REPO, filename="config.json"), "rb") as f:
|
20 |
cfg = json.load(f)
|
21 |
|
22 |
+
ort_session = onnxruntime.InferenceSession(hf_hub_download(REPO, filename="model.onnx"))
|
23 |
|
24 |
def preprocess_image(pil_img: Image.Image) -> np.ndarray:
|
25 |
"""Preprocess an image for inference
|