Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,20 @@
|
|
3 |
|
4 |
from transformers import pipeline
|
5 |
from gtts import gTTS
|
6 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Step 1: Extract Text from Audio using Hugging Face Transformers
|
9 |
def extract_text_from_audio(audio_path):
|
|
|
3 |
|
4 |
from transformers import pipeline
|
5 |
from gtts import gTTS
|
6 |
+
import subprocessimport streamlit as st
|
7 |
+
|
8 |
+
uploaded_file = st.file_uploader("Upload a video file", type=["mp4"])
|
9 |
+
if uploaded_file is not None:
|
10 |
+
with open("input_video.mp4", "wb") as f:
|
11 |
+
f.write(uploaded_file.getbuffer())
|
12 |
+
main("input_video.mp4")
|
13 |
+
import streamlit as st
|
14 |
+
|
15 |
+
uploaded_file = st.file_uploader("Upload a video file", type=["mp4"])
|
16 |
+
if uploaded_file is not None:
|
17 |
+
with open("input_video.mp4", "wb") as f:
|
18 |
+
f.write(uploaded_file.getbuffer())
|
19 |
+
main("input_video.mp4")
|
20 |
|
21 |
# Step 1: Extract Text from Audio using Hugging Face Transformers
|
22 |
def extract_text_from_audio(audio_path):
|