Spaces:
Sleeping
Sleeping
Muhammad Abdullah commited on
Update app.py
Browse files11 unmodified lines12131415161718184 unmodified lines203204205206207208209210211212213214215216217218219220221222223224225226227228320 unmodified lines549550551552553554555556557558559560561562563564565566567568569183 unmodified lines75375475575675775875911 unmodified linesst.set_page_config(layout="wide")# CSS with enhanced checkbox stylingst.markdown("""<style>@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');184 unmodified linesopacity: 1;}/* Checkbox Styling */div[data-testid="stCheckbox"] {margin: 1rem 0 !important;padding: 0.5rem !important;background-color: #f8f9fa !important;border-radius: 0.5rem !important;border: 2px solid #2196f3 !important;z-index: 10 !important;}div[data-testid="stCheckbox"] label {font-size: 1.2rem !important;font-weight: 600 !important;color: #1a1a1a !important;display: block !important;}div[data-testid="stCheckbox"] input {transform: scale(1.5) !important;margin-right: 0.5rem !important;}/* Footer */footer {background: #1a1a1a;320 unmodified lineslanguage_code = "en" if language == "English" else "ur"st.session_state['language'] = languagest.session_state['language_code'] = language_codest.write(f"Debug: Language selected: {language} (Code: {language_code})")chunk_duration = st.number_input("Duration per chunk (seconds):", min_value=1.0, step=0.1, value=10.0)if language_code == "ur":st.markdown("### Translation Option")col1, col2 = st.columns([1, 3])with col1:st.write("Debug: Rendering English translation checkbox for Urdu video.")translate_to_english = st.checkbox("Generate English translation", key="translate_checkbox")st.session_state['translate_to_english'] = translate_to_englishst.write(f"Debug: Translate to English set to: {st.session_state['translate_to_english']}")with col2:st.empty() # Placeholder for spacingelse:st.session_state['translate_to_english'] = Falsest.write("Debug: English selected, no translation checkbox displayed.")if st.form_submit_button("Process"):with st.spinner("Processing video..."):start_time = time.time()183 unmodified lines<input type="email" id="email" placeholder="Your email address" style="width: 100%; padding: 0.75rem; background-color:white; color:white; border-radius: 0.5rem; border: 1px solid #e0e0e0;"></div><div style="margin-bottom: 1rem;"><label for="message" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Message</label><textarea id="message" rows="5" placeholder="Your message" style="width: 100%; padding: 0.75rem; border-radius: 0.5rem; background-color:white; color:white; border: 1px solid #e0e0e0;"></textarea></div><button onclick="alert('Message sent successfully!')" style="background: linear-gradient(135deg, #ff6f61, #ff8a65); color: white; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.5rem; border: none; cursor: pointer; width: 100%;">Send Message</button>11 unmodified lines12131415161718184 unmodified lines203204205206207208320 unmodified lines529530531532533534535536537538539540183 unmodified lines72472572672772872973011 unmodified linesst.set_page_config(layout="wide")# CSS with modifications for video centering and upload button hover effectst.markdown("""<style>@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');184 unmodified linesopacity: 1;}/* Footer */footer {background: #1a1a1a;320 unmodified lineslanguage_code = "en" if language == "English" else "ur"st.session_state['language'] = languagest.session_state['language_code'] = language_codechunk_duration = st.number_input("Duration per chunk (seconds):", min_value=1.0, step=0.1, value=10.0)if language_code == "ur":translate_to_english = st.checkbox("Generate English translation", key="translate_checkbox")st.session_state['translate_to_english'] = translate_to_englishelse:st.session_state['translate_to_english'] = Falseif st.form_submit_button("Process"):with st.spinner("Processing video..."):start_time = time.time()183 unmodified lines<input type="email" id="email" placeholder="Your email address" style="width: 100%; padding: 0.75rem; background-color:white; color:white; border-radius: 0.5rem; border: 1px solid #e0e0e0;"></div><div style="margin-bottom: 1rem;"><label for="message" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">MessageTwenty-first</label><textarea id="message" rows="5" placeholder="Your message" style="width: 100%; padding: 0.75rem; border-radius: 0.5rem; background-color:white; color:white; border: 1px solid #e0e0e0;"></textarea></div><button onclick="alert('Message sent successfully!')" style="background: linear-gradient(135deg, #ff6f61, #ff8a65); color: white; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.5rem; border: none; cursor: pointer; width: 100%;">Send Message</button>
app.py+4-33