Spaces:
Sleeping
Sleeping
Commit
·
b8389c7
1
Parent(s):
88620c4
Delete run.py
Browse files
run.py
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import numpy as np
|
3 |
-
import time
|
4 |
-
|
5 |
-
# define core fn, which returns a generator {steps} times before returning the image
|
6 |
-
def fake_diffusion(steps):
|
7 |
-
for _ in range(steps):
|
8 |
-
time.sleep(1)
|
9 |
-
image = np.random.random((600, 600, 3))
|
10 |
-
yield image
|
11 |
-
image = "https://gradio-builds.s3.amazonaws.com/diffusion_image/cute_dog.jpg"
|
12 |
-
yield image
|
13 |
-
|
14 |
-
|
15 |
-
demo = gr.Interface(fake_diffusion, inputs=gr.Slider(1, 10, 3), outputs="image")
|
16 |
-
|
17 |
-
# define queue - required for generators
|
18 |
-
demo.queue()
|
19 |
-
|
20 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|