awacke1 commited on
Commit
8f7392d
1 Parent(s): 28c8dde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -22,7 +22,8 @@ from dotenv import load_dotenv
22
  from gradio_client import Client, handle_file
23
  from huggingface_hub import InferenceClient
24
  from io import BytesIO
25
- from moviepy.editor import VideoFileClip
 
26
  from PIL import Image
27
  from PyPDF2 import PdfReader
28
  from templates import bot_template, css, user_template
@@ -530,10 +531,8 @@ def process_video(video_path, seconds_per_frame=2):
530
  audio_path = f"{base_video_path}.mp3"
531
  try:
532
  clip = VideoFileClip(video_path)
533
-
534
  clip.audio.write_audiofile(audio_path, bitrate="32k")
535
  clip.audio.close()
536
-
537
  clip.close()
538
  except:
539
  st.write('No audio track found, moving on..')
 
22
  from gradio_client import Client, handle_file
23
  from huggingface_hub import InferenceClient
24
  from io import BytesIO
25
+ #from moviepy.editor import VideoFileClip
26
+ from moviepy import VideoFileClip
27
  from PIL import Image
28
  from PyPDF2 import PdfReader
29
  from templates import bot_template, css, user_template
 
531
  audio_path = f"{base_video_path}.mp3"
532
  try:
533
  clip = VideoFileClip(video_path)
 
534
  clip.audio.write_audiofile(audio_path, bitrate="32k")
535
  clip.audio.close()
 
536
  clip.close()
537
  except:
538
  st.write('No audio track found, moving on..')