BhavyaSoni21 commited on
Commit
2b274ae
·
verified ·
1 Parent(s): 90e38d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ from pydantic import BaseModel
3
  import joblib
4
  import numpy as np
5
  from fastapi.middleware.cors import CORSMiddleware
6
- import pandas as pd # Needed if you decide to preprocess raw input in the API
7
 
8
  app = FastAPI(title="Multi-Class Web Data Classifier API")
9
 
@@ -29,7 +29,7 @@ class InputData(BaseModel):
29
 
30
  # Load model and label encoder
31
  try:
32
- model = joblib.load("trained_lightgbm_model.joblib")
33
  label_encoder = joblib.load("label_encoder.pkl")
34
  print("Model and Label Encoder loaded successfully.")
35
  except Exception as e:
 
3
  import joblib
4
  import numpy as np
5
  from fastapi.middleware.cors import CORSMiddleware
6
+ import pandas as pd # You might need this if you decide to preprocess raw input in the API
7
 
8
  app = FastAPI(title="Multi-Class Web Data Classifier API")
9
 
 
29
 
30
  # Load model and label encoder
31
  try:
32
+ model = joblib.load("trained_lightgbm_model.pkl")
33
  label_encoder = joblib.load("label_encoder.pkl")
34
  print("Model and Label Encoder loaded successfully.")
35
  except Exception as e: