mwmathis's picture
Update app.py
13575f0
raw
history blame
657 Bytes
import os
import yaml
import numpy as np
from matplotlib import cm
import gradio as gr
import deeplabcut
import dlclibrary
import transformers
from PIL import Image
import requests
#demo data cooco cat:
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
# Load the model
model = transformers.AutoModel.from_pretrained("mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped")
# Create an instance of the model
inference_api = transformers.InferenceAPI(model)
# Make a prediction with the model
prediction = inference_api.predict(inputs=image)
# Print the prediction
print(prediction)