aliabd HF staff commited on
Commit
cda78d6
1 Parent(s): 14fecd7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+ import time
4
+
5
+ def fake_diffusion(steps):
6
+ for _ in range(steps):
7
+ time.sleep(1)
8
+ image = np.random.random((600, 600, 3))
9
+ yield image
10
+
11
+ image = "https://i.picsum.photos/id/867/600/600.jpg?hmac=qE7QFJwLmlE_WKI7zMH6SgH5iY5fx8ec6ZJQBwKRT44"
12
+ yield image
13
+
14
+
15
+ demo = gr.Interface(fake_diffusion,
16
+ inputs=gr.Slider(1, 10, 3),
17
+ outputs="image")
18
+ demo.queue()
19
+ demo.launch()