GogetaBlueMUI commited on
Commit
0774345
·
verified ·
1 Parent(s): 3364ae3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -4
app.py CHANGED
@@ -12,7 +12,7 @@ import psutil
12
 
13
  st.set_page_config(layout="wide")
14
 
15
- # CSS with modifications for video centering and upload button hover effect
16
  st.markdown("""
17
  <style>
18
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@@ -203,6 +203,20 @@ input[type="file"]:hover {
203
  opacity: 1;
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /* Footer */
207
  footer {
208
  background: #1a1a1a;
@@ -531,8 +545,11 @@ def main():
531
  st.session_state['language_code'] = language_code
532
  chunk_duration = st.number_input("Duration per chunk (seconds):", min_value=1.0, step=0.1, value=10.0)
533
  if language_code == "ur":
534
- translate_to_english = st.checkbox("Generate English translation", key="translate_checkbox")
535
- st.session_state['translate_to_english'] = translate_to_english
 
 
 
536
  else:
537
  st.session_state['translate_to_english'] = False
538
  if st.form_submit_button("Process"):
@@ -724,7 +741,7 @@ def main():
724
  <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;">
725
  </div>
726
  <div style="margin-bottom: 1rem;">
727
- <label for="message" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">MessageTwenty-first</label>
728
  <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>
729
  </div>
730
  <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>
 
12
 
13
  st.set_page_config(layout="wide")
14
 
15
+ # CSS with added styling for checkbox visibility
16
  st.markdown("""
17
  <style>
18
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
 
203
  opacity: 1;
204
  }
205
 
206
+ /* Checkbox Styling */
207
+ .stCheckbox {
208
+ margin: 1rem 0;
209
+ padding: 0.5rem;
210
+ background-color: #f8f9fa;
211
+ border-radius: 0.5rem;
212
+ border: 1px solid #2196f3;
213
+ }
214
+ .stCheckbox label {
215
+ font-size: 1.1rem;
216
+ font-weight: 500;
217
+ color: #1a1a1a;
218
+ }
219
+
220
  /* Footer */
221
  footer {
222
  background: #1a1a1a;
 
545
  st.session_state['language_code'] = language_code
546
  chunk_duration = st.number_input("Duration per chunk (seconds):", min_value=1.0, step=0.1, value=10.0)
547
  if language_code == "ur":
548
+ st.markdown("### Translation Option")
549
+ with st.container():
550
+ st.write("Debug: Rendering English translation checkbox for Urdu video.")
551
+ translate_to_english = st.checkbox("Generate English translation", key="translate_checkbox")
552
+ st.session_state['translate_to_english'] = translate_to_english
553
  else:
554
  st.session_state['translate_to_english'] = False
555
  if st.form_submit_button("Process"):
 
741
  <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;">
742
  </div>
743
  <div style="margin-bottom: 1rem;">
744
+ <label for="message" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">Message</label>
745
  <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>
746
  </div>
747
  <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>