Spaces:
Running
Running
Delete app.py with huggingface_hub
Browse files
app.py
DELETED
@@ -1,22 +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 |
-
|
12 |
-
image = "https://i.picsum.photos/id/867/600/600.jpg?hmac=qE7QFJwLmlE_WKI7zMH6SgH5iY5fx8ec6ZJQBwKRT44"
|
13 |
-
yield image
|
14 |
-
|
15 |
-
demo = gr.Interface(fake_diffusion,
|
16 |
-
inputs=gr.Slider(1, 10, 3),
|
17 |
-
outputs="image")
|
18 |
-
|
19 |
-
# define queue - required for generators
|
20 |
-
demo.queue()
|
21 |
-
|
22 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|