malmukhtar commited on
Commit
60790e5
·
1 Parent(s): f56d84c

Update accessibility_classifier/api.py

Browse files
Files changed (1) hide show
  1. accessibility_classifier/api.py +5 -0
accessibility_classifier/api.py CHANGED
@@ -9,6 +9,11 @@ async def read_root(issue: str, model: Model = Depends(get_model)):
9
  return {"Accessibility": str(accessibility_confidence),
10
  "Non-accessibility": str(nonaccessibility_confidence)}
11
 
 
 
 
 
 
12
  # @app.post("/")
13
  # async def predict(issue: str, model: Model = Depends(get_model)):
14
  # accessibility_confidence, nonaccessibility_confidence = model.predict(issue)
 
9
  return {"Accessibility": str(accessibility_confidence),
10
  "Non-accessibility": str(nonaccessibility_confidence)}
11
 
12
+ @app.post("/")
13
+ async def pred(issue: str, model: Model = Depends(get_model)):
14
+ accessibility_confidence, nonaccessibility_confidence = model.predict(issue)
15
+ return {"Accessibility": str(accessibility_confidence),
16
+ "Non-accessibility": str(nonaccessibility_confidence)}
17
  # @app.post("/")
18
  # async def predict(issue: str, model: Model = Depends(get_model)):
19
  # accessibility_confidence, nonaccessibility_confidence = model.predict(issue)