Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
4 |
from matplotlib.animation import FuncAnimation
|
|
|
5 |
import io
|
6 |
import librosa
|
7 |
import tempfile
|
@@ -57,8 +58,8 @@ iface = gr.Interface(
|
|
57 |
inputs=[
|
58 |
gr.Audio(type="filepath"),
|
59 |
gr.Slider(1, 10, value=5, step=1, label="Window Size (seconds)"),
|
60 |
-
gr.ColorPicker(value="blue", label="Waveform Color"),
|
61 |
-
gr.ColorPicker(value="#00FFFF00", label="Background Color")
|
62 |
],
|
63 |
outputs=gr.Image(),
|
64 |
description="Scroll through audio waveform with a moving window."
|
|
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
4 |
from matplotlib.animation import FuncAnimation
|
5 |
+
import matplotlib.colors as mcolors
|
6 |
import io
|
7 |
import librosa
|
8 |
import tempfile
|
|
|
58 |
inputs=[
|
59 |
gr.Audio(type="filepath"),
|
60 |
gr.Slider(1, 10, value=5, step=1, label="Window Size (seconds)"),
|
61 |
+
gr.ColorPicker(value="blue", label="Waveform Color", format="hex"),
|
62 |
+
gr.ColorPicker(value="#00FFFF00", label="Background Color", format="hex")
|
63 |
],
|
64 |
outputs=gr.Image(),
|
65 |
description="Scroll through audio waveform with a moving window."
|