jm12138 commited on
Commit
78b1468
1 Parent(s): 547611e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,11 +41,11 @@ def inference(text_prompts, style_indx):
41
  model.token = model._apply_token(model.ak, model.sk)
42
  style = style_list[style_indx]
43
  results = model.generate_image(
44
- text_prompts=text_prompts, style=style, visualization=False)
45
  except Exception as e:
46
  error_text = str(e)
47
  return {status_text:error_text, gallery:None}
48
- return {status_text:'Success', gallery:results[:6]}
49
 
50
 
51
  title="ERNIE-ViLG"
 
41
  model.token = model._apply_token(model.ak, model.sk)
42
  style = style_list[style_indx]
43
  results = model.generate_image(
44
+ text_prompts=text_prompts, style=style, visualization=False, topk=4)
45
  except Exception as e:
46
  error_text = str(e)
47
  return {status_text:error_text, gallery:None}
48
+ return {status_text:'Success', gallery:results[:4]}
49
 
50
 
51
  title="ERNIE-ViLG"