Spaces:
Runtime error
Runtime error
Commit
·
c0f6b9f
1
Parent(s):
5281ade
update description and model
Browse files
Haiti-Gingerbread-2.jpg
ADDED
|
app.py
CHANGED
|
@@ -9,7 +9,7 @@ class_names = ['none','mild','severe']
|
|
| 9 |
|
| 10 |
cwd = os.getcwd()
|
| 11 |
outpath= os.path.join(cwd,"model")
|
| 12 |
-
model_name = '
|
| 13 |
loaded_model = models.load_model(os.path.join(outpath,model_name))
|
| 14 |
|
| 15 |
def _classifier(inp):
|
|
@@ -19,6 +19,10 @@ def _classifier(inp):
|
|
| 19 |
return {class_names[i]:float(preds[i]) for i in range(len(class_names))}
|
| 20 |
|
| 21 |
iface = gr.Interface(fn=_classifier,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
inputs=gr.inputs.Image(shape=(IMG_SIZE, IMG_SIZE)),
|
| 23 |
outputs=gr.outputs.Label()
|
| 24 |
)
|
|
|
|
| 9 |
|
| 10 |
cwd = os.getcwd()
|
| 11 |
outpath= os.path.join(cwd,"model")
|
| 12 |
+
model_name = 'cross_event_ecuador_haiti_efficientnet_fine_tuned_1644086357.h5'
|
| 13 |
loaded_model = models.load_model(os.path.join(outpath,model_name))
|
| 14 |
|
| 15 |
def _classifier(inp):
|
|
|
|
| 19 |
return {class_names[i]:float(preds[i]) for i in range(len(class_names))}
|
| 20 |
|
| 21 |
iface = gr.Interface(fn=_classifier,
|
| 22 |
+
title="Disaster damage assessment from social media image",
|
| 23 |
+
description="This simple app allow users to load an image and assess the extent of damage cause by an earthquake",
|
| 24 |
+
article="The severity of damage in an image is the extent of physical destruction shown in it. For this experiment we only consider three level of damages :severe damage,mild damage and no damage (none)",
|
| 25 |
+
examples=['Haiti-Gingerbread-2.jpg','building_damage_100.jpg','building_damage_424.jpg'],
|
| 26 |
inputs=gr.inputs.Image(shape=(IMG_SIZE, IMG_SIZE)),
|
| 27 |
outputs=gr.outputs.Label()
|
| 28 |
)
|
building_damage_100.jpg
ADDED
|
building_damage_424.jpg
ADDED
|
model/{cross_event_ecuador_efficientnet_fine_tuned_1644001286.h5 → cross_event_ecuador_haiti_efficientnet_fine_tuned_1644086357.h5}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 130172176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8bf472540c7eaadfce6bdd6c6bf8990a17f71a3e536a6821c13c97d3406f4ae0
|
| 3 |
size 130172176
|