Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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()
|