Spaces:
Sleeping
Sleeping
Update backend/main.py
Browse files- backend/main.py +5 -2
backend/main.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from operator import index
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import numpy as np
|
| 4 |
import matplotlib.pyplot as plt
|
|
@@ -74,7 +75,9 @@ def predict(data : TransactionModel):
|
|
| 74 |
return {"predictions": predictions.tolist()}
|
| 75 |
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
| 79 |
|
| 80 |
|
|
|
|
| 1 |
from operator import index
|
| 2 |
+
import os
|
| 3 |
import pandas as pd
|
| 4 |
import numpy as np
|
| 5 |
import matplotlib.pyplot as plt
|
|
|
|
| 75 |
return {"predictions": predictions.tolist()}
|
| 76 |
|
| 77 |
|
| 78 |
+
|
| 79 |
+
host = os.getenv("HOST", "0.0.0.0")
|
| 80 |
+
port = os.getenv("PORT", 8000)
|
| 81 |
+
uvicorn.run("main:app", host=host, port=port)
|
| 82 |
|
| 83 |
|