Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,17 +9,16 @@ from streamlit_drawable_canvas import st_canvas
|
|
| 9 |
from huggingface_hub import hf_hub_download
|
| 10 |
from tensorflow import keras
|
| 11 |
from huggingface_hub import from_pretrained_keras
|
| 12 |
-
from urllib.request import urlretrieve
|
| 13 |
|
| 14 |
|
| 15 |
# Load the model (using a Streamlit caching mechanism for efficiency)
|
| 16 |
@st.cache(allow_output_mutation=True) # Allow model mutation for prediction
|
| 17 |
def load_model():
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
|
| 24 |
# Function to preprocess the input image
|
| 25 |
def preprocess_image(image):
|
|
|
|
| 9 |
from huggingface_hub import hf_hub_download
|
| 10 |
from tensorflow import keras
|
| 11 |
from huggingface_hub import from_pretrained_keras
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
# Load the model (using a Streamlit caching mechanism for efficiency)
|
| 15 |
@st.cache(allow_output_mutation=True) # Allow model mutation for prediction
|
| 16 |
def load_model():
|
| 17 |
+
files = [f for f in os.listdir('.') if os.path.isfile(f)]
|
| 18 |
+
print(f"FILES :: {files}")
|
| 19 |
+
return keras.models.load_model("IM_417_128.keras")
|
| 20 |
+
|
| 21 |
+
|
| 22 |
|
| 23 |
# Function to preprocess the input image
|
| 24 |
def preprocess_image(image):
|