Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,11 @@ from prediction import predict_eeg_recording
|
|
| 8 |
app = FastAPI(title="EEG Epilepsy Prediction API")
|
| 9 |
model = tf.keras.models.load_model('model1_2dcnn.h5')
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
@app.post("/predict")
|
| 12 |
async def predict_endpoint(file: UploadFile = File(...)):
|
| 13 |
try:
|
|
|
|
| 8 |
app = FastAPI(title="EEG Epilepsy Prediction API")
|
| 9 |
model = tf.keras.models.load_model('model1_2dcnn.h5')
|
| 10 |
|
| 11 |
+
# ✅ Ajout du endpoint GET /
|
| 12 |
+
@app.get("/")
|
| 13 |
+
async def root():
|
| 14 |
+
return {"message": "Bienvenue sur l'API EEG Epilepsy. Utilisez POST /predict pour soumettre un fichier EDF."}
|
| 15 |
+
|
| 16 |
@app.post("/predict")
|
| 17 |
async def predict_endpoint(file: UploadFile = File(...)):
|
| 18 |
try:
|