github-actions[bot] commited on
Commit
3eaae45
·
1 Parent(s): a002362

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

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -51,9 +51,9 @@ def handle_polygon(polygon):
51
  col1, col2 = st.columns(2)
52
 
53
  with col1:
54
- st.image(raw_image, caption="Raw Image", use_column_width=True)
55
  with col2:
56
- st.image(painted_image, caption="Painted Image", use_column_width=True)
57
 
58
  if st.button("Keep Polygon", key=f"keep_{polygon}"):
59
  keep_folder = polygon.parent / "keep"
@@ -72,9 +72,8 @@ def upload_results(output_path):
72
  st.divider()
73
  st.header("Upload all polygons in `keep`")
74
 
75
- st.markdown(
76
- "The results will be uploaded using our OpenStreetMap account."
77
- "You can check the [Colab Notebook](ttps://colab.research.google.com/github/mozilla-ai/osm-ai-helper/blob/main/demo/run_inference.ipynb)"
78
  " and the [Authorization Guide](https://mozilla-ai.github.io/osm-ai-helper/authorization)"
79
  " to contribute with your own OpenStreetMap account."
80
  )
@@ -84,12 +83,13 @@ def upload_results(output_path):
84
  comment = f"Add Swimming Pools. Contributed by {contributor}"
85
  else:
86
  comment = "Add Swimming Pools"
87
- upload_osm(
88
  results_dir=output_path / "keep",
89
  client_id=os.environ["OSM_CLIENT_ID"],
90
  client_secret=os.environ["OSM_CLIENT_SECRET"],
91
  comment=comment,
92
  )
 
93
 
94
 
95
  st.title("Open Street Map AI Helper")
 
51
  col1, col2 = st.columns(2)
52
 
53
  with col1:
54
+ st.image(raw_image, caption="Raw Image", use_container_width=True)
55
  with col2:
56
+ st.image(painted_image, caption="Painted Image", use_container_width=True)
57
 
58
  if st.button("Keep Polygon", key=f"keep_{polygon}"):
59
  keep_folder = polygon.parent / "keep"
 
72
  st.divider()
73
  st.header("Upload all polygons in `keep`")
74
 
75
+ st.markdown("The results will be uploaded using our OpenStreetMap account.")
76
+ st.markdown("You can check the [Colab Notebook](ttps://colab.research.google.com/github/mozilla-ai/osm-ai-helper/blob/main/demo/run_inference.ipynb)"
 
77
  " and the [Authorization Guide](https://mozilla-ai.github.io/osm-ai-helper/authorization)"
78
  " to contribute with your own OpenStreetMap account."
79
  )
 
83
  comment = f"Add Swimming Pools. Contributed by {contributor}"
84
  else:
85
  comment = "Add Swimming Pools"
86
+ changeset = upload_osm(
87
  results_dir=output_path / "keep",
88
  client_id=os.environ["OSM_CLIENT_ID"],
89
  client_secret=os.environ["OSM_CLIENT_SECRET"],
90
  comment=comment,
91
  )
92
+ st.success(f"Changeset created: https://www.openstreetmap.org/changeset/{changeset}")
93
 
94
 
95
  st.title("Open Street Map AI Helper")