Spaces:
Sleeping
Sleeping
Naman Omar commited on
Commit ·
3d16022
1
Parent(s): 5a2156d
Add application file
Browse files- app/__pycache__/main.cpython-311.pyc +0 -0
- app/main.py +1 -1
- app/model.pkl +1 -1
- app/train.py +1 -1
app/__pycache__/main.cpython-311.pyc
ADDED
|
Binary file (1.67 kB). View file
|
|
|
app/main.py
CHANGED
|
@@ -6,7 +6,7 @@ import numpy as np
|
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
# Load model at startup
|
| 9 |
-
with open("
|
| 10 |
model = pickle.load(f)
|
| 11 |
|
| 12 |
# Input schema
|
|
|
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
# Load model at startup
|
| 9 |
+
with open("model.pkl", "rb") as f:
|
| 10 |
model = pickle.load(f)
|
| 11 |
|
| 12 |
# Input schema
|
app/model.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 953
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a222468966875fe9f70f1ba95de4bae33f6958c6ff4845f22402eb7b307a0669
|
| 3 |
size 953
|
app/train.py
CHANGED
|
@@ -17,5 +17,5 @@ model = LogisticRegression(max_iter=200)
|
|
| 17 |
model.fit(X_train, y_train)
|
| 18 |
|
| 19 |
# Save model
|
| 20 |
-
with open("
|
| 21 |
pickle.dump(model, f)
|
|
|
|
| 17 |
model.fit(X_train, y_train)
|
| 18 |
|
| 19 |
# Save model
|
| 20 |
+
with open("model.pkl", "wb") as f:
|
| 21 |
pickle.dump(model, f)
|