Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import psutil
|
|
12 |
|
13 |
st.set_page_config(layout="wide")
|
14 |
|
15 |
-
# CSS with
|
16 |
st.markdown("""
|
17 |
<style>
|
18 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
|
@@ -203,26 +203,6 @@ input[type="file"]:hover {
|
|
203 |
opacity: 1;
|
204 |
}
|
205 |
|
206 |
-
/* Checkbox Styling */
|
207 |
-
div[data-testid="stCheckbox"] {
|
208 |
-
margin: 1rem 0 !important;
|
209 |
-
padding: 0.5rem !important;
|
210 |
-
background-color: #f8f9fa !important;
|
211 |
-
border-radius: 0.5rem !important;
|
212 |
-
border: 2px solid #2196f3 !important;
|
213 |
-
z-index: 10 !important;
|
214 |
-
}
|
215 |
-
div[data-testid="stCheckbox"] label {
|
216 |
-
font-size: 1.2rem !important;
|
217 |
-
font-weight: 600 !important;
|
218 |
-
color: #1a1a1a !important;
|
219 |
-
display: block !important;
|
220 |
-
}
|
221 |
-
div[data-testid="stCheckbox"] input {
|
222 |
-
transform: scale(1.5) !important;
|
223 |
-
margin-right: 0.5rem !important;
|
224 |
-
}
|
225 |
-
|
226 |
/* Footer */
|
227 |
footer {
|
228 |
background: #1a1a1a;
|
@@ -549,21 +529,12 @@ def main():
|
|
549 |
language_code = "en" if language == "English" else "ur"
|
550 |
st.session_state['language'] = language
|
551 |
st.session_state['language_code'] = language_code
|
552 |
-
st.write(f"Debug: Language selected: {language} (Code: {language_code})")
|
553 |
chunk_duration = st.number_input("Duration per chunk (seconds):", min_value=1.0, step=0.1, value=10.0)
|
554 |
if language_code == "ur":
|
555 |
-
st.
|
556 |
-
|
557 |
-
with col1:
|
558 |
-
st.write("Debug: Rendering English translation checkbox for Urdu video.")
|
559 |
-
translate_to_english = st.checkbox("Generate English translation", key="translate_checkbox")
|
560 |
-
st.session_state['translate_to_english'] = translate_to_english
|
561 |
-
st.write(f"Debug: Translate to English set to: {st.session_state['translate_to_english']}")
|
562 |
-
with col2:
|
563 |
-
st.empty() # Placeholder for spacing
|
564 |
else:
|
565 |
st.session_state['translate_to_english'] = False
|
566 |
-
st.write("Debug: English selected, no translation checkbox displayed.")
|
567 |
if st.form_submit_button("Process"):
|
568 |
with st.spinner("Processing video..."):
|
569 |
start_time = time.time()
|
@@ -753,7 +724,7 @@ def main():
|
|
753 |
<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;">
|
754 |
</div>
|
755 |
<div style="margin-bottom: 1rem;">
|
756 |
-
<label for="message" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">
|
757 |
<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>
|
758 |
</div>
|
759 |
<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 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 |
opacity: 1;
|
204 |
}
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
/* Footer */
|
207 |
footer {
|
208 |
background: #1a1a1a;
|
|
|
529 |
language_code = "en" if language == "English" else "ur"
|
530 |
st.session_state['language'] = language
|
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"):
|
539 |
with st.spinner("Processing video..."):
|
540 |
start_time = time.time()
|
|
|
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>
|