Spaces:
Runtime error
Runtime error
add theme
Browse files
app.py
CHANGED
|
@@ -278,9 +278,9 @@ def open_link(link):
|
|
| 278 |
print(f"link is {link}")
|
| 279 |
return link
|
| 280 |
##default human
|
|
|
|
| 281 |
|
| 282 |
-
|
| 283 |
-
image_blocks = gr.Blocks(theme=gr.themes.Soft()).queue()
|
| 284 |
with image_blocks as demo:
|
| 285 |
gr.HTML("<center><h1>Shop with Window ποΈπππ</h1></center>")
|
| 286 |
gr.HTML("<center><p>Upload an image of yourself or select from examples then describe your garment in the text box and wait for the magic. β¨</p></center>")
|
|
@@ -300,12 +300,11 @@ with image_blocks as demo:
|
|
| 300 |
)
|
| 301 |
|
| 302 |
with gr.Column():
|
| 303 |
-
prompt = gr.Textbox(placeholder="Description of garment ex
|
| 304 |
fetch_button = gr.Button("Fetch Products")
|
| 305 |
|
| 306 |
-
image_gallery = gr.Gallery(label="
|
| 307 |
, columns=[3], rows=[1], object_fit="contain", height="auto", allow_preview= False)
|
| 308 |
-
price_display = gr.Textbox(label="Prices of Images", interactive=False, visible=False)
|
| 309 |
url_display = gr.Textbox(label="URLs of Images", interactive=False, visible=False)
|
| 310 |
with gr.Column():
|
| 311 |
garm_img = gr.Image(label="Garment", sources='upload', type="pil")
|
|
|
|
| 278 |
print(f"link is {link}")
|
| 279 |
return link
|
| 280 |
##default human
|
| 281 |
+
my_theme = gr.Theme.from_hub("gradio/seafoam")
|
| 282 |
|
| 283 |
+
image_blocks = gr.Blocks(theme=my_theme).queue()
|
|
|
|
| 284 |
with image_blocks as demo:
|
| 285 |
gr.HTML("<center><h1>Shop with Window ποΈπππ</h1></center>")
|
| 286 |
gr.HTML("<center><p>Upload an image of yourself or select from examples then describe your garment in the text box and wait for the magic. β¨</p></center>")
|
|
|
|
| 300 |
)
|
| 301 |
|
| 302 |
with gr.Column():
|
| 303 |
+
prompt = gr.Textbox(placeholder="Description of garment ex: Yellow Top", show_label=False, elem_id="prompt")
|
| 304 |
fetch_button = gr.Button("Fetch Products")
|
| 305 |
|
| 306 |
+
image_gallery = gr.Gallery(label="Available Products", show_label=True, elem_id="gallery"
|
| 307 |
, columns=[3], rows=[1], object_fit="contain", height="auto", allow_preview= False)
|
|
|
|
| 308 |
url_display = gr.Textbox(label="URLs of Images", interactive=False, visible=False)
|
| 309 |
with gr.Column():
|
| 310 |
garm_img = gr.Image(label="Garment", sources='upload', type="pil")
|