Mayureshd commited on
Commit
5758997
1 Parent(s): ee8199d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -57,12 +57,12 @@ def get_coordinates(location):
57
 
58
 
59
  # Example usage
60
- location = input("Enter Location: ")
61
- latitude, longitude = get_coordinates(location)
62
- if latitude and longitude:
63
- st.write(f"Latitude: {latitude}, Longitude: {longitude}")
64
- else:
65
- st.write("Failed to retrieve coordinates for the location.")
66
 
67
 
68
 
@@ -72,12 +72,12 @@ crimes = pd.DataFrame(columns=['Name', 'Lat', 'Lon', 'Intensity'])
72
 
73
  query = ""
74
  while(query != 'N'):
75
- location = input("Enter Location: ")
76
- crime = input("Enter Crime: ")
77
- intensity = int(input("Enter Intensity: "))
78
  latitude, longitude = get_coordinates(location)
79
  data = [{'Name': crime, 'Lat': latitude, 'Lon': longitude, 'Intensity': intensity}]
80
- query = input("Enter Y to continue and N to stop: ")
81
  crimes = pd.concat([crimes, pd.DataFrame(data)], ignore_index=True)
82
 
83
 
 
57
 
58
 
59
  # Example usage
60
+ # location = input("Enter Location: ")
61
+ # latitude, longitude = get_coordinates(location)
62
+ # if latitude and longitude:
63
+ # st.write(f"Latitude: {latitude}, Longitude: {longitude}")
64
+ # else:
65
+ # st.write("Failed to retrieve coordinates for the location.")
66
 
67
 
68
 
 
72
 
73
  query = ""
74
  while(query != 'N'):
75
+ location = st.text_area("Enter Location: ")
76
+ crime = st.text_area("Enter Crime: ")
77
+ intensity = int(st.text_area("Enter Intensity: "))
78
  latitude, longitude = get_coordinates(location)
79
  data = [{'Name': crime, 'Lat': latitude, 'Lon': longitude, 'Intensity': intensity}]
80
+ query = st.text_area("Enter Y to continue and N to stop: ")
81
  crimes = pd.concat([crimes, pd.DataFrame(data)], ignore_index=True)
82
 
83