apratim24 commited on
Commit
02f7b16
·
verified ·
1 Parent(s): dc03892

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -65,7 +65,7 @@ def generate_story(image, theme, genre, word_count):
65
  # Generate story based on the caption
66
  story_prompt = f"Write an interesting {theme} story in the {genre} genre. The story should be within {word_count} words about {caption_text}."
67
 
68
- llm = OpenAI(model_name="gpt-3.5-turbo-instruct", openai_api_key=openai_api_key)
69
  story = llm.invoke(story_prompt)
70
 
71
  return caption_text, story
 
65
  # Generate story based on the caption
66
  story_prompt = f"Write an interesting {theme} story in the {genre} genre. The story should be within {word_count} words about {caption_text}."
67
 
68
+ llm = OpenAI(model_name="gpt-3.5-turbo-instruct", openai_api_key=openai_api_key, max_tokens=1000)
69
  story = llm.invoke(story_prompt)
70
 
71
  return caption_text, story