Update app.py
Browse files
app.py
CHANGED
@@ -45,10 +45,10 @@ st.set_option("deprecation.showfileUploaderEncoding", False)
|
|
45 |
@st.cache_resource(show_spinner=False)
|
46 |
def load_model():
|
47 |
try:
|
48 |
-
# Attempt to load the model from Hugging Face
|
49 |
from huggingface_hub import from_pretrained_keras
|
50 |
keras.utils.set_random_seed(42)
|
51 |
-
model
|
|
|
52 |
return model
|
53 |
except Exception as e:
|
54 |
st.error(f"Error loading model from Hugging Face: {str(e)}")
|
|
|
45 |
@st.cache_resource(show_spinner=False)
|
46 |
def load_model():
|
47 |
try:
|
|
|
48 |
from huggingface_hub import from_pretrained_keras
|
49 |
keras.utils.set_random_seed(42)
|
50 |
+
# Load the model from Hugging Face
|
51 |
+
model = from_pretrained_keras("aaravlovescodes/PneumoniaDetection")
|
52 |
return model
|
53 |
except Exception as e:
|
54 |
st.error(f"Error loading model from Hugging Face: {str(e)}")
|