Ahsen Khaliq commited on
Commit
da81006
1 Parent(s): 5842467

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  import os
3
 
 
 
4
  def inference(image):
5
  os.system("python -m openpifpaf.predict "+image.name+" --checkpoint=shufflenetv2k30-wholebody --line-width=2 -o out.jpg")
6
  return "out.jpg"
@@ -8,7 +10,9 @@ def inference(image):
8
 
9
  title = "Keypoint Communities"
10
  description = "Gradio demo for Keypoint Communities. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
11
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"
 
 
12
 
13
  gr.Interface(
14
  inference,
@@ -17,5 +21,6 @@ gr.Interface(
17
  title=title,
18
  description=description,
19
  article=article,
20
- enable_queue=True
 
21
  ).launch(debug=True)
 
1
  import gradio as gr
2
  import os
3
 
4
+ os.system("wget https://github.com/DuncanZauss/Keypoint_Communities/blob/main/docs/soccer.jpeg")
5
+
6
  def inference(image):
7
  os.system("python -m openpifpaf.predict "+image.name+" --checkpoint=shufflenetv2k30-wholebody --line-width=2 -o out.jpg")
8
  return "out.jpg"
 
10
 
11
  title = "Keypoint Communities"
12
  description = "Gradio demo for Keypoint Communities. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
13
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2110.00988'>Keypoint Communities</a> | <a href='https://github.com/DuncanZauss/Keypoint_Communities'>Github Repo</a></p>"
14
+
15
+ examples=[['soccer.jpeg']]
16
 
17
  gr.Interface(
18
  inference,
 
21
  title=title,
22
  description=description,
23
  article=article,
24
+ enable_queue=True,
25
+ examples=examples
26
  ).launch(debug=True)