mattb512 commited on
Commit
88bb627
1 Parent(s): e57df08

adding examples

Browse files
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from image_generator import ImageGenerator
 
3
 
4
  ig = ImageGenerator(g=7.5)
5
  print(ig)
@@ -37,5 +38,29 @@ iface = gr.Interface(
37
  ],
38
  outputs=[
39
  gr.Image(type="pil", label="Generated Image",),
40
- gr.Image(type="pil", label="Starting Image with Added Noise",)])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  iface.launch()
 
1
  import gradio as gr
2
  from image_generator import ImageGenerator
3
+ import os
4
 
5
  ig = ImageGenerator(g=7.5)
6
  print(ig)
 
38
  ],
39
  outputs=[
40
  gr.Image(type="pil", label="Generated Image",),
41
+ gr.Image(type="pil", label="Starting Image with Added Noise" ) ],
42
+ examples=[
43
+ # simple prompt
44
+ ["a cute dog", None, None, None, 5, None],
45
+
46
+ # negative prompt
47
+ ["a beautiful tree", None, None, "green", 5, None],
48
+
49
+ ["a dancer, high resolution, 4k", None, None, None, 5, None],
50
+
51
+ # with base image
52
+ ["a painting of Paris at night in the style of Monet", None, None, None, 5, os.path.join( os.path.dirname(__file__), "examples/ex4.jpg")],
53
+
54
+
55
+ ["p1", None, 0.3, None, 5, None],
56
+ ["p1", None, 0.3, None, 5, None],
57
+ ["p1", None, 0.3, None, 5, None],
58
+ ["p1", None, 0.3, None, 5, None],
59
+ ["p1", None, 0.3, None, 5, None],
60
+ ["p1", None, 0.3, None, 5, None],
61
+ ["p1", None, 0.3, None, 5, None],
62
+ ]
63
+ )
64
+
65
+ # [(os.path.join(os.path.dirname(__file__), f"examples/ex{x}.jpg")) for x in range(1,11)]
66
  iface.launch()
examples/ex1.jpg ADDED
examples/ex10.jpg ADDED
examples/ex2.jpg ADDED
examples/ex3.jpg ADDED
examples/ex4.jpg ADDED
examples/ex5.jpg ADDED
examples/ex6.jpg ADDED
examples/ex8.jpg ADDED
examples/ex9.jpg ADDED