Spaces:
Runtime error
Runtime error
Update new_app.py
Browse files25 unmodified lines262728293031323325 unmodified linesreturn keras.models.load_model("0.0008-0.92.keras", compile=False)def preprocess(img: Image.Image, size=(640, 640)) -> np.ndarray:img = img.resize(size, Image.BILINEAR)arr = np.asarray(img, dtype=np.float32) / 255.0return np.expand_dims(arr, axis=0)def status_text(pct: float) -> str:25 unmodified lines2627282930313225 unmodified linesreturn keras.models.load_model("0.0008-0.92.keras", compile=False)def preprocess(img: Image.Image, size=(640, 640)) -> np.ndarray:arr = np.asarray(img, dtype=np.float32) # no /255.0, no resizereturn np.expand_dims(arr, axis=0)def status_text(pct: float) -> str:
new_app.py+1-2