Spaces:
Sleeping
Sleeping
Raj Jayendrakumar Muchhala
commited on
Commit
·
a6786ea
1
Parent(s):
0e06c30
do not show default goal prompt
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ st.markdown("Paste a transcript on the left and view the generated content plan
|
|
| 13 |
# Sidebar for OpenAI API Key
|
| 14 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
| 15 |
DEFAULT_MODEL = "gpt-4o-2024-08-06"
|
| 16 |
-
DEFAULT_GOAL = "
|
| 17 |
|
| 18 |
# Sidebar: Model Selection
|
| 19 |
st.sidebar.subheader("⚙️ Settings")
|
|
@@ -25,7 +25,8 @@ MODEL = st.sidebar.selectbox(
|
|
| 25 |
|
| 26 |
# Sidebar: Goal Customization
|
| 27 |
st.sidebar.subheader("🎯 Customize Prompt")
|
| 28 |
-
GOAL = st.sidebar.text_area("
|
|
|
|
| 29 |
|
| 30 |
if not OPENAI_API_KEY:
|
| 31 |
st.warning("⚠️ Please enter your OpenAI API key.")
|
|
@@ -94,7 +95,6 @@ if generate_button:
|
|
| 94 |
st.write(f"**Title:** {clip.get('Title', 'N/A')}")
|
| 95 |
st.write(f"**Focus Prompt:** {clip.get('Focus Prompt', 'N/A')}")
|
| 96 |
st.write(f"**Duration:** {clip.get('Duration Target', 'N/A')} seconds")
|
| 97 |
-
st.write(f"**Aspect Ratio:** {clip.get('Aspect Ratio', 'N/A')}")
|
| 98 |
st.markdown("---")
|
| 99 |
else:
|
| 100 |
st.error("⚠️ No clips were generated. Try again.")
|
|
|
|
| 13 |
# Sidebar for OpenAI API Key
|
| 14 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
| 15 |
DEFAULT_MODEL = "gpt-4o-2024-08-06"
|
| 16 |
+
DEFAULT_GOAL = "Extract multiple self-contained clips by identifying natural narrative peaks, emotional highlights, and shareable moments (relatable struggles, surprising insights, or friendly debates) in their original sequence, optimizing for standalone engagement potential."
|
| 17 |
|
| 18 |
# Sidebar: Model Selection
|
| 19 |
st.sidebar.subheader("⚙️ Settings")
|
|
|
|
| 25 |
|
| 26 |
# Sidebar: Goal Customization
|
| 27 |
st.sidebar.subheader("🎯 Customize Prompt")
|
| 28 |
+
GOAL = st.sidebar.text_area("Specify specific prompt to extract clips (optional):", height=100)
|
| 29 |
+
GOAL = GOAL.strip() if GOAL.strip() else DEFAULT_GOAL
|
| 30 |
|
| 31 |
if not OPENAI_API_KEY:
|
| 32 |
st.warning("⚠️ Please enter your OpenAI API key.")
|
|
|
|
| 95 |
st.write(f"**Title:** {clip.get('Title', 'N/A')}")
|
| 96 |
st.write(f"**Focus Prompt:** {clip.get('Focus Prompt', 'N/A')}")
|
| 97 |
st.write(f"**Duration:** {clip.get('Duration Target', 'N/A')} seconds")
|
|
|
|
| 98 |
st.markdown("---")
|
| 99 |
else:
|
| 100 |
st.error("⚠️ No clips were generated. Try again.")
|