Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def generate_story(image, theme, genre):
|
|
36 |
# Generate story based on the caption
|
37 |
story_prompt = f"Write an interesting {theme} story in the {genre} genre. The story should be within 100 words about {caption_text}."
|
38 |
|
39 |
-
llm = OpenAI(model_name="gpt-
|
40 |
story = llm.invoke(story_prompt)
|
41 |
# story = text_generation_model(story_prompt, max_length=150)[0]["generated_text"]
|
42 |
|
|
|
36 |
# Generate story based on the caption
|
37 |
story_prompt = f"Write an interesting {theme} story in the {genre} genre. The story should be within 100 words about {caption_text}."
|
38 |
|
39 |
+
llm = OpenAI(model_name="gpt-3.5-turbo-instruct", openai_api_key=openai_api_key)
|
40 |
story = llm.invoke(story_prompt)
|
41 |
# story = text_generation_model(story_prompt, max_length=150)[0]["generated_text"]
|
42 |
|