video / app.py
EngrNarmeen's picture
Create app.py
2e0ef7a verified
raw
history blame
717 Bytes
import streamlit as st
import tempfile
import os
from video_processor import process_video
st.title("AI Video Enhancement App 🎥")
uploaded_file = st.file_uploader("Upload a video", type=["mp4", "avi", "mov"])
if uploaded_file:
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as temp_file:
temp_file.write(uploaded_file.read())
temp_file_path = temp_file.name
st.write("Processing video...")
processed_video_path = process_video(temp_file_path)
if processed_video_path:
st.video(processed_video_path)
with open(processed_video_path, "rb") as file:
st.download_button("Download Processed Video", file, "enhanced_video.mp4", "video/mp4")