github-actions[bot] commited on
Commit
65084bf
·
1 Parent(s): 332b309

Sync with https://github.com/mozilla-ai/osm-ai-helper

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -51,14 +51,14 @@ def inference(lat_lon, margin):
51
  repo_type="model",
52
  local_dir="models",
53
  )
54
- with st.spinner("Running inference..."):
55
  output_path, existing, new, missed = run_inference(
56
  yolo_model_file="models/model.pt",
57
  output_dir="/tmp/results",
58
  lat_lon=lat_lon,
59
  margin=margin,
 
60
  )
61
- st.text(f"Found: {len(new)} new polygons")
62
  return output_path, existing, new
63
 
64
 
@@ -130,8 +130,15 @@ and [Finetune Model](https://colab.research.google.com/github/mozilla-ai//osm-ai
130
 
131
  st.divider()
132
 
133
- st.subheader(
134
- "Click on the map to select a latitude and longitude. The model will try to find swimming pools around this location."
 
 
 
 
 
 
 
135
  )
136
 
137
  show_map()
 
51
  repo_type="model",
52
  local_dir="models",
53
  )
54
+ with st.spinner("Downloading image and Running inference..."):
55
  output_path, existing, new, missed = run_inference(
56
  yolo_model_file="models/model.pt",
57
  output_dir="/tmp/results",
58
  lat_lon=lat_lon,
59
  margin=margin,
60
+ save_full_images=False,
61
  )
 
62
  return output_path, existing, new
63
 
64
 
 
130
 
131
  st.divider()
132
 
133
+ st.subheader("Click on the map to select a latitude and longitude.")
134
+
135
+ st.markdown(
136
+ """
137
+ The model will try to find swimming pools around this location.
138
+
139
+ Note that this model was trained with data from [Galicia](https://nominatim.openstreetmap.org/ui/details.html?osmtype=R&osmid=349036&class=boundary),
140
+ so it might fail to generalize to significantly different places.
141
+ """
142
  )
143
 
144
  show_map()