RUVNE commited on
Commit ·
a747b47
1
Parent(s): bd002c5
feat: init route
Browse files
app.py
CHANGED
|
@@ -73,6 +73,10 @@ def hash_image(image: Image.Image) -> str:
|
|
| 73 |
image_bytes = image.tobytes()
|
| 74 |
return hashlib.md5(image_bytes).hexdigest()
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
# === Endpoint: Prediksi Gambar ===
|
| 78 |
@app.post("/predict-image")
|
|
|
|
| 73 |
image_bytes = image.tobytes()
|
| 74 |
return hashlib.md5(image_bytes).hexdigest()
|
| 75 |
|
| 76 |
+
@app.get("/")
|
| 77 |
+
async def root():
|
| 78 |
+
return {"message": "Selamat datang di AgroLens Backend!"}
|
| 79 |
+
|
| 80 |
|
| 81 |
# === Endpoint: Prediksi Gambar ===
|
| 82 |
@app.post("/predict-image")
|