mosidi commited on
Commit
6051917
·
1 Parent(s): 30e9537

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -178,12 +178,13 @@ def inference(image_url, image, min_score):
178
  writer.writerow([id, data['measurement'], data['x_min'], data['x_max'], data['y_min'], data['y_max']])
179
  # Convert the CSV content to a bytes object
180
 
181
- # csv_bytes = io.StringIO( file).read().encode("utf-8")
182
 
183
  # Upload the file to Cloudinary
184
  upload_result = cloudinary.uploader.upload(
185
- filename,
186
- folder = "csv_files"
 
187
  )
188
  # return file
189
 
 
178
  writer.writerow([id, data['measurement'], data['x_min'], data['x_max'], data['y_min'], data['y_max']])
179
  # Convert the CSV content to a bytes object
180
 
181
+ csv_bytes = io.StringIO( open(filename,"r").read()).read().encode("utf-8")
182
 
183
  # Upload the file to Cloudinary
184
  upload_result = cloudinary.uploader.upload(
185
+ csv_bytes,
186
+ resource_type = "raw",
187
+ folder = "csv_files",
188
  )
189
  # return file
190