Chrisyichuan commited on
Commit
36a1d31
Β·
1 Parent(s): 0445e4c

fix app.py and now it is a good version

Browse files
Files changed (2) hide show
  1. .streamlit/secrets.toml +0 -0
  2. app.py +4 -3
.streamlit/secrets.toml ADDED
File without changes
app.py CHANGED
@@ -6,6 +6,7 @@ import re
6
  from io import BytesIO
7
  from PIL import Image
8
  from pathlib import Path
 
9
 
10
  from geo_bot import GeoBot, AGENT_PROMPT_TEMPLATE
11
  from benchmark import MapGuesserBenchmark
@@ -137,9 +138,9 @@ with st.sidebar:
137
  )
138
 
139
  with url_col2:
140
- if st.button("πŸ“‹ Paste Example", use_container_width=True):
141
- google_url = example_url
142
- st.experimental_rerun()
143
 
144
  # Show the example link
145
  st.markdown(f"πŸ’‘ **Example Location:** [View in Google Maps]({example_url})")
 
6
  from io import BytesIO
7
  from PIL import Image
8
  from pathlib import Path
9
+ import pyperclip
10
 
11
  from geo_bot import GeoBot, AGENT_PROMPT_TEMPLATE
12
  from benchmark import MapGuesserBenchmark
 
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})")