Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 about {caption_text}. The story should be within {word_count} words."
|
67 |
|
68 |
-
llm = OpenAI(model_name="gpt-
|
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 about {caption_text}. The story should be within {word_count} words."
|
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
|