Update app.py
Browse files
app.py
CHANGED
|
@@ -78,70 +78,6 @@ def process_audio(audio_file, seconds=0.05):
|
|
| 78 |
# return demo
|
| 79 |
|
| 80 |
|
| 81 |
-
|
| 82 |
-
# def ui():
|
| 83 |
-
# theme = gr.themes.Soft(
|
| 84 |
-
# font=[gr.themes.GoogleFont("Source Sans Pro"), "Arial", "sans-serif"]
|
| 85 |
-
# )
|
| 86 |
-
|
| 87 |
-
# css = """
|
| 88 |
-
# .gradio-container {max-width: none !important;}
|
| 89 |
-
# .tab-content {padding: 20px;}
|
| 90 |
-
# """
|
| 91 |
-
|
| 92 |
-
# with gr.Blocks(theme=theme, css=css) as demo:
|
| 93 |
-
# # gr.Markdown(
|
| 94 |
-
# # """
|
| 95 |
-
# # # Remove Silence From Audio
|
| 96 |
-
# # Upload an MP3 or WAV file, and it will remove silent parts from it.
|
| 97 |
-
# # """
|
| 98 |
-
# # )
|
| 99 |
-
# gr.HTML("""
|
| 100 |
-
# <div style="text-align:center; margin:20px auto; max-width:800px;">
|
| 101 |
-
# <h1 style="font-size:2.4em; margin-bottom:6px;">
|
| 102 |
-
# 🔇 Remove Silence From Audio
|
| 103 |
-
# </h1>
|
| 104 |
-
|
| 105 |
-
# <p style="font-size:1.05em; color:#555; margin:0 0 10px;">
|
| 106 |
-
# Upload an MP3 or WAV file, and it will remove silent parts from it.
|
| 107 |
-
# </p>
|
| 108 |
-
|
| 109 |
-
# <p style="font-size:0.9em; color:#777;">
|
| 110 |
-
# Made by
|
| 111 |
-
# <a href="https://github.com/NeuralFalconYT" target="_blank" style="text-decoration:none;">
|
| 112 |
-
# NeuralFalconYT
|
| 113 |
-
# </a>
|
| 114 |
-
# </p>
|
| 115 |
-
# </div>
|
| 116 |
-
# """)
|
| 117 |
-
|
| 118 |
-
# with gr.Row():
|
| 119 |
-
# with gr.Column(scale=1):
|
| 120 |
-
# audio_input = gr.Audio(
|
| 121 |
-
# label="Upload Audio",
|
| 122 |
-
# type="filepath",
|
| 123 |
-
# sources=["upload", "microphone"]
|
| 124 |
-
# )
|
| 125 |
-
|
| 126 |
-
# silence_threshold = gr.Number(
|
| 127 |
-
# label="Keep Silence Upto (In seconds)",
|
| 128 |
-
# value=0.05
|
| 129 |
-
# )
|
| 130 |
-
|
| 131 |
-
# submit_btn = gr.Button("Remove Silence")
|
| 132 |
-
|
| 133 |
-
# with gr.Column(scale=1):
|
| 134 |
-
# audio_output = gr.Audio(label="Play Audio")
|
| 135 |
-
# file_output = gr.File(label="Download Audio File")
|
| 136 |
-
# duration_output = gr.Textbox(label="Duration")
|
| 137 |
-
|
| 138 |
-
# submit_btn.click(
|
| 139 |
-
# fn=process_audio,
|
| 140 |
-
# inputs=[audio_input, silence_threshold],
|
| 141 |
-
# outputs=[audio_output, file_output, duration_output]
|
| 142 |
-
# )
|
| 143 |
-
|
| 144 |
-
# return demo
|
| 145 |
def ui():
|
| 146 |
theme = gr.themes.Soft(
|
| 147 |
font=[gr.themes.GoogleFont("Source Sans Pro"), "Arial", "sans-serif"]
|
|
|
|
| 78 |
# return demo
|
| 79 |
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
def ui():
|
| 82 |
theme = gr.themes.Soft(
|
| 83 |
font=[gr.themes.GoogleFont("Source Sans Pro"), "Arial", "sans-serif"]
|