Spaces:
Runtime error
Runtime error
Update wear_birthday_crown.py
Browse files- wear_birthday_crown.py +3 -7
wear_birthday_crown.py
CHANGED
@@ -6,13 +6,9 @@ import PIL
|
|
6 |
from PIL import Image
|
7 |
|
8 |
def exec_cmd(image):
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
os.system("python create_gif.py --config config.json --image images/me.jpg --output me.gif")
|
13 |
-
# output=cv2.imread(r"D:\PythonProject\birthday_crown\Creating-GIFs-with-OpenCV-master\me.gif")
|
14 |
-
# output=Image.open(r"D:\PythonProject\birthday_crown\Creating-GIFs-with-OpenCV-master\me.gif")
|
15 |
-
output=r"D:\PythonProject\birthday_crown\Creating-GIFs-with-OpenCV-master\me.gif"
|
16 |
return output
|
17 |
|
18 |
interface = gr.Interface(fn=exec_cmd, inputs=gr.inputs.Image(type="pil"),outputs=gr.outputs.Image(type="file"))
|
6 |
from PIL import Image
|
7 |
|
8 |
def exec_cmd(image):
|
9 |
+
image.save("me.jpg")
|
10 |
+
os.system("python create_gif.py --config config.json --image me.jpg --output result.gif")
|
11 |
+
output="result.gif"
|
|
|
|
|
|
|
|
|
12 |
return output
|
13 |
|
14 |
interface = gr.Interface(fn=exec_cmd, inputs=gr.inputs.Image(type="pil"),outputs=gr.outputs.Image(type="file"))
|