SamT6 commited on
Commit
5061a14
1 Parent(s): e43f87b

disaster type class

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -40,8 +40,10 @@ def disaster_classification(img):
40
  image[0] = img
41
  # prediction = model.predict(image).tolist()[0]
42
  # prediction = np.random.rand(1, 6)[0]
 
43
  results = json.loads(rest_request(image, get_rest_url(model_name='disaster-classification-model', host='3.86.228.238')).content)
44
  prediction = results['predictions'][0]
 
45
 
46
  return {disaster_types[i]: prediction[i] for i in range(len(disaster_types))}
47
 
 
40
  image[0] = img
41
  # prediction = model.predict(image).tolist()[0]
42
  # prediction = np.random.rand(1, 6)[0]
43
+ print('hello')
44
  results = json.loads(rest_request(image, get_rest_url(model_name='disaster-classification-model', host='3.86.228.238')).content)
45
  prediction = results['predictions'][0]
46
+ print('hello back')
47
 
48
  return {disaster_types[i]: prediction[i] for i in range(len(disaster_types))}
49