weijiang2024 commited on
Commit
9bb48f6
·
verified ·
1 Parent(s): 1fb9ed4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -94,7 +94,7 @@ interface = gr.Interface(
94
  ],
95
  outputs=[
96
  gr.Image(label="生成的折扣券"),
97
- gr.Gallery(label="历史生成记录", show_label=True, elem_id="gallery") # Add a gallery component
98
  ],
99
  title="妈妈折扣券生成器",
100
  description="基于认知计算广告理论,为广告主一键生成兼具品牌影响力及传播力的品牌专属折扣券。"
@@ -107,7 +107,7 @@ def update_gallery(image, gallery):
107
 
108
  # Connect the generate_image function to the gallery update
109
  #interface.outputs[0].click(update_gallery, inputs=[interface.outputs[0], interface.outputs[1]])
110
- interface.load(lambda: None).then(lambda: interface.getElementById("generated_image").click(update_gallery, inputs=[interface.getElementById("generated_image"), interface.getElementById("gallery")]))
111
 
112
  # Launch the interface
113
  interface.launch(share=False)
 
94
  ],
95
  outputs=[
96
  gr.Image(label="生成的折扣券"),
97
+ #gr.Gallery(label="历史生成记录", show_label=True, elem_id="gallery") # Add a gallery component
98
  ],
99
  title="妈妈折扣券生成器",
100
  description="基于认知计算广告理论,为广告主一键生成兼具品牌影响力及传播力的品牌专属折扣券。"
 
107
 
108
  # Connect the generate_image function to the gallery update
109
  #interface.outputs[0].click(update_gallery, inputs=[interface.outputs[0], interface.outputs[1]])
110
+ #interface.load(lambda: None).then(lambda: interface.getElementById("generated_image").click(update_gallery, inputs=[interface.getElementById("generated_image"), interface.getElementById("gallery")]))
111
 
112
  # Launch the interface
113
  interface.launch(share=False)