Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +1 -1
- app.py +1 -8
- requirements.txt +12 -0
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Use a minimal base image with Python 3.9 installed
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
# Set the working directory inside the container to /app
|
| 5 |
WORKDIR /app
|
|
|
|
| 1 |
# Use a minimal base image with Python 3.9 installed
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set the working directory inside the container to /app
|
| 5 |
WORKDIR /app
|
app.py
CHANGED
|
@@ -5,19 +5,12 @@ import joblib
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
from huggingface_hub import HfApi, login
|
| 8 |
-
#login(os.getenv("HF_TOKEN"))
|
| 9 |
-
|
| 10 |
-
# Download the model from the Model Hub
|
| 11 |
-
#model_path = hf_hub_download(
|
| 12 |
-
#repo_id="tam3222/tourism",
|
| 13 |
-
#filename="best_engine_prediction_model_v1.joblib"
|
| 14 |
-
#)
|
| 15 |
|
| 16 |
HF_TOKEN = os.getenv("HF_TOKEN") # Optional if repo is public
|
| 17 |
|
| 18 |
model_path = hf_hub_download(
|
| 19 |
repo_id="tam3222/Engine_Model",
|
| 20 |
-
filename="models/RandomForest.pkl",
|
| 21 |
repo_type="model",
|
| 22 |
token=HF_TOKEN # can be None for public repos
|
| 23 |
)
|
|
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
from huggingface_hub import HfApi, login
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
HF_TOKEN = os.getenv("HF_TOKEN") # Optional if repo is public
|
| 10 |
|
| 11 |
model_path = hf_hub_download(
|
| 12 |
repo_id="tam3222/Engine_Model",
|
| 13 |
+
filename="models/RandomForest.pkl",
|
| 14 |
repo_type="model",
|
| 15 |
token=HF_TOKEN # can be None for public repos
|
| 16 |
)
|
requirements.txt
CHANGED
|
@@ -2,11 +2,23 @@ pandas==2.2.2
|
|
| 2 |
numpy==1.26.4
|
| 3 |
matplotlib==3.8.4
|
| 4 |
seaborn==0.13.2
|
|
|
|
|
|
|
| 5 |
datasets==2.19.1
|
| 6 |
huggingface_hub==0.32.6
|
|
|
|
|
|
|
| 7 |
mlflow==3.0.1
|
|
|
|
|
|
|
| 8 |
pyngrok==7.1.3
|
|
|
|
|
|
|
| 9 |
scikit-learn==1.6.0
|
| 10 |
xgboost==2.1.4
|
|
|
|
|
|
|
|
|
|
| 11 |
joblib==1.5.1
|
| 12 |
streamlit==1.35.0
|
|
|
|
|
|
| 2 |
numpy==1.26.4
|
| 3 |
matplotlib==3.8.4
|
| 4 |
seaborn==0.13.2
|
| 5 |
+
|
| 6 |
+
# Hugging Face
|
| 7 |
datasets==2.19.1
|
| 8 |
huggingface_hub==0.32.6
|
| 9 |
+
|
| 10 |
+
# MLflow
|
| 11 |
mlflow==3.0.1
|
| 12 |
+
|
| 13 |
+
# ngrok
|
| 14 |
pyngrok==7.1.3
|
| 15 |
+
|
| 16 |
+
# Machine Learning
|
| 17 |
scikit-learn==1.6.0
|
| 18 |
xgboost==2.1.4
|
| 19 |
+
imbalanced-learn==0.12.3
|
| 20 |
+
|
| 21 |
+
# Utilities
|
| 22 |
joblib==1.5.1
|
| 23 |
streamlit==1.35.0
|
| 24 |
+
|