Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ def generate_scene_descriptions(api_key, theme, story):
|
|
5 |
openai.api_key = api_key
|
6 |
|
7 |
# Base introduction for the prompt
|
8 |
-
intro = f"Generate structured scene descriptions
|
9 |
story_prompt = f"Story: {story}\n\n" if story else ""
|
10 |
|
11 |
# Constructing the prompt for multiple scenes
|
@@ -38,7 +38,7 @@ iface = gr.Interface(
|
|
38 |
inputs=[
|
39 |
gr.Textbox(label="Your OpenAI API Key", type="password", placeholder="Enter your OpenAI API Key here"), # Secure API key input
|
40 |
gr.Textbox(label="Thematic Area", placeholder="Enter a thematic area, e.g., Climate Crisis"), # Thematic area input
|
41 |
-
gr.Textbox(label="Story (Optional)", placeholder="Enter a story to base the scenes on (optional)"
|
42 |
],
|
43 |
outputs="text", # The output is a text field
|
44 |
title="Multi-Scene Generator", # Title of the Gradio app
|
|
|
5 |
openai.api_key = api_key
|
6 |
|
7 |
# Base introduction for the prompt
|
8 |
+
intro = f"Generate structured scene descriptions for a series of scenes for a video on the theme \"{theme}\":\n"
|
9 |
story_prompt = f"Story: {story}\n\n" if story else ""
|
10 |
|
11 |
# Constructing the prompt for multiple scenes
|
|
|
38 |
inputs=[
|
39 |
gr.Textbox(label="Your OpenAI API Key", type="password", placeholder="Enter your OpenAI API Key here"), # Secure API key input
|
40 |
gr.Textbox(label="Thematic Area", placeholder="Enter a thematic area, e.g., Climate Crisis"), # Thematic area input
|
41 |
+
gr.Textbox(label="Story (Optional)", placeholder="Enter a story to base the scenes on (optional)") # Story input, optional by default
|
42 |
],
|
43 |
outputs="text", # The output is a text field
|
44 |
title="Multi-Scene Generator", # Title of the Gradio app
|