orhir commited on
Commit
51257cb
·
verified ·
1 Parent(s): 01b7dda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -2,8 +2,9 @@ import os
2
  os.system('python setup.py develop')
3
 
4
  import argparse
5
- from pathlib import Path
6
  import json
 
 
7
  import gradio as gr
8
  import matplotlib
9
 
@@ -139,23 +140,18 @@ with gr.Blocks() as demo:
139
  })
140
  ],
141
  ['examples/sofa1.jpg',
142
- 'examples/sofa2.jpg',
143
- json.dumps({
144
- 'points': [(112, 328), (120, 260), (104, 208), (200, 260), (208, 336), (216, 212), (208, 172),
145
- (284, 180), (276, 324), (156, 308), (172, 228), (256, 232), (168, 184), (260, 196)]
146
-
147
- ,
148
- 'skeleton': [(0, 1), (3, 1), (3, 4), (10, 9), (11, 8),
149
- (1, 10), (10, 11), (11, 3), (1, 2), (7, 6),
150
- (5, 13), (5, 3), (13, 11), (12, 10), (12, 2),
151
- (6, 10), (7, 11)],
152
  })],
153
  ['examples/person1.jpeg',
154
  'examples/person2.jpeg',
155
  json.dumps({
156
- 'points': [(380, 484), (640, 488), (520, 616), (424, 736), (612, 724)],
157
- 'skeleton': [(0, 1), (1, 2), (0, 2), (2, 3), (2, 4),
158
- (4, 3)],
159
  })]
160
  ],
161
  inputs=[support_image, query_image, example_null],
@@ -192,4 +188,3 @@ if __name__ == "__main__":
192
  print("Start app", parser.parse_args())
193
  gr.close_all()
194
  demo.launch(show_api=False)
195
-
 
2
  os.system('python setup.py develop')
3
 
4
  import argparse
 
5
  import json
6
+ from pathlib import Path
7
+
8
  import gradio as gr
9
  import matplotlib
10
 
 
140
  })
141
  ],
142
  ['examples/sofa1.jpg',
143
+ 'examples/sofa2.png',
144
+ json.dumps({'points': [[272, 561], [193, 482], [339, 460], [445, 530], [264, 369], [203, 318], [354, 300],
145
+ [457, 341], [345, 63], [187, 68]],
146
+ 'skeleton': [[0, 4], [1, 5], [2, 6], [3, 7], [7, 6], [6, 5],
147
+ [5, 4], [4, 7], [5, 9], [9, 8], [8, 6]],
 
 
 
 
 
148
  })],
149
  ['examples/person1.jpeg',
150
  'examples/person2.jpeg',
151
  json.dumps({
152
+ 'points': [[322, 488], [431, 486], [526, 644], [593, 486], [697, 492], [407, 728],
153
+ [522, 726], [625, 737], [515, 798]],
154
+ 'skeleton': [[0, 1], [1, 3], [3, 4], [1, 2], [2, 3], [5, 6], [6, 7], [7, 8], [8, 5]],
155
  })]
156
  ],
157
  inputs=[support_image, query_image, example_null],
 
188
  print("Start app", parser.parse_args())
189
  gr.close_all()
190
  demo.launch(show_api=False)