pratikshahp commited on
Commit
d73a810
1 Parent(s): 0a0334e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -59,7 +59,7 @@ if submit:
59
  target_sizes = torch.tensor([image.size[::-1]])
60
  results = processor.post_process_object_detection(outputs, threshold=0.9, target_sizes=target_sizes)[0]
61
  # prettify_results(results)
62
- for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
63
  box = [round(i, 2) for i in box.tolist()]
64
  st.write(
65
  f"Detected {model.config.id2label[label.item()]} with confidence "
 
59
  target_sizes = torch.tensor([image.size[::-1]])
60
  results = processor.post_process_object_detection(outputs, threshold=0.9, target_sizes=target_sizes)[0]
61
  # prettify_results(results)
62
+ for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
63
  box = [round(i, 2) for i in box.tolist()]
64
  st.write(
65
  f"Detected {model.config.id2label[label.item()]} with confidence "