Qinglinz commited on
Commit
2312791
1 Parent(s): ad65e12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -81,9 +81,10 @@ def titanic(pclass, sex, age, fare, embarked, familysize, appellation, cabin):
81
 
82
  # 'res' is a list of predictions returned as the label.
83
  res = model.predict(np.asarray(input_list).reshape(1, -1))
 
84
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
85
  # the first element.
86
- titanic_url = "https://github.com/Qinglin2000/ID2223" + str(res[0]) + ".png?raw=true"
87
  img = Image.open(requests.get(titanic_url, stream=True).raw)
88
  return img
89
 
 
81
 
82
  # 'res' is a list of predictions returned as the label.
83
  res = model.predict(np.asarray(input_list).reshape(1, -1))
84
+ res = res.astype(int)
85
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
86
  # the first element.
87
+ titanic_url = "https://github.com/Qinglin2000/ID2223/" + str(res[0]) + ".png"
88
  img = Image.open(requests.get(titanic_url, stream=True).raw)
89
  return img
90