Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
-
import numpy as np
|
3 |
-
import os
|
4 |
-
import soundfile as sf
|
5 |
from pydub import AudioSegment
|
|
|
6 |
from io import BytesIO
|
7 |
-
import torchaudio
|
8 |
import math
|
9 |
|
10 |
def get_audio_file_info(audio_file):
|
@@ -66,6 +63,7 @@ def split_audio(input_file, duration):
|
|
66 |
|
67 |
return output_files
|
68 |
|
|
|
69 |
def main():
|
70 |
# Gradio Interface
|
71 |
with gr.Blocks() as app:
|
@@ -74,10 +72,10 @@ def main():
|
|
74 |
# <div align="center"> diablofx Audio Interval Cutter (BETA) </div>
|
75 |
Want to [support](https://ko-fi.com/diablofx) me? Or [join AI HUB](https://discord.gg/aihub) for more Help!\n
|
76 |
"""
|
77 |
-
|
78 |
with gr.Row():
|
79 |
with gr.Column():
|
80 |
-
audio_input = gr.Audio(type='
|
81 |
split_audio_butt = gr.Button(value='Split Audio into 5s Clips', variant='success')
|
82 |
with gr.Column():
|
83 |
output_text = gr.Textbox(value="", label="Output Files", disabled=True)
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
from pydub import AudioSegment
|
3 |
+
import os
|
4 |
from io import BytesIO
|
|
|
5 |
import math
|
6 |
|
7 |
def get_audio_file_info(audio_file):
|
|
|
63 |
|
64 |
return output_files
|
65 |
|
66 |
+
|
67 |
def main():
|
68 |
# Gradio Interface
|
69 |
with gr.Blocks() as app:
|
|
|
72 |
# <div align="center"> diablofx Audio Interval Cutter (BETA) </div>
|
73 |
Want to [support](https://ko-fi.com/diablofx) me? Or [join AI HUB](https://discord.gg/aihub) for more Help!\n
|
74 |
"""
|
75 |
+
)
|
76 |
with gr.Row():
|
77 |
with gr.Column():
|
78 |
+
audio_input = gr.Audio(type='filepath', label="Upload Audio File", file_extensions=["mp3", "wav"])
|
79 |
split_audio_butt = gr.Button(value='Split Audio into 5s Clips', variant='success')
|
80 |
with gr.Column():
|
81 |
output_text = gr.Textbox(value="", label="Output Files", disabled=True)
|