Spaces:
Running
Running
File size: 584 Bytes
f5d7b29 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
import numpy as np
import color_transfer_MKL as ct
def color_transfer(source, target):
source = np.array(source)/255
target = np.array(target)/255
result = ct.color_transfer_MKL(source, target)
return np.uint8(result * 255)
interface = gr.Interface(
fn=color_transfer,
inputs=[
gr.Image(type="numpy"),
gr.Image(type="numpy"),
],
outputs=["image"],
title="Image Color Transfer",
description="DIGIMAP Final Project"
)
if __name__ == "__main__":
interface.launch() |