Toumaima commited on
Commit
1cbe7d6
·
verified ·
1 Parent(s): 2886772

fix moviepy problem

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -3,7 +3,6 @@ import gradio as gr
3
  import requests
4
  import pandas as pd
5
  import moviepy
6
- import moviepy.editor as mp
7
  from duckduckgo_search import ddg
8
  import whisper
9
  from transformers import pipeline
@@ -21,7 +20,7 @@ class BasicAgent:
21
 
22
  def call_whisper(self, video_path: str) -> str:
23
  # Transcribe the video to text using Whisper model
24
- video = mp.VideoFileClip(video_path)
25
  audio_path = "temp_audio.wav"
26
  video.audio.write_audiofile(audio_path)
27
 
 
3
  import requests
4
  import pandas as pd
5
  import moviepy
 
6
  from duckduckgo_search import ddg
7
  import whisper
8
  from transformers import pipeline
 
20
 
21
  def call_whisper(self, video_path: str) -> str:
22
  # Transcribe the video to text using Whisper model
23
+ video = moviepy.editor.VideoFileClip(video_path)
24
  audio_path = "temp_audio.wav"
25
  video.audio.write_audiofile(audio_path)
26