Hugo Lyons commited on
Commit
dfc6054
1 Parent(s): 85e5c6e
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ import time
3
+
4
+ import gradio as gr
5
+
6
+
7
+ def fake_gan():
8
+ time.sleep(1)
9
+ images = [
10
+ "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80",
11
+ "https://images.unsplash.com/photo-1554151228-14d9def656e4?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=386&q=80",
12
+ "https://images.unsplash.com/photo-1542909168-82c3e7fdca5c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8aHVtYW4lMjBmYWNlfGVufDB8fDB8fA%3D%3D&w=1000&q=80",
13
+ ]
14
+ return images
15
+
16
+
17
+ demo = gr.Interface(
18
+ fn=fake_gan,
19
+ inputs=None,
20
+ outputs=gr.Gallery(label="Generated Images").style(grid=[2]),
21
+ title="FD-GAN",
22
+ description="This is a fake demo of a GAN. In reality, the images are randomly chosen from Unsplash.",
23
+ )
24
+
25
+ demo.launch()