apratim24 commited on
Commit
a0641a7
·
verified ·
1 Parent(s): 922f3c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -52,12 +52,14 @@ input_theme = gr.Dropdown(["Love and Loss", "Identity and Self-Discovery", "Powe
52
  input_genre = gr.Dropdown(["Fantasy", "Science Fiction", "Poetry", "Mystery/Thriller", "Romance", "Historical Fiction", "Horror", "Adventure", "Drama", "Comedy"], label="Input Genre")
53
  output_caption = gr.Textbox(label="Image Caption", lines=2)
54
  output_text = gr.Textbox(label="Generated Story",lines=8)
 
55
 
56
 
57
  gr.Interface(
58
  fn=generate_story,
59
  inputs=[input_image, input_theme, input_genre],
60
  outputs=[output_caption, output_text],
 
61
  title="Image to Story Generator",
62
  description="Generate a story from an image taking theme and genre as input. It leverages image captioning and text generation models.",
63
- ).launch()
 
52
  input_genre = gr.Dropdown(["Fantasy", "Science Fiction", "Poetry", "Mystery/Thriller", "Romance", "Historical Fiction", "Horror", "Adventure", "Drama", "Comedy"], label="Input Genre")
53
  output_caption = gr.Textbox(label="Image Caption", lines=2)
54
  output_text = gr.Textbox(label="Generated Story",lines=8)
55
+ examples = [f"example{i}.jpg" for i in range(1,2)]
56
 
57
 
58
  gr.Interface(
59
  fn=generate_story,
60
  inputs=[input_image, input_theme, input_genre],
61
  outputs=[output_caption, output_text],
62
+ examples = examples,
63
  title="Image to Story Generator",
64
  description="Generate a story from an image taking theme and genre as input. It leverages image captioning and text generation models.",
65
+ ).launch()