amanmibra commited on
Commit
89ab250
·
1 Parent(s): f50939b

Added AISF void model + and add model to api

Browse files
models/aisf/void_20230516_193200.pth ADDED
Binary file (821 kB). View file
 
server/main.py CHANGED
@@ -14,9 +14,12 @@ from cnn import CNNetwork
14
 
15
  # load model
16
  model = CNNetwork()
17
- state_dict = torch.load("../models/void_demo.pth")
18
  model.load_state_dict(state_dict)
19
 
 
 
 
20
  print(f"Model loaded! \n {model}")
21
 
22
  app = FastAPI()
@@ -54,4 +57,5 @@ def model_predict(wav):
54
 
55
  return {
56
  "prediction_index": prediction_index,
 
57
  }
 
14
 
15
  # load model
16
  model = CNNetwork()
17
+ state_dict = torch.load("../models/aisf/void_20230516_193200.pth")
18
  model.load_state_dict(state_dict)
19
 
20
+ # TODO: update to grabbing labels stored on model
21
+ LABELS = ["shafqat", "aman", "jake"]
22
+
23
  print(f"Model loaded! \n {model}")
24
 
25
  app = FastAPI()
 
57
 
58
  return {
59
  "prediction_index": prediction_index,
60
+ "prediciton": LABELS[prediction_index],
61
  }