Raj Jayendrakumar Muchhala commited on
Commit
886632d
Β·
1 Parent(s): e74c2c9

Independent scrolling

Browse files
Files changed (1) hide show
  1. app.py +28 -1
app.py CHANGED
@@ -8,6 +8,29 @@ import os
8
  # Set Streamlit layout to wide mode
9
  st.set_page_config(layout="wide")
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  st.title("🎬 AI-Powered Content Planner - Clip Creator")
12
  st.markdown("Paste a transcript on the left and view the generated content plan and extractions on the right.")
13
 
@@ -49,6 +72,7 @@ col_transcript, col_output = st.columns([1, 1])
49
 
50
  # Left Column: Transcript Input
51
  with col_transcript:
 
52
  st.subheader("πŸ“ Paste Your Transcript")
53
  transcript = st.text_area("Enter the transcript here:", height=400)
54
 
@@ -70,9 +94,11 @@ with col_transcript:
70
  media_link = st.text_input("Enter YouTube or external media link:")
71
  if media_link:
72
  st.video(media_link)
 
73
 
74
  # Right Column: Clip Plan Generation and Extraction
75
  with col_output:
 
76
  st.subheader("πŸ“‹ Generated Clip Plans")
77
 
78
  # Button to generate clip plans from the transcript
@@ -186,4 +212,5 @@ with col_output:
186
  # Display extraction output if available
187
  if f"extracted_clip_{i}" in st.session_state:
188
  st.markdown("#### πŸ“ Extracted Transcript Section:")
189
- st.write(st.session_state[f"extracted_clip_{i}"])
 
 
8
  # Set Streamlit layout to wide mode
9
  st.set_page_config(layout="wide")
10
 
11
+ # Inject custom CSS for independent scrolling and styling
12
+ st.markdown(
13
+ """
14
+ <style>
15
+ .scrollable-left {
16
+ height: 600px; /* Adjust as needed */
17
+ overflow-y: auto;
18
+ padding: 1rem;
19
+ border: 1px solid #ddd;
20
+ background-color: #f9f9f9;
21
+ }
22
+ .scrollable-right {
23
+ height: 600px; /* Adjust as needed */
24
+ overflow-y: auto;
25
+ padding: 1rem;
26
+ border: 1px solid #ddd;
27
+ background-color: #f1f1f1;
28
+ }
29
+ </style>
30
+ """,
31
+ unsafe_allow_html=True,
32
+ )
33
+
34
  st.title("🎬 AI-Powered Content Planner - Clip Creator")
35
  st.markdown("Paste a transcript on the left and view the generated content plan and extractions on the right.")
36
 
 
72
 
73
  # Left Column: Transcript Input
74
  with col_transcript:
75
+ st.markdown('<div class="scrollable-left">', unsafe_allow_html=True)
76
  st.subheader("πŸ“ Paste Your Transcript")
77
  transcript = st.text_area("Enter the transcript here:", height=400)
78
 
 
94
  media_link = st.text_input("Enter YouTube or external media link:")
95
  if media_link:
96
  st.video(media_link)
97
+ st.markdown('</div>', unsafe_allow_html=True)
98
 
99
  # Right Column: Clip Plan Generation and Extraction
100
  with col_output:
101
+ st.markdown('<div class="scrollable-right">', unsafe_allow_html=True)
102
  st.subheader("πŸ“‹ Generated Clip Plans")
103
 
104
  # Button to generate clip plans from the transcript
 
212
  # Display extraction output if available
213
  if f"extracted_clip_{i}" in st.session_state:
214
  st.markdown("#### πŸ“ Extracted Transcript Section:")
215
+ st.write(st.session_state[f"extracted_clip_{i}"])
216
+ st.markdown('</div>', unsafe_allow_html=True)