taroii commited on
Commit
3b26721
·
1 Parent(s): e34238d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,6 +6,9 @@ from supervision.detection.annotate import BoxAnnotator
6
  from supervision.utils.notebook import plot_image
7
  import cv2
8
 
 
 
 
9
  og_model = 'facebook/detr-resnet-50'
10
  image_processor = DetrImageProcessor.from_pretrained(og_model)
11
  model = AutoModel.from_pretrained("taroii/notfinetuned-detr-50")
@@ -36,7 +39,7 @@ def predict(image_path):
36
 
37
  gr.Interface(
38
  predict,
39
- inputs=gr.inputs.Image(label="Upload hot dog candidate", type="filepath"),
40
  outputs=gr.Image(),
41
  title="Non-Fine-Tuned Model"
42
  ).launch()
 
6
  from supervision.utils.notebook import plot_image
7
  import cv2
8
 
9
+ CONFIDENCE_TRESHOLD = 0.5
10
+ IOU_TRESHOLD = 0.8
11
+
12
  og_model = 'facebook/detr-resnet-50'
13
  image_processor = DetrImageProcessor.from_pretrained(og_model)
14
  model = AutoModel.from_pretrained("taroii/notfinetuned-detr-50")
 
39
 
40
  gr.Interface(
41
  predict,
42
+ inputs=gr.inputs.Image(label="Upload X-Ray Image", type="filepath"),
43
  outputs=gr.Image(),
44
  title="Non-Fine-Tuned Model"
45
  ).launch()