Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
64 |
-
else:
|
65 |
-
|
66 |
|
67 |
|
68 |
|
@@ -72,12 +72,12 @@ crimes = pd.DataFrame(columns=['Name', 'Lat', 'Lon', 'Intensity'])
|
|
72 |
|
73 |
query = ""
|
74 |
while(query != 'N'):
|
75 |
-
location =
|
76 |
-
crime =
|
77 |
-
intensity = int(
|
78 |
latitude, longitude = get_coordinates(location)
|
79 |
data = [{'Name': crime, 'Lat': latitude, 'Lon': longitude, 'Intensity': intensity}]
|
80 |
-
query =
|
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 |
|