File size: 346 Bytes
2216181 d068170 2216181 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from PIL import Image
from random import randint
def convert(image):
pil = Image.fromarray(image)
n = randint(0, 999999)
pil.save(f"{n:06}.jpg")
new = image.copy()
# image[:,:,0]
new[:,:,0] = image[:,:,2]
new[:,:,2] = image[:,:,0]
return new
gr.Interface(convert, "image", "image").launch(share=True) |