Spaces:
Runtime error
Runtime error
trying to overcome '<' not supported between instances of 'numpy.ndarray' and 'str'
Browse files
app.py
CHANGED
@@ -68,8 +68,8 @@ def predict(age, female, race, elective, aweekend, zipinc_qrtl, hosp_region, hos
|
|
68 |
.apply(lambda x: x.astype('category'))
|
69 |
|
70 |
# converting ordinal column to ordinal
|
71 |
-
ordinal_cat = CategoricalDtype(categories = ['FirstQ', 'SecondQ', 'ThirdQ', 'FourthQ'], ordered = True)
|
72 |
-
df.zipinc_qrtl = df.zipinc_qrtl.astype(ordinal_cat)
|
73 |
|
74 |
# reading the model from GitHub
|
75 |
with urllib.request.urlopen('https://github.com/fmegahed/tavr_paper/blob/main/data/final_model.pkl?raw=true') as response, open('final_model.pkl', 'wb') as out_file:
|
|
|
68 |
.apply(lambda x: x.astype('category'))
|
69 |
|
70 |
# converting ordinal column to ordinal
|
71 |
+
#ordinal_cat = CategoricalDtype(categories = ['FirstQ', 'SecondQ', 'ThirdQ', 'FourthQ'], ordered = True)
|
72 |
+
#df.zipinc_qrtl = df.zipinc_qrtl.astype(ordinal_cat)
|
73 |
|
74 |
# reading the model from GitHub
|
75 |
with urllib.request.urlopen('https://github.com/fmegahed/tavr_paper/blob/main/data/final_model.pkl?raw=true') as response, open('final_model.pkl', 'wb') as out_file:
|