farjadmalik commited on
Commit
d007d97
·
1 Parent(s): 12a7635

remove saving files

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -31,14 +31,14 @@ def compose(prompt: str, filename: str = "generated_post"):
31
 
32
  # Generate the image
33
  image = image_gen.generate_image(prompt=richify_prompt(prompt))
34
- # Save the image
35
- image_path = save_image(image, filename=filename)
36
- print(f"Image saved at: {image_path}")
37
  caption = text_gen.generate_caption(prompt=prompt)
38
  # Save the caption
39
- caption_path = save_caption(caption, filename=filename)
40
- print(f"Caption saved at: {caption_path}")
41
- return image_path, caption
42
 
43
 
44
  if __name__ == '__main__':
@@ -47,7 +47,7 @@ if __name__ == '__main__':
47
  fn=compose,
48
  inputs=gr.Textbox(lines=5, label="Prompt", placeholder="Enter your prompt here..."),
49
  outputs=[
50
- gr.Image(type="filepath", label="Generated Image"),
51
  gr.Textbox(label="Generated Caption")
52
  ],
53
  title="From Words to Reels",
 
31
 
32
  # Generate the image
33
  image = image_gen.generate_image(prompt=richify_prompt(prompt))
34
+ # # Save the image
35
+ # image_path = save_image(image, filename=filename)
36
+ # print(f"Image saved at: {image_path}")
37
  caption = text_gen.generate_caption(prompt=prompt)
38
  # Save the caption
39
+ # caption_path = save_caption(caption, filename=filename)
40
+ # print(f"Caption saved at: {caption_path}")
41
+ return image, caption
42
 
43
 
44
  if __name__ == '__main__':
 
47
  fn=compose,
48
  inputs=gr.Textbox(lines=5, label="Prompt", placeholder="Enter your prompt here..."),
49
  outputs=[
50
+ gr.Image(label="Generated Image"),
51
  gr.Textbox(label="Generated Caption")
52
  ],
53
  title="From Words to Reels",