aje6 commited on
Commit
23916db
·
verified ·
1 Parent(s): e12043f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -224,15 +224,15 @@ def predict(image):
224
  # Preprocess the image
225
  img_tensor = transform(image).unsqueeze(0) # Add batch dimension
226
 
227
- # Make prediction
228
- with torch.no_grad():
229
- output = model(img_tensor)
230
 
231
  # Process output (adjust based on your model's format)
232
  # return output # or post-process the results as needed
233
  results = model(image)
234
- print(type(results))
235
- print(results)
236
  annotated_img = results[0].plot()
237
  return annotated_img
238
 
 
224
  # Preprocess the image
225
  img_tensor = transform(image).unsqueeze(0) # Add batch dimension
226
 
227
+ # # Make prediction
228
+ # with torch.no_grad():
229
+ # output = model(img_tensor)
230
 
231
  # Process output (adjust based on your model's format)
232
  # return output # or post-process the results as needed
233
  results = model(image)
234
+ # print(type(results))
235
+ # print(results)
236
  annotated_img = results[0].plot()
237
  return annotated_img
238