Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -215,7 +215,6 @@ footer {
|
|
215 |
color: #ffffff;
|
216 |
padding: 3rem 2rem;
|
217 |
margin-top: 3rem;
|
218 |
-
Desk
|
219 |
border-radius: 1rem 1rem 0 0;
|
220 |
}
|
221 |
.footer-container {
|
@@ -411,7 +410,7 @@ def summarize_text(text, tokenizer, model, device, summarizer_type='bart'):
|
|
411 |
min_length=50,
|
412 |
early_stopping=True,
|
413 |
temperature=0.7
|
414 |
-
|
415 |
summaries.append(tokenizer.decode(summary_ids[0], skip_special_tokens=True))
|
416 |
else:
|
417 |
st.write(f"Transcript exceeds {max_input_length} tokens. Processing in chunks...")
|
@@ -493,11 +492,13 @@ def create_edited_video(video_path, transcript, keep_indices):
|
|
493 |
if os.path.exists(temp_file):
|
494 |
try:
|
495 |
os.remove(temp_file)
|
|
|
496 |
except Exception as e:
|
497 |
st.warning(f"Failed to remove {temp_file}: {str(e)}")
|
498 |
if os.path.exists("list.txt"):
|
499 |
try:
|
500 |
os.remove("list.txt")
|
|
|
501 |
except Exception as e:
|
502 |
st.warning(f"Failed to remove list.txt: {str(e)}")
|
503 |
|
@@ -586,7 +587,7 @@ def main():
|
|
586 |
st.markdown("<div id='upload'></div>", unsafe_allow_html=True)
|
587 |
st.markdown("<h3 style='text-align: center; color: black;'>Upload Your Video</h3>", unsafe_allow_html=True)
|
588 |
with st.form(key="upload_form"):
|
589 |
-
uploaded_file = st.file_uploader("
|
590 |
if st.form_submit_button("Upload") and uploaded_file:
|
591 |
video_path = save_uploaded_file(uploaded_file)
|
592 |
if video_path:
|
|
|
215 |
color: #ffffff;
|
216 |
padding: 3rem 2rem;
|
217 |
margin-top: 3rem;
|
|
|
218 |
border-radius: 1rem 1rem 0 0;
|
219 |
}
|
220 |
.footer-container {
|
|
|
410 |
min_length=50,
|
411 |
early_stopping=True,
|
412 |
temperature=0.7
|
413 |
+
)
|
414 |
summaries.append(tokenizer.decode(summary_ids[0], skip_special_tokens=True))
|
415 |
else:
|
416 |
st.write(f"Transcript exceeds {max_input_length} tokens. Processing in chunks...")
|
|
|
492 |
if os.path.exists(temp_file):
|
493 |
try:
|
494 |
os.remove(temp_file)
|
495 |
+
st.info även
|
496 |
except Exception as e:
|
497 |
st.warning(f"Failed to remove {temp_file}: {str(e)}")
|
498 |
if os.path.exists("list.txt"):
|
499 |
try:
|
500 |
os.remove("list.txt")
|
501 |
+
st.info(f"Removed temporary file: list.txt")
|
502 |
except Exception as e:
|
503 |
st.warning(f"Failed to remove list.txt: {str(e)}")
|
504 |
|
|
|
587 |
st.markdown("<div id='upload'></div>", unsafe_allow_html=True)
|
588 |
st.markdown("<h3 style='text-align: center; color: black;'>Upload Your Video</h3>", unsafe_allow_html=True)
|
589 |
with st.form(key="upload_form"):
|
590 |
+
uploaded_file = st.file_uploader("Choose a video file", type=["mp4"], label_visibility="collapsed")
|
591 |
if st.form_submit_button("Upload") and uploaded_file:
|
592 |
video_path = save_uploaded_file(uploaded_file)
|
593 |
if video_path:
|