akhaliq's picture
akhaliq HF staff
Create app.py
036fc1b
raw history blame
No virus
844 Bytes
import gradio as gr
import paddlehub as hub
model = hub.Module(name='hrnet40_imagenet')
def inference(img):
result = model.predict([img])
print(result)
return results[0]
title="hrnet40_imagenet"
description="HRNet is a new neural network proposed by Microsoft Research Asia in 2019. Unlike previous convolutional neural networks, this network can still maintain high resolution in the deep layers of the network, so the heatmap of predicted keypoints is more accurate, and it is also more spatially accurate. Furthermore, the network performs particularly well in other resolution-sensitive vision tasks, such as detection and segmentation."
examples=[['snake.jpeg']]
gr.Interface(inference,gr.inputs.Image(type="filepath"),"text",title=title,description=description,examples=examples).launch(enable_queue=True,cache_examples=True)