Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ import gradio as gr
|
|
5 |
import numpy as np
|
6 |
import tensorflow as tf
|
7 |
|
8 |
-
# Ensure the model file exists before loading
|
9 |
model_path = "sleep_cognition_model.h5"
|
10 |
|
|
|
11 |
if not os.path.exists(model_path):
|
12 |
-
raise FileNotFoundError(f"⚠️ Model file not found: {model_path}. Please upload it.")
|
13 |
|
14 |
|
15 |
# Load the trained model
|
|
|
5 |
import numpy as np
|
6 |
import tensorflow as tf
|
7 |
|
|
|
8 |
model_path = "sleep_cognition_model.h5"
|
9 |
|
10 |
+
# Check if the model file exists before loading
|
11 |
if not os.path.exists(model_path):
|
12 |
+
raise FileNotFoundError(f"⚠️ Model file not found: {model_path}. Please upload it to Hugging Face Space.")
|
13 |
|
14 |
|
15 |
# Load the trained model
|