Spaces:
Sleeping
Sleeping
Commit
Β·
8f48959
1
Parent(s):
c10ea94
small fix
Browse files
app.py
CHANGED
@@ -132,16 +132,14 @@ with st.sidebar:
|
|
132 |
url_col1, url_col2 = st.columns([3, 1])
|
133 |
|
134 |
with url_col1:
|
|
|
135 |
google_url = st.text_input(
|
136 |
"Google Maps URL",
|
137 |
-
placeholder="https://www.google.com/maps/@37.5851338,-122.1519467,9z?entry=ttu"
|
|
|
|
|
138 |
)
|
139 |
-
|
140 |
-
with url_col2:
|
141 |
-
if st.button("π Copy Example", use_container_width=True):
|
142 |
-
pyperclip.copy(example_url)
|
143 |
-
st.toast("Example URL copied to clipboard! π")
|
144 |
-
|
145 |
# Show the example link
|
146 |
st.markdown(f"π‘ **Example Location:** [View in Google Maps]({example_url})")
|
147 |
|
@@ -386,3 +384,8 @@ if start_button:
|
|
386 |
file_name=f"geo_results_{dataset_choice}_{model_choice}_{num_samples}samples.json",
|
387 |
mime="application/json",
|
388 |
)
|
|
|
|
|
|
|
|
|
|
|
|
132 |
url_col1, url_col2 = st.columns([3, 1])
|
133 |
|
134 |
with url_col1:
|
135 |
+
# Add a key to the text input for tracking changes
|
136 |
google_url = st.text_input(
|
137 |
"Google Maps URL",
|
138 |
+
placeholder="https://www.google.com/maps/@37.5851338,-122.1519467,9z?entry=ttu",
|
139 |
+
key="google_maps_url",
|
140 |
+
# on_change=lambda: handle_tab_completion()
|
141 |
)
|
142 |
+
|
|
|
|
|
|
|
|
|
|
|
143 |
# Show the example link
|
144 |
st.markdown(f"π‘ **Example Location:** [View in Google Maps]({example_url})")
|
145 |
|
|
|
384 |
file_name=f"geo_results_{dataset_choice}_{model_choice}_{num_samples}samples.json",
|
385 |
mime="application/json",
|
386 |
)
|
387 |
+
|
388 |
+
def handle_tab_completion():
|
389 |
+
"""Handle tab completion for the Google Maps URL input."""
|
390 |
+
if st.session_state.google_maps_url == "":
|
391 |
+
st.session_state.google_maps_url = "https://www.google.com/maps/@37.5851338,-122.1519467,9z?entry=ttu"
|