Spaces:
Running
Running
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() |