Spaces:
Running
on
Zero
Running
on
Zero
import numpy | |
import spaces | |
import gradio as gr | |
from PIL import Image | |
import upscale_image | |
import numpy as np | |
def gradio_upscale(image): | |
pil_image = Image.fromarray(np.uint8(image)).convert('RGB') | |
return upscale_image.execute(pil_image) | |
if __name__ == "__main__": | |
# Gradio UIの設定 | |
iface = gr.Interface( | |
fn=gradio_upscale, | |
inputs="image", | |
outputs="image", | |
title="StableDiffusion x4 Upscale(recomment image size are 64 -128)", | |
description="This is ZeroGPU.only 2 minute to time you can", | |
) | |
# インターフェースを公開 | |
iface.launch(share=True) | |