File size: 748 Bytes
b7cfcd0
f7675b1
eca7532
4a7bff4
6d52164
 
 
 
 
 
 
 
 
 
320761b
 
 
 
 
6d52164
320761b
1564a3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import gradio as gr
import spaces

@spaces.GPU
def process_image(input_image, mode, weight1=None, weight2=None):
    print(f"Processing image with mode={mode}, weight1={weight1}, weight2={weight2}")
    # 既存の画像処理ロジック
    # if mode == "original":
    #     sotai_image, sketch_image = process_image_as_base64(input_image, mode, None, None)
    # elif mode == "refine":
    #     sotai_image, sketch_image = process_image_as_base64(input_image, mode, weight1, weight2)

    return input_image

with gr.Blocks() as demo:
    # title
    gr.HTML("<h1>Image2Body demo</h1>")
    # description
    gr.HTML("<p>Upload an image and select processing options to generate body and sketch images.</p>")
    # interface

    demo.launch()