Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from fastapi import FastAPI
|
2 |
from pydantic import BaseModel
|
3 |
import pickle
|
4 |
import pandas as pd
|
@@ -51,12 +51,12 @@ The Patients class also includes a class method return_list_of_dict()
|
|
51 |
that converts the Patients object into a list of dictionaries"""
|
52 |
|
53 |
class Patient(BaseModel):
|
54 |
-
Blood_Work_R1: float
|
55 |
-
Blood_Pressure: float
|
56 |
-
Blood_Work_R3: float
|
57 |
-
BMI: float
|
58 |
-
Blood_Work_R4: float
|
59 |
-
Patient_age: int
|
60 |
|
61 |
|
62 |
"""Next block of code defines different parts of our API and how it responds to different requests.
|
|
|
1 |
+
from fastapi import FastAPI, Form
|
2 |
from pydantic import BaseModel
|
3 |
import pickle
|
4 |
import pandas as pd
|
|
|
51 |
that converts the Patients object into a list of dictionaries"""
|
52 |
|
53 |
class Patient(BaseModel):
|
54 |
+
Blood_Work_R1: float = Form(...)
|
55 |
+
Blood_Pressure: float = Form(...)
|
56 |
+
Blood_Work_R3: float = Form(...)
|
57 |
+
BMI: float = Form(...)
|
58 |
+
Blood_Work_R4: float = Form(...)
|
59 |
+
Patient_age: int = Form(...)
|
60 |
|
61 |
|
62 |
"""Next block of code defines different parts of our API and how it responds to different requests.
|