Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import matplotlib.pyplot as plt
|
|
4 |
|
5 |
import gradio as gr
|
6 |
|
|
|
7 |
|
8 |
def keras_inference(img_data, model_path):
|
9 |
model_path = attempt_download_from_hub(model_path)
|
@@ -17,15 +18,15 @@ def keras_inference(img_data, model_path):
|
|
17 |
|
18 |
inputs = [
|
19 |
gr.Image(type='filepath', label='Image'),
|
20 |
-
gr.Dropdown([
|
21 |
]
|
22 |
|
23 |
outputs = gr.Image(label='Segmentation')
|
24 |
|
25 |
examples = [
|
26 |
-
['data/testv1.jpg',
|
27 |
-
['data/testv2.jpg',
|
28 |
-
['data/testv3.jpg',
|
29 |
]
|
30 |
|
31 |
title = 'Segmenting Buildings in Satellite Images with Keras'
|
|
|
4 |
|
5 |
import gradio as gr
|
6 |
|
7 |
+
model_path = 'deprem-ml/deprem-keras-satellite-semantic-mapping'
|
8 |
|
9 |
def keras_inference(img_data, model_path):
|
10 |
model_path = attempt_download_from_hub(model_path)
|
|
|
18 |
|
19 |
inputs = [
|
20 |
gr.Image(type='filepath', label='Image'),
|
21 |
+
gr.Dropdown([model_path], value=model_path, label='Model Path')
|
22 |
]
|
23 |
|
24 |
outputs = gr.Image(label='Segmentation')
|
25 |
|
26 |
examples = [
|
27 |
+
['data/testv1.jpg', model_path],
|
28 |
+
['data/testv2.jpg', model_path],
|
29 |
+
['data/testv3.jpg', model_path],
|
30 |
]
|
31 |
|
32 |
title = 'Segmenting Buildings in Satellite Images with Keras'
|