Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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[:
|
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"
|