File size: 840 Bytes
efcab85
 
c1802b2
 
 
 
 
 
 
 
 
 
413e9c7
c1802b2
 
 
 
448988a
c1802b2
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#import cv2
#import numpy as np
import gradio as gr

inputs_image = gr.Image(type="filepath", label="Input Image")
# def img_inf(img, model):
    
#     model, classes, colors = load_model()  # Load the MobileNet-SSD model
#     image, height, width, channels = load_img(img)  # Load and preprocess the image
#     blob, outputs = detect_objects(image, model)  # Detect objects in the image
#     boxes, class_ids = get_box_dimensions(outputs, height, width)  # Get the bounding boxes
#     return cv2.cvtColor(image1, cv2.COLOR_BGR2RGB)  # Re
def ff(ev):
    print(ev)
interface_image = gr.Interface(
    fn=ff,
    inputs=[inputs_image],
    #outputs=outputs_image,
    title="Image Inference",
    description="Upload your photo and select one model and see the results!",
    # examples=[["sample/dog.jpg"]],
    cache_examples=False,
)