Spaces:
Running
on
Zero
Running
on
Zero
File size: 650 Bytes
ecdf655 9ec2c07 dc5e397 ebbe9bc dc5e397 9dbf9f0 8bab392 dc5e397 0c3c890 dc5e397 5359828 dc5e397 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import numpy
import spaces
import gradio as gr
from PIL import Image
import upscale_image
import numpy as np
@spaces.GPU(duration=120)
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)
|