chryzxc commited on
Commit
d7d161f
·
verified ·
1 Parent(s): 4afa954

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -36,7 +36,11 @@ async def predict(request: Request):
36
  "attention_mask": attention_mask
37
  })
38
 
39
- return {"embedding": outputs[0].tolist()}
 
 
 
 
40
 
41
  except Exception as e:
42
  raise HTTPException(status_code=400, detail=str(e))
 
36
  "attention_mask": attention_mask
37
  })
38
 
39
+ result = {
40
+ "embedding": outputs[0].astype(np.float32).tolist() # Force float32 conversion
41
+ }
42
+
43
+ return jsonable_encoder(result)
44
 
45
  except Exception as e:
46
  raise HTTPException(status_code=400, detail=str(e))