asahi417 commited on
Commit
6dba575
1 Parent(s): a7912ef

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -38,9 +38,7 @@ def infer(
38
  if randomize_seed:
39
  seed = random.randint(0, max_seed)
40
  init_image = Image.fromarray(np.uint8(init_image))
41
- # generate depth
42
  predicted_depth = pipe_depth(init_image)["predicted_depth"]
43
- # generate image
44
  image = pipe_depth2image(
45
  prompt=prompt,
46
  image=init_image,
@@ -57,17 +55,18 @@ def infer(
57
 
58
  with gr.Blocks() as demo:
59
  gr.Markdown("# Demo [Depth2Image](https://huggingface.co/stabilityai/stable-diffusion-2-depth) with depth map estimated by [Depth Anything V2](https://huggingface.co/depth-anything/Depth-Anything-V2-Large-hf).")
60
- prompt = gr.Text(
61
- label="Prompt",
62
- show_label=False,
63
- max_lines=1,
64
- placeholder="Enter your prompt",
65
- container=False,
66
- )
 
 
67
  with gr.Row():
68
  init_image = gr.Image(label="Input Image", type='numpy')
69
- result = gr.Image(label="Result", show_label=False)
70
- run_button = gr.Button("Run", scale=0)
71
  with gr.Accordion("Advanced Settings", open=False):
72
  negative_prompt = gr.Text(
73
  label="Negative Prompt",
 
38
  if randomize_seed:
39
  seed = random.randint(0, max_seed)
40
  init_image = Image.fromarray(np.uint8(init_image))
 
41
  predicted_depth = pipe_depth(init_image)["predicted_depth"]
 
42
  image = pipe_depth2image(
43
  prompt=prompt,
44
  image=init_image,
 
55
 
56
  with gr.Blocks() as demo:
57
  gr.Markdown("# Demo [Depth2Image](https://huggingface.co/stabilityai/stable-diffusion-2-depth) with depth map estimated by [Depth Anything V2](https://huggingface.co/depth-anything/Depth-Anything-V2-Large-hf).")
58
+ with gr.Row():
59
+ prompt = gr.Text(
60
+ label="Prompt",
61
+ show_label=False,
62
+ max_lines=1,
63
+ placeholder="Enter your prompt",
64
+ container=False,
65
+ )
66
+ run_button = gr.Button("Run", scale=0)
67
  with gr.Row():
68
  init_image = gr.Image(label="Input Image", type='numpy')
69
+ result = gr.Image(label="Result")
 
70
  with gr.Accordion("Advanced Settings", open=False):
71
  negative_prompt = gr.Text(
72
  label="Negative Prompt",