Akjava's picture
update
ecdf655
raw
history blame
549 Bytes
import numpy
import spaces
import gradio as gr
from PIL import Image
import upscale_image
@spaces.GPU(duration=120)
def gradio_upscale(image):
"""画像を反転させる関数"""
return upscale_image.execute(Image)
if __name__ == "__main__":
# Gradio UIの設定
iface = gr.Interface(
fn=gradio_upscale,
inputs="image",
outputs="image",
title="Image Reverser",
description="Upload an image to see it reversed.",
)
# インターフェースを公開
iface.launch(share=True)