hysts HF staff commited on
Commit
d09e40b
1 Parent(s): b565c7c
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +9 -6
  3. requirements.txt +4 -4
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: ⚡
4
  colorFrom: red
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 3.36.1
8
  app_file: app.py
9
  pinned: false
10
  suggested_hardware: t4-small
 
4
  colorFrom: red
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 4.36.0
8
  app_file: app.py
9
  pinned: false
10
  suggested_hardware: t4-small
app.py CHANGED
@@ -92,7 +92,7 @@ path = "controller_age015id025exp02hai04ori02gam15/"
92
  controller = Controller(path, device)
93
  fn = functools.partial(run, controller=controller, device=device)
94
 
95
- gr.Interface(
96
  fn=fn,
97
  inputs=[
98
  gr.Slider(label="Seed", minimum=0, maximum=1000000, step=1, value=0),
@@ -107,11 +107,14 @@ gr.Interface(
107
  gr.Slider(label="Number of Columns", minimum=1, maximum=5, step=1, value=5),
108
  ],
109
  outputs=[
110
- gr.Image(label="Generated Image", type="pil"),
111
- gr.Image(label="Head Pose Controlled", type="pil"),
112
- gr.Image(label="Age Controlled", type="pil"),
113
- gr.Image(label="Hair Color Controlled", type="pil"),
114
  ],
115
  title=TITLE,
116
  description=DESCRIPTION,
117
- ).queue(max_size=10).launch()
 
 
 
 
92
  controller = Controller(path, device)
93
  fn = functools.partial(run, controller=controller, device=device)
94
 
95
+ demo = gr.Interface(
96
  fn=fn,
97
  inputs=[
98
  gr.Slider(label="Seed", minimum=0, maximum=1000000, step=1, value=0),
 
107
  gr.Slider(label="Number of Columns", minimum=1, maximum=5, step=1, value=5),
108
  ],
109
  outputs=[
110
+ gr.Image(label="Generated Image"),
111
+ gr.Image(label="Head Pose Controlled"),
112
+ gr.Image(label="Age Controlled"),
113
+ gr.Image(label="Hair Color Controlled"),
114
  ],
115
  title=TITLE,
116
  description=DESCRIPTION,
117
+ )
118
+
119
+ if __name__ == "__main__":
120
+ demo.queue(max_size=10).launch()
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- numpy==1.23.5
2
- Pillow==10.0.0
3
- torch==1.11.0
4
- torchvision==0.12.0
 
1
+ numpy==1.26.4
2
+ Pillow==10.3.0
3
+ torch==2.0.1
4
+ torchvision==0.15.2