Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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)
|