Spaces:
Runtime error
Runtime error
Upload 3 files
Browse files- app.py +3 -3
- huggingface.yml +20 -0
app.py
CHANGED
|
@@ -21,14 +21,14 @@ def process_video(url):
|
|
| 21 |
result = model.transcribe(video_path)
|
| 22 |
transcript = result['text']
|
| 23 |
|
| 24 |
-
clip = VideoFileClip(video_path).subclip(0, 30)
|
| 25 |
output_path = f"clip_{uuid.uuid4().hex}.mp4"
|
| 26 |
clip.write_videofile(output_path, codec="libx264", audio_codec="aac")
|
| 27 |
|
| 28 |
return output_path, transcript
|
| 29 |
|
| 30 |
-
demo = gr.Interface(fn=process_video,
|
| 31 |
-
inputs=gr.Textbox(label="YouTube URL"),
|
| 32 |
outputs=[gr.Video(label="Clip generado"), gr.Textbox(label="Transcripci贸n")])
|
| 33 |
|
| 34 |
demo.launch()
|
|
|
|
| 21 |
result = model.transcribe(video_path)
|
| 22 |
transcript = result['text']
|
| 23 |
|
| 24 |
+
clip = VideoFileClip(video_path).subclip(0, 30)
|
| 25 |
output_path = f"clip_{uuid.uuid4().hex}.mp4"
|
| 26 |
clip.write_videofile(output_path, codec="libx264", audio_codec="aac")
|
| 27 |
|
| 28 |
return output_path, transcript
|
| 29 |
|
| 30 |
+
demo = gr.Interface(fn=process_video,
|
| 31 |
+
inputs=gr.Textbox(label="YouTube URL"),
|
| 32 |
outputs=[gr.Video(label="Clip generado"), gr.Textbox(label="Transcripci贸n")])
|
| 33 |
|
| 34 |
demo.launch()
|
huggingface.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sdk: gradio
|
| 2 |
+
python_version: 3.10
|
| 3 |
+
system_packages:
|
| 4 |
+
- ffmpeg
|
| 5 |
+
- libsm6
|
| 6 |
+
- libxext6
|
| 7 |
+
- libglib2.0-0
|
| 8 |
+
- libgl1-mesa-glx
|
| 9 |
+
- libgtk2.0-dev
|
| 10 |
+
- libgdk-pixbuf2.0-0
|
| 11 |
+
- libavcodec-dev
|
| 12 |
+
- libavformat-dev
|
| 13 |
+
- libswscale-dev
|
| 14 |
+
- libavdevice-dev
|
| 15 |
+
python_packages:
|
| 16 |
+
- gradio
|
| 17 |
+
- openai-whisper
|
| 18 |
+
- yt-dlp
|
| 19 |
+
- moviepy
|
| 20 |
+
- ffmpeg-python
|