Aastha commited on
Commit
415641c
β€’
1 Parent(s): 9bf6282

Add examples

Browse files
Files changed (3) hide show
  1. app.py +2 -2
  2. roi_none.png +0 -0
  3. test2.jpeg +0 -0
app.py CHANGED
@@ -7,7 +7,7 @@ from super_gradients.training import models
7
  import cv2
8
  import numpy as np
9
 
10
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
 
12
  # Load the YOLO-NAS model
13
  yolo_nas_l = models.get("yolo_nas_l", pretrained_weights="coco")
@@ -95,7 +95,7 @@ model = load_model(model_path)
95
  # Gradio UI
96
  title = "Vehicle Collision Classification"
97
  description = "Upload an image to determine if it depicts a vehicle accident. Powered by EfficientNet."
98
- examples = [["roi_none.png"], ["test2.jpeg"]] # Replace with your example image path
99
 
100
  gr.Interface(fn=lambda img: predict_image(img, model),
101
  inputs=gr.inputs.Image(type="pil"),
 
7
  import cv2
8
  import numpy as np
9
 
10
+ device = torch.device("cpu")
11
 
12
  # Load the YOLO-NAS model
13
  yolo_nas_l = models.get("yolo_nas_l", pretrained_weights="coco")
 
95
  # Gradio UI
96
  title = "Vehicle Collision Classification"
97
  description = "Upload an image to determine if it depicts a vehicle accident. Powered by EfficientNet."
98
+ examples = [["roi_none.png"], ["test2.jpeg"]]
99
 
100
  gr.Interface(fn=lambda img: predict_image(img, model),
101
  inputs=gr.inputs.Image(type="pil"),
roi_none.png ADDED
test2.jpeg ADDED