nehulagrawal commited on
Commit
e0757ea
·
1 Parent(s): 6d41b82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def get_figure(in_pil_img, in_results):
51
  return plt.gcf()
52
 
53
 
54
- def infer(in_pil_img, in_model="yolos-tiny", in_threshold=0.9):
55
  target_sizes = torch.tensor([in_pil_img.size[::-1]])
56
  inputs = image_processor_tiny(images=in_pil_img, return_tensors="pt")
57
  outputs = model_tiny(**inputs)
@@ -78,7 +78,7 @@ with gr.Blocks(title="YOLOS Object Detection - ClassCat",
78
 
79
  gr.HTML("""<h4 style="color:navy;">1. Select a model.</h4>""")
80
 
81
- model = gr.Radio(["yolos-tiny", "yolos-small"], value="yolos-tiny", label="Model name")
82
 
83
  gr.HTML("""<br/>""")
84
  gr.HTML("""<h4 style="color:navy;">2-a. Select an example by clicking a thumbnail below.</h4>""")
 
51
  return plt.gcf()
52
 
53
 
54
+ def infer(in_pil_img, in_model="object_detection", in_threshold=0.9):
55
  target_sizes = torch.tensor([in_pil_img.size[::-1]])
56
  inputs = image_processor_tiny(images=in_pil_img, return_tensors="pt")
57
  outputs = model_tiny(**inputs)
 
78
 
79
  gr.HTML("""<h4 style="color:navy;">1. Select a model.</h4>""")
80
 
81
+ model = gr.Radio(['object_detection"], value="object_detection", label="Model name")
82
 
83
  gr.HTML("""<br/>""")
84
  gr.HTML("""<h4 style="color:navy;">2-a. Select an example by clicking a thumbnail below.</h4>""")