Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files
app.py
CHANGED
@@ -1,10 +1,21 @@
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
with gr.Blocks() as demo:
|
5 |
# title
|
6 |
gr.HTML("<h1>Image2Body demo</h1>")
|
7 |
# description
|
8 |
gr.HTML("<p>Upload an image and select processing options to generate body and sketch images.</p>")
|
|
|
9 |
|
10 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
|
4 |
+
def process_image(input_image, mode, weight1=None, weight2=None):
|
5 |
+
print(f"Processing image with mode={mode}, weight1={weight1}, weight2={weight2}")
|
6 |
+
# 既存の画像処理ロジック
|
7 |
+
# if mode == "original":
|
8 |
+
# sotai_image, sketch_image = process_image_as_base64(input_image, mode, None, None)
|
9 |
+
# elif mode == "refine":
|
10 |
+
# sotai_image, sketch_image = process_image_as_base64(input_image, mode, weight1, weight2)
|
11 |
+
|
12 |
+
return input_image
|
13 |
+
|
14 |
with gr.Blocks() as demo:
|
15 |
# title
|
16 |
gr.HTML("<h1>Image2Body demo</h1>")
|
17 |
# description
|
18 |
gr.HTML("<p>Upload an image and select processing options to generate body and sketch images.</p>")
|
19 |
+
# interface
|
20 |
|
21 |
demo.launch()
|