Spaces:
Sleeping
Sleeping
phonefern
commited on
Commit
·
c9fdbee
1
Parent(s):
8fc0265
'1
Browse files- Dockerfile +2 -2
- app.py +1 -1
Dockerfile
CHANGED
@@ -27,7 +27,7 @@ ENV HOME=/home/user \
|
|
27 |
PATH=/home/user/.local/bin:$PATH
|
28 |
|
29 |
# Expose the port uvicorn will run on
|
30 |
-
EXPOSE
|
31 |
|
32 |
# Define the default command to run the application
|
33 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
27 |
PATH=/home/user/.local/bin:$PATH
|
28 |
|
29 |
# Expose the port uvicorn will run on
|
30 |
+
EXPOSE 7860
|
31 |
|
32 |
# Define the default command to run the application
|
33 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
CHANGED
@@ -6,7 +6,7 @@ from pydantic import BaseModel
|
|
6 |
import uvicorn
|
7 |
|
8 |
# Load model from the local storage (ensure the model file is in the same directory)
|
9 |
-
model_path = "
|
10 |
gb_model_loaded = joblib.load(model_path)
|
11 |
|
12 |
# Create FastAPI app
|
|
|
6 |
import uvicorn
|
7 |
|
8 |
# Load model from the local storage (ensure the model file is in the same directory)
|
9 |
+
model_path = "model.pkl"
|
10 |
gb_model_loaded = joblib.load(model_path)
|
11 |
|
12 |
# Create FastAPI app
|