Spaces:
Sleeping
Sleeping
adding examples
Browse files- app.py +26 -1
- examples/ex1.jpg +0 -0
- examples/ex10.jpg +0 -0
- examples/ex2.jpg +0 -0
- examples/ex3.jpg +0 -0
- examples/ex4.jpg +0 -0
- examples/ex5.jpg +0 -0
- examples/ex6.jpg +0 -0
- examples/ex8.jpg +0 -0
- examples/ex9.jpg +0 -0
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