wangzhibo
2025-08-03 56d194a4300610a17cc3c6682aaf63f039e9c4ab
auto_media_publisher/generators/docx_generator_gemini.py
@@ -88,7 +88,7 @@
            self._add_content_to_doc(doc,"text",para)
            if random.random() > 0.5:
                try:
                    img_stream = self.text2imager.generate_image_to_stream(para)
                    img_stream = self.text2imager.generate_image_with_trans_to_stream(para)
                    self._add_content_to_doc(doc,"image",img_stream)
                except:
                    pass
@@ -99,7 +99,7 @@
          
        self.summary_info = self._summarize_title_intro_keywords()
        print(self.summary_info)
        self.text2imager.generate_image(self.summary_info["description"],output_path.replace(".docx",".png"))
        self.text2imager.generate_image_with_trans(self.summary_info["description"],output_path.replace(".docx",".png"))
        self.summary_info["path_cover"] = output_path.replace(".docx",".png")