Spaces:
Sleeping
Sleeping
Update app.py
Browse files27 unmodified lines2829303132333435364 unmodified lines41424344454647484950515253545556575859606127 unmodified lines# Return predicted style string, recommendation string, and the imagereturn f"**Predicted Style Class:** {style_name}", rec, image# Gradio Interfacetitle = "👗 StyleGuru: AI-Enhanced Fashion Designer"description = """**StyleGuru** helps fashion enthusiasts and designers analyze garment styles and get accessory & fabric recommendations. Upload a photo or sketch, and let AI do the magic!4 unmodified lines"""with gr.Blocks() as demo:gr.Markdown(f"# {title}")gr.Markdown(description)with gr.Row():image_input = gr.Image(label="Upload a garment image or sketch", type="pil", source="upload")with gr.Column():style_output = gr.Markdown(label="Style Analysis")rec_output = gr.Markdown(label="💍 Accessory & Fabric Recommendation")analyze_button = gr.Button("Analyze Style")analyze_button.click(fn=analyze_style,inputs=image_input,outputs=[style_output, rec_output, image_input],)demo.launch()27 unmodified lines282930313233344 unmodified lines39404142434445464748495051525354555657585960616263646566676827 unmodified lines# Return predicted style string, recommendation string, and the imagereturn f"**Predicted Style Class:** {style_name}", rec, imagetitle = "👗 StyleGuru: AI-Enhanced Fashion Designer"description = """**StyleGuru** helps fashion enthusiasts and designers analyze garment styles and get accessory & fabric recommendations. Upload a photo or sketch, and let AI do the magic!4 unmodified lines"""with gr.Blocks() as demo:# CSS to hide webcam and paste buttonsgr.HTML("""<style>button[data-testid="paste-button"],button[data-testid="webcam-button"] {display: none !important;}</style>""")gr.Markdown(f"# {title}")gr.Markdown(description)with gr.Row():image_input = gr.Image(label="Upload a garment image or sketch", type="pil")with gr.Column():style_output = gr.Markdown(label="Style Analysis")rec_output = gr.Markdown(label="💍 Accessory & Fabric Recommendation")analyze_button = gr.Button("Analyze Style")analyze_button.click(fn=analyze_style,inputs=image_input,outputs=[style_output, rec_output, image_input],)demo.launch()
app.py+12-5