pratikshahp commited on
Commit
8b37eed
·
verified ·
1 Parent(s): 210ca37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,8 +1,4 @@
1
  from transformers import pipeline
2
- pipe = pipeline("object-detection",model="facebook/detr-resnet-50")
3
- output = pipe("multi-object.jpg")
4
- print("Object Detection: ")
5
- prettier(output)
6
 
7
  def prettier(results):
8
  for item in results:
@@ -10,3 +6,9 @@ def prettier(results):
10
  label = item('label')
11
  location = [round(value,2) for value in item['box'].values()]
12
  print(f'Detected{label} with confidence {score} at location {location}')
 
 
 
 
 
 
 
1
  from transformers import pipeline
 
 
 
 
2
 
3
  def prettier(results):
4
  for item in results:
 
6
  label = item('label')
7
  location = [round(value,2) for value in item['box'].values()]
8
  print(f'Detected{label} with confidence {score} at location {location}')
9
+
10
+ pipe = pipeline("object-detection",model="facebook/detr-resnet-50")
11
+ output = pipe("multi-object.jpg")
12
+ print("Object Detection: ")
13
+ prettier(output)
14
+