You should convert values to integer.
Your model expects integers.
class Liste(BaseModel):
T_0: int
E_A: int
Which means you should send like this
{"T_0": int,"E_A": int}
But in your current situation, you are sending string
instead of int
.
Convert it to int using Number
or parseInt
then it should work.
Change your request method to post.
type: 'POST'
Also your change your method to post on your server side.
@app.post("/compute")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…