jrossi6 commited on
Commit
ba73120
·
1 Parent(s): 1246fc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -13,8 +13,8 @@ os.mkdir("checkpoints/")
13
 
14
  os.system("unzip -j original_PAMA.zip -d checkpoints/")
15
 
16
- def inference(content,style):
17
- os.system("python main.py eval --content "+content+" --style "+style)
18
  return "ics.jpg"
19
 
20
  title = "PAMA"
@@ -22,14 +22,15 @@ description = "Gradio demo for PAMA: Consistent Style Transfer. To use it, simpl
22
 
23
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2201.02233' target='_blank'>Consistent Style Transfer</a> | <a href='https://github.com/computer-vision2022/PAMA' target='_blank'>Github Repo</a></p>"
24
 
25
- examples=[['800px-Hoover_Tower_Stanford_January_2013.jpg','1920px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg']]
26
  gr.Interface(
27
  inference,
28
- [gr.inputs.Image(type="filepath", label="Content"),gr.inputs.Image(type="filepath", label="Style")],
29
  gr.outputs.Image(type="file", label="Output"),
30
  title=title,
31
  description=description,
32
  article=article,
33
  examples=examples,
34
- enable_queue=True
 
35
  ).launch()
 
13
 
14
  os.system("unzip -j original_PAMA.zip -d checkpoints/")
15
 
16
+ def inference(content,style,alpha):
17
+ os.system("python main.py eval --content "+content+" --style "+style+" --alpha " +(alpha / 100.0))
18
  return "ics.jpg"
19
 
20
  title = "PAMA"
 
22
 
23
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2201.02233' target='_blank'>Consistent Style Transfer</a> | <a href='https://github.com/computer-vision2022/PAMA' target='_blank'>Github Repo</a></p>"
24
 
25
+ examples=[['800px-Hoover_Tower_Stanford_January_2013.jpg','1920px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg', 100.0]]
26
  gr.Interface(
27
  inference,
28
+ [gr.inputs.Image(type="filepath", label="Content"),gr.inputs.Image(type="filepath", label="Style"),gr.inputs.Slider(0,100)],
29
  gr.outputs.Image(type="file", label="Output"),
30
  title=title,
31
  description=description,
32
  article=article,
33
  examples=examples,
34
+ enable_queue=True,
35
+ theme="dark"
36
  ).launch()