adirik commited on
Commit
6c139d0
1 Parent(s): 286253d

update app

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -31,6 +31,7 @@ DESCRIPTION = '''# <a href="https://github.com/catlab-team/stylemc"> StyleMC:</a
31
  '''
32
  FOOTER = 'This space is built by <a href = "https://github.com/catlab-team">Catlab Team</a>.'
33
 
 
34
  direction_list = []
35
 
36
  def add_direction(prompt, stylegan_type, id_loss_w):
@@ -49,7 +50,7 @@ def generate_output_image(image_path, direction_id, change_power):
49
  direction = direction_map[direction_id]["direction"]
50
  G=G_dict["FFHQ"]
51
 
52
- w = e4e_embedder.get_w(image_path) # numpy array
53
  s = generator.w_to_s(GIn=G, wsIn=w)
54
  output_image = generator.generate_from_style(
55
  GIn=G,
 
31
  '''
32
  FOOTER = 'This space is built by <a href = "https://github.com/catlab-team">Catlab Team</a>.'
33
 
34
+ direction_map = {}
35
  direction_list = []
36
 
37
  def add_direction(prompt, stylegan_type, id_loss_w):
 
50
  direction = direction_map[direction_id]["direction"]
51
  G=G_dict["FFHQ"]
52
 
53
+ w = e4e_embedder.get_w(image_path)
54
  s = generator.w_to_s(GIn=G, wsIn=w)
55
  output_image = generator.generate_from_style(
56
  GIn=G,