ysharma HF staff commited on
Commit
6e0be5b
1 Parent(s): 4bd6660
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -59,7 +59,7 @@ with demo:
59
  in_language_second = gr.Dropdown(visible=False, value= 'zho_Hans') #'Chinese (Simplified)')
60
 
61
  with gr.Row():
62
- in_styles = gr.Dropdown(['水彩-WaterColor', '油画-OilPainting', '粉笔画-Painting', '卡通-Cartoon', '蜡笔画-Pencils', '儿童画-ChildrensPaintings', '探索无限-ExploringTheInfinite']),
63
  out_ernie = gr.Image(type="pil", label="Ernie output for the given prompt")
64
  #out_gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery") #.style(grid=[2, 3], height="auto")
65
  b2 = gr.Button("Generate Images from Ernie")
@@ -68,7 +68,8 @@ with demo:
68
  #b3 = gr.Button("Generate Images from SD")
69
 
70
  b1.click(get_chinese_translation, [in_language_first, in_language_second, in_text_prompt], out_text_chinese )
71
- b2.click(get_ernie_vilg, [out_text_chinese, in_styles], out_ernie) #out_gallery )
 
72
  #b3.click(get_sd, [in_text_prompt,s1,s2,s3,s4], out_sd) #out_gallery )
73
 
74
  demo.launch(enable_queue=True, debug=True)
 
59
  in_language_second = gr.Dropdown(visible=False, value= 'zho_Hans') #'Chinese (Simplified)')
60
 
61
  with gr.Row():
62
+ in_styles = gr.Dropdown(['水彩-WaterColor', '油画-OilPainting', '粉笔画-Painting', '卡通-Cartoon', '蜡笔画-Pencils', '儿童画-ChildrensPaintings', '探索无限-ExploringTheInfinite'])
63
  out_ernie = gr.Image(type="pil", label="Ernie output for the given prompt")
64
  #out_gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery") #.style(grid=[2, 3], height="auto")
65
  b2 = gr.Button("Generate Images from Ernie")
 
68
  #b3 = gr.Button("Generate Images from SD")
69
 
70
  b1.click(get_chinese_translation, [in_language_first, in_language_second, in_text_prompt], out_text_chinese )
71
+ b2.click(get_ernie_vilg, [out_text_chinese, in_styles], out_ernie)
72
+
73
  #b3.click(get_sd, [in_text_prompt,s1,s2,s3,s4], out_sd) #out_gallery )
74
 
75
  demo.launch(enable_queue=True, debug=True)