Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -157,7 +157,6 @@ if st.button("Generate Content Plan 🚀"):
|
|
| 157 |
except Exception as e:
|
| 158 |
st.error(f"Error: {str(e)}")
|
| 159 |
|
| 160 |
-
# Display results
|
| 161 |
# Display results
|
| 162 |
if st.session_state.content_plan:
|
| 163 |
st.markdown("## 📅 10-Day Content Plan")
|
|
@@ -168,7 +167,6 @@ if st.session_state.content_plan:
|
|
| 168 |
for day in range(10):
|
| 169 |
current_date = start_date + timedelta(days=day)
|
| 170 |
with st.expander(f"Day {day+1} - {current_date.strftime('%b %d')}", expanded=True if day==0 else False):
|
| 171 |
-
# Use raw string for HTML and format variables separately
|
| 172 |
st.markdown(
|
| 173 |
f"""
|
| 174 |
<div class="day-card">
|
|
@@ -180,4 +178,32 @@ if st.session_state.content_plan:
|
|
| 180 |
</div>
|
| 181 |
""",
|
| 182 |
unsafe_allow_html=True
|
| 183 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
except Exception as e:
|
| 158 |
st.error(f"Error: {str(e)}")
|
| 159 |
|
|
|
|
| 160 |
# Display results
|
| 161 |
if st.session_state.content_plan:
|
| 162 |
st.markdown("## 📅 10-Day Content Plan")
|
|
|
|
| 167 |
for day in range(10):
|
| 168 |
current_date = start_date + timedelta(days=day)
|
| 169 |
with st.expander(f"Day {day+1} - {current_date.strftime('%b %d')}", expanded=True if day==0 else False):
|
|
|
|
| 170 |
st.markdown(
|
| 171 |
f"""
|
| 172 |
<div class="day-card">
|
|
|
|
| 178 |
</div>
|
| 179 |
""",
|
| 180 |
unsafe_allow_html=True
|
| 181 |
+
)
|
| 182 |
+
|
| 183 |
+
# Download button
|
| 184 |
+
st.download_button(
|
| 185 |
+
label="📥 Download Full Plan",
|
| 186 |
+
data=st.session_state.content_plan,
|
| 187 |
+
file_name=f"content_plan_{datetime.now().strftime('%Y%m%d')}.txt",
|
| 188 |
+
mime="text/plain"
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
# Instructions
|
| 192 |
+
with st.expander("ℹ️ How to use this tool"):
|
| 193 |
+
st.markdown("""
|
| 194 |
+
1. **Get API Keys**:
|
| 195 |
+
- YouTube Data API: [Get it here](https://console.cloud.google.com/)
|
| 196 |
+
- Gemini API: [Get it here](https://makersuite.google.com/)
|
| 197 |
+
|
| 198 |
+
2. **Enter Channel URL**:
|
| 199 |
+
- Supports both channel IDs (@ChannelName) and custom URLs
|
| 200 |
+
|
| 201 |
+
3. **Adjust Settings**:
|
| 202 |
+
- Control number of videos/comments analyzed in sidebar
|
| 203 |
+
|
| 204 |
+
4. **Generate Plan**:
|
| 205 |
+
- Click the rocket button to create your strategy
|
| 206 |
+
|
| 207 |
+
5. **Implement & Track**:
|
| 208 |
+
- Download the plan and track performance in YouTube Analytics
|
| 209 |
+
""")
|