Dockerfile changes 2
Browse files
main.py
CHANGED
|
@@ -20,7 +20,7 @@ class InputData(BaseModel):
|
|
| 20 |
last_crop: str
|
| 21 |
crop: str
|
| 22 |
|
| 23 |
-
@app.post("/
|
| 24 |
def predict(data: InputData):
|
| 25 |
# Compute target encoding for last_crop and crop
|
| 26 |
last_crop_encoded = df[df["last_crop"] == data.last_crop]["expected_yield"].mean()
|
|
@@ -52,3 +52,7 @@ def predict(data: InputData):
|
|
| 52 |
|
| 53 |
if __name__ == "__main__":
|
| 54 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
last_crop: str
|
| 21 |
crop: str
|
| 22 |
|
| 23 |
+
@app.post("/")
|
| 24 |
def predict(data: InputData):
|
| 25 |
# Compute target encoding for last_crop and crop
|
| 26 |
last_crop_encoded = df[df["last_crop"] == data.last_crop]["expected_yield"].mean()
|
|
|
|
| 52 |
|
| 53 |
if __name__ == "__main__":
|
| 54 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|