Rahulk2197 commited on
Commit
4fc1fe9
·
verified ·
1 Parent(s): f543551

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -4,8 +4,6 @@ import requests
4
  st.title("📍 Get Your Device Location")
5
 
6
  # Inject JavaScript to get location from the browser
7
- st.write("Click the button below to get your device's location.")
8
-
9
  get_location_js = """
10
  <script>
11
  navigator.geolocation.getCurrentPosition(
@@ -27,7 +25,7 @@ st.markdown('<input type="hidden" id="location-data">', unsafe_allow_html=True)
27
  # Create a form to capture location data
28
  with st.form("location_form"):
29
  location = st.text_input("Your Coordinates", key="location", disabled=True)
30
- submitted = st.form_submit_button("Submit", key="submit-btn")
31
 
32
  # Run the JavaScript when the user clicks the button
33
  st.markdown(get_location_js, unsafe_allow_html=True)
 
4
  st.title("📍 Get Your Device Location")
5
 
6
  # Inject JavaScript to get location from the browser
 
 
7
  get_location_js = """
8
  <script>
9
  navigator.geolocation.getCurrentPosition(
 
25
  # Create a form to capture location data
26
  with st.form("location_form"):
27
  location = st.text_input("Your Coordinates", key="location", disabled=True)
28
+ submitted = st.form_submit_button("Submit") # Fixed: Removed 'key' argument
29
 
30
  # Run the JavaScript when the user clicks the button
31
  st.markdown(get_location_js, unsafe_allow_html=True)