Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,11 @@ async def predict(request: Request):
|
|
36 |
"attention_mask": attention_mask
|
37 |
})
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
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))
|