Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import json
|
|
|
4 |
from PIL import Image
|
5 |
import urllib.request
|
6 |
import uuid
|
@@ -126,7 +127,8 @@ def make_animation():
|
|
126 |
urllib.request.urlretrieve(ea,f'tmp{i}.png')
|
127 |
frames.append(Image.open(f'tmp{i}.png'))
|
128 |
frame_one = frames[0]
|
129 |
-
|
|
|
130 |
print("**************")
|
131 |
print(filename)
|
132 |
frame_one.save(filename, format="GIF", append_images=frames, save_all=True, duration=100, loop=0)
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import json
|
4 |
+
import os
|
5 |
from PIL import Image
|
6 |
import urllib.request
|
7 |
import uuid
|
|
|
127 |
urllib.request.urlretrieve(ea,f'tmp{i}.png')
|
128 |
frames.append(Image.open(f'tmp{i}.png'))
|
129 |
frame_one = frames[0]
|
130 |
+
filename1=f'{uuid.uuid4()}.gif'
|
131 |
+
filename=os.path.abspath(filename1)
|
132 |
print("**************")
|
133 |
print(filename)
|
134 |
frame_one.save(filename, format="GIF", append_images=frames, save_all=True, duration=100, loop=0)
|