SamT6 commited on
Commit
2cba046
1 Parent(s): 5943ce0

disaster type class

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -23,7 +23,6 @@ disaster_types = np.array(sorted(['volcano', 'flooding', 'earthquake', 'fire', '
23
  damage_levels = np.array(['no damage', 'minor damage', 'major damage', 'destroyed'])
24
 
25
 
26
-
27
  def damage_classification(img):
28
  # prediction = np.random.rand(1, 2)[0]
29
  # return {damage_types[i]: prediction[i] for i in range(len(damage_types))}
@@ -58,7 +57,7 @@ def regional_damage_classification(img):
58
 
59
 
60
  iface = gr.Interface(
61
- fn = [damage_classification, disaster_classification, regional_damage_classification],
62
  inputs = gr.inputs.Image(shape=(1024, 1024), image_mode='RGB', invert_colors=False, source="upload", type='numpy'),
63
  outputs = gr.outputs.Label(),
64
  allow_screenshot=True,
 
23
  damage_levels = np.array(['no damage', 'minor damage', 'major damage', 'destroyed'])
24
 
25
 
 
26
  def damage_classification(img):
27
  # prediction = np.random.rand(1, 2)[0]
28
  # return {damage_types[i]: prediction[i] for i in range(len(damage_types))}
 
57
 
58
 
59
  iface = gr.Interface(
60
+ fn = [disaster_classification],
61
  inputs = gr.inputs.Image(shape=(1024, 1024), image_mode='RGB', invert_colors=False, source="upload", type='numpy'),
62
  outputs = gr.outputs.Label(),
63
  allow_screenshot=True,