vchiang001 commited on
Commit
912fdcb
β€’
1 Parent(s): 50a50ad
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -31,6 +31,13 @@ def yolo(im): #size=640):
31
  results.render() # updates results.imgs with boxes and labels
32
  return Image.fromarray(results.imgs[0])
33
 
 
 
 
 
 
 
 
34
 
35
  # %%
36
  #inputs = [image, chosen_model, size]
@@ -46,4 +53,4 @@ article = "<p style='text-align: center'>Detect and identify animals, people and
46
 
47
  # %%
48
  #running the actual
49
- gr.Interface(yolo, inputs, outputs, title=title, description=description, article=article, theme="huggingface").launch(enable_queue=True)
 
31
  results.render() # updates results.imgs with boxes and labels
32
  return Image.fromarray(results.imgs[0])
33
 
34
+ # %% dlc-live function
35
+ def dlc(im):
36
+ from dlclive import DLCLive, Processor
37
+ dlc_proc = Processor()
38
+ dlc_live = DLCLive(https://huggingface.co/spaces/vchiang001/MegaDetector_DLC_pose/blob/main/quadraped_snapshot-1000.pb, processor=dlc_proc)
39
+ dlc_live.init_inference(im)
40
+ dlc_live.get_pose(im)
41
 
42
  # %%
43
  #inputs = [image, chosen_model, size]
 
53
 
54
  # %%
55
  #running the actual
56
+ gr.Interface(dlc, inputs, outputs, title=title, description=description, article=article, theme="huggingface").launch(enable_queue=True)