Spaces:
Sleeping
Sleeping
Mehmet Batuhan Duman
commited on
Commit
·
d20de52
1
Parent(s):
2b06c57
Changed scan func
Browse files- .idea/workspace.xml +1 -1
- app.py +3 -2
.idea/workspace.xml
CHANGED
@@ -65,7 +65,7 @@
|
|
65 |
<workItem from="1683665300392" duration="7649000" />
|
66 |
<workItem from="1683708398011" duration="1235000" />
|
67 |
<workItem from="1684437905081" duration="110000" />
|
68 |
-
<workItem from="1686602174110" duration="
|
69 |
</task>
|
70 |
<servers />
|
71 |
</component>
|
|
|
65 |
<workItem from="1683665300392" duration="7649000" />
|
66 |
<workItem from="1683708398011" duration="1235000" />
|
67 |
<workItem from="1684437905081" duration="110000" />
|
68 |
+
<workItem from="1686602174110" duration="2380000" />
|
69 |
</task>
|
70 |
<servers />
|
71 |
</component>
|
app.py
CHANGED
@@ -191,8 +191,9 @@ else:
|
|
191 |
#
|
192 |
# iface = gr.Interface(fn=gradio_process_image, inputs=inputs, outputs=outputs)
|
193 |
# iface.launch()
|
194 |
-
def scanmap(
|
195 |
-
|
|
|
196 |
satellite_image = satellite_image.astype(np.float32) / 255.0
|
197 |
|
198 |
window_size = (80, 80)
|
|
|
191 |
#
|
192 |
# iface = gr.Interface(fn=gradio_process_image, inputs=inputs, outputs=outputs)
|
193 |
# iface.launch()
|
194 |
+
def scanmap(satellite_image, model, device, threshold=0.5):
|
195 |
+
# No need to read the image, you already have it as a NumPy array.
|
196 |
+
# Just normalize it.
|
197 |
satellite_image = satellite_image.astype(np.float32) / 255.0
|
198 |
|
199 |
window_size = (80, 80)
|