File size: 1,301 Bytes
c60d397
 
 
 
 
 
 
 
 
 
d1e09bd
c60d397
 
 
 
 
 
 
 
 
4a079d1
 
 
c60d397
 
 
 
 
20dc4d3
6ec1b60
 
c60d397
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import gradio as gr
from Lex import *

'''
lex = Lexica(query="man woman fire snow").images()
'''

inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
#gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]

outputs = gr.Gallery(lable='Output gallery').style(grid=3,height=768)
#gr.Dataframe(label='prompts for corresponding images')]

def lexica(prompt):
    lex = Lexica(query=prompt).images()
    return lex

interface = gr.Interface(lexica,
    inputs=inputs,
    outputs=outputs,
    examples =[
                'Chinese Traditional Culture',
                'trending digital art',
                'beautiful home',
                'interior design of living room'
                ]
                  ,
     title = " πŸ” πŸ–ŒοΈπŸŽ¨ Lexica Art - A Search Engine for Generative Art Prompts and Works ",
     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.",
    cache_examples = False,
                        )

interface.launch("0.0.0.0")