Intern-4 commited on
Commit
c02898e
·
1 Parent(s): 2c70111

AttributeError: 'Image' object has no attribute '_getexif' fix

Browse files
Files changed (1) hide show
  1. gradio_with_map.py +1 -1
gradio_with_map.py CHANGED
@@ -141,7 +141,7 @@ def predict_image(img, conf_threshold, iou_threshold):
141
  print("XMP data not found in the image.")
142
 
143
  # Extract EXIF data
144
- exif_data = img._getexif()
145
 
146
  if exif_data is not None:
147
  gps_info = extract_gps_info(exif_data)
 
141
  print("XMP data not found in the image.")
142
 
143
  # Extract EXIF data
144
+ exif_data = img.info.get("exif")
145
 
146
  if exif_data is not None:
147
  gps_info = extract_gps_info(exif_data)