louiecerv commited on
Commit
5521e41
·
1 Parent(s): 8e8064a

sync changes

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -49,7 +49,12 @@ def get_location(lat, lon):
49
 
50
  st.title("Photo Inspection App")
51
 
52
- uploaded_file = st.camera_input("Take a photo")
 
 
 
 
 
53
 
54
  if uploaded_file is not None:
55
  try:
@@ -70,7 +75,7 @@ if uploaded_file is not None:
70
  st.write(f"**Location:** {address}")
71
 
72
  google_maps_url = f"https://www.google.com/maps/search/?api=1&query={lat},{lon}"
73
- st.markdown(f"[View on Google Maps]({google_maps_url})")
74
 
75
  else:
76
  st.write("No GPS data found in the image or an error occurred.")
 
49
 
50
  st.title("Photo Inspection App")
51
 
52
+ option = st.selectbox("Choose an option", ("Take a photo", "Upload a photo"))
53
+
54
+ if option == "Take a photo":
55
+ uploaded_file = st.camera_input("Take a photo")
56
+ else:
57
+ uploaded_file = st.file_uploader("Upload a photo", type=["jpg", "jpeg", "png"])
58
 
59
  if uploaded_file is not None:
60
  try:
 
75
  st.write(f"**Location:** {address}")
76
 
77
  google_maps_url = f"https://www.google.com/maps/search/?api=1&query={lat},{lon}"
78
+ st.markdown(f"View on Google Maps")
79
 
80
  else:
81
  st.write("No GPS data found in the image or an error occurred.")