Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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")
|