chansung commited on
Commit
435eeff
·
1 Parent(s): d9cf71a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -7
app.py CHANGED
@@ -40,10 +40,7 @@ def generate_image_fn(prompt: str, unconditional_guidance_scale: int) -> list:
40
  print(f"Time taken: {end_time - start_time} seconds.")
41
  return [image for image in images]
42
 
43
-
44
- description = "This Space demonstrates a fine-tuned Stable Diffusion model."
45
- article = "This Space is generated automatically from a TFX pipeline. If you are interested in, please check out the [original repository](https://github.com/deep-diver/textual-inversion-sd)."
46
- gr.Interface(
47
  generate_image_fn,
48
  inputs=[
49
  gr.Textbox(
@@ -54,9 +51,20 @@ gr.Interface(
54
  gr.Slider(value=40, minimum=8, maximum=50, step=1),
55
  ],
56
  outputs=gr.Gallery().style(grid=[2], height="auto"),
57
- title="Generate custom images with finetuned embeddings of Stable Diffusion",
58
- description=description,
59
- article=article,
60
  # examples=[["cute Sundar Pichai creature", 8], ["Hello kitty", 8]],
61
  allow_flagging=False,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  ).launch(enable_queue=True)
 
40
  print(f"Time taken: {end_time - start_time} seconds.")
41
  return [image for image in images]
42
 
43
+ demoInterface = gr.Interface(
 
 
 
44
  generate_image_fn,
45
  inputs=[
46
  gr.Textbox(
 
51
  gr.Slider(value=40, minimum=8, maximum=50, step=1),
52
  ],
53
  outputs=gr.Gallery().style(grid=[2], height="auto"),
 
 
 
54
  # examples=[["cute Sundar Pichai creature", 8], ["Hello kitty", 8]],
55
  allow_flagging=False,
56
+ )
57
+
58
+ io2 = gr.Interface(
59
+ lambda x, y, z: "flute.wav",
60
+ [
61
+ gr.Slider(label="pitch"),
62
+ gr.Slider(label="loudness"),
63
+ gr.Audio(label="base audio file (optional)"),
64
+ ],
65
+ gr.Audio(),
66
+ )
67
+
68
+ gr.TabbedInterface(
69
+ [demoInterface, io2], ["Try-out", "Deployment"]
70
  ).launch(enable_queue=True)