svjack commited on
Commit
c60d397
Β·
1 Parent(s): 90825c8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from Lex import *
3
+
4
+ '''
5
+ lex = Lexica(query="man woman fire snow").images()
6
+ '''
7
+
8
+ inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
9
+ #gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]
10
+
11
+ outputs = gr.Gallery(lable='Output gallery').style(grid=3,height=200,container=True)
12
+ #gr.Dataframe(label='prompts for corresponding images')]
13
+
14
+ def lexica(prompt):
15
+ lex = Lexica(query=prompt).images()
16
+ return lex
17
+
18
+ interface = gr.Interface(lexica,
19
+ inputs=inputs,
20
+ outputs=outputs,
21
+ examples =['trending digital art',
22
+ 'beautiful home',
23
+ 'interior design of living room'
24
+ ]
25
+ ,
26
+ title = " πŸ” πŸ–ŒοΈπŸŽ¨ Lexica Art - A Search Engine for Generative Art Prompts and Works ",
27
+ description = "πŸ”πŸ–ŒοΈ 🎨 lexica huggingface space , Find inspiration and discover new generative artworks with Lexica Art \n\n a search engine built by by @[Sharif shameem](https://twitter.com/sharifshameem) . Explore a vast collection of prompts and corresponding artworks, and let your imagination take over as you create your own masterpieces."
28
+ )
29
+
30
+ interface.launch("0.0.0.0")