Spaces:
Running
on
Zero
Running
on
Zero
bennyguo
commited on
Commit
·
d180412
1
Parent(s):
efe24a8
adjust layout
Browse files
app.py
CHANGED
@@ -412,19 +412,24 @@ with gr.Blocks() as demo:
|
|
412 |
label="Scribble Input (Draw Black on White)",
|
413 |
value=initial_value,
|
414 |
image_mode="RGB",
|
415 |
-
brush=gr.Brush(default_color="#000000", color_mode="fixed", default_size=
|
416 |
interactive=True,
|
417 |
-
eraser=gr.Brush(default_color="#FFFFFF", color_mode="fixed", default_size=20)
|
|
|
|
|
|
|
418 |
)
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
|
|
|
|
|
|
423 |
with gr.Row():
|
424 |
submit_button = gr.Button("Generate 3D Model", variant="primary", scale=1)
|
425 |
-
lucky_button = gr.Button("I'm Feeling Lucky", scale=1)
|
426 |
-
|
427 |
-
model_output = gr.Model3D(label="Generated 3D Model", interactive=False)
|
428 |
|
429 |
# Define the inputs for the main generation function
|
430 |
gen_inputs = [image_input, prompt_input, confidence_input, prompt_confidence_input, seed_input] # Added text_confidence_input
|
|
|
412 |
label="Scribble Input (Draw Black on White)",
|
413 |
value=initial_value,
|
414 |
image_mode="RGB",
|
415 |
+
brush=gr.Brush(default_color="#000000", color_mode="fixed", default_size=4),
|
416 |
interactive=True,
|
417 |
+
eraser=gr.Brush(default_color="#FFFFFF", color_mode="fixed", default_size=20),
|
418 |
+
canvas_size=(canvas_width, canvas_height),
|
419 |
+
fixed_canvas=True,
|
420 |
+
height=canvas_height + 128,
|
421 |
)
|
422 |
+
with gr.Column(scale=1):
|
423 |
+
with gr.Row():
|
424 |
+
prompt_input = gr.Textbox(label="Prompt", placeholder="e.g., a cute cat wearing a hat", scale=3)
|
425 |
+
seed_input = gr.Number(label="Seed", value=0, precision=0, scale=1)
|
426 |
+
with gr.Row(): # Add row for sliders
|
427 |
+
confidence_input = gr.Slider(minimum=0.0, maximum=1.0, value=0.4, step=0.05, label="Scribble Confidence")
|
428 |
+
prompt_confidence_input = gr.Slider(minimum=0.0, maximum=1.0, value=1.0, step=0.05, label="Prompt Confidence")
|
429 |
with gr.Row():
|
430 |
submit_button = gr.Button("Generate 3D Model", variant="primary", scale=1)
|
431 |
+
lucky_button = gr.Button("I'm Feeling Lucky", scale=1)
|
432 |
+
model_output = gr.Model3D(label="Generated 3D Model", interactive=False, height=384)
|
|
|
433 |
|
434 |
# Define the inputs for the main generation function
|
435 |
gen_inputs = [image_input, prompt_input, confidence_input, prompt_confidence_input, seed_input] # Added text_confidence_input
|