Update app.py
Browse filesReplaced Detr with YoloS tiny
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
from PIL import Image
|
| 4 |
-
from transformers import CLIPProcessor, CLIPModel,
|
| 5 |
import torch
|
| 6 |
|
| 7 |
-
feature_extractor =
|
| 8 |
-
dmodel =
|
| 9 |
|
| 10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
| 11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
from PIL import Image
|
| 4 |
+
from transformers import CLIPProcessor, CLIPModel, YolosImageProcessor, YolosForObjectDetection
|
| 5 |
import torch
|
| 6 |
|
| 7 |
+
feature_extractor = YolosImageProcessor.from_pretrained("hustvl/yolos-tiny")
|
| 8 |
+
dmodel = YolosForObjectDetection.from_pretrained('hustvl/yolos-tiny')
|
| 9 |
|
| 10 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
| 11 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|