akhaliq HF staff commited on
Commit
6e990d7
1 Parent(s): e11ab8c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import paddlehub as hub
3
+
4
+
5
+ model = hub.Module(name='se_hrnet64_imagenet_ssld')
6
+
7
+ def inference(img):
8
+ result = model.predict([img])
9
+ return result[0][0]
10
+
11
+
12
+ title="se_hrnet64_imagenet_ssld"
13
+ 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."
14
+
15
+ examples=[['cat2.jpg']]
16
+ gr.Interface(inference,gr.inputs.Image(type="filepath"),"label",title=title,description=description,examples=examples).launch(enable_queue=True,cache_examples=True)