Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -81,10 +81,10 @@ def build_image(path):
|
|
81 |
return image
|
82 |
|
83 |
def build_gif(path):
|
84 |
-
|
85 |
-
|
86 |
-
frames =
|
87 |
-
return [
|
88 |
|
89 |
def build_audio(path):
|
90 |
audio, _ = librosa.load(path, sr=AUDIO_SR, mono=True)
|
|
|
81 |
return image
|
82 |
|
83 |
def build_gif(path):
|
84 |
+
image = Image.open(path)
|
85 |
+
frames = [f.copy().convert("RGB") for f in ImageSequence.Iterator(image)]
|
86 |
+
frames = uniform_sample(frames, MAX_FRAMES)
|
87 |
+
return [*frames]
|
88 |
|
89 |
def build_audio(path):
|
90 |
audio, _ = librosa.load(path, sr=AUDIO_SR, mono=True)
|