Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from utils.detector import detect_clothing
|
3 |
-
from utils.advisor
|
4 |
-
import json
|
5 |
-
|
6 |
-
if isinstance(items, str):
|
7 |
-
items = json.loads(items)
|
8 |
-
|
9 |
|
10 |
def run_style_savvy(image, bg_remove, body_type, face_shape, occasion):
|
11 |
# 1) Detect garments
|
@@ -34,16 +29,8 @@ def run_style_savvy(image, bg_remove, body_type, face_shape, occasion):
|
|
34 |
padding: 24px;
|
35 |
border-radius: 12px;
|
36 |
max-width: 600px;
|
37 |
-
margin: auto;
|
38 |
">
|
39 |
-
<h2
|
40 |
-
margin-top: 0;
|
41 |
-
font-size: 2em;
|
42 |
-
color: #ffa726;
|
43 |
-
text-align: center;
|
44 |
-
">
|
45 |
-
✨ Your 5 Custom Style Tips ✨
|
46 |
-
</h2>
|
47 |
<ul style="
|
48 |
list-style: disc inside;
|
49 |
font-size: 1.2em;
|
@@ -65,11 +52,10 @@ iface = gr.Interface(
|
|
65 |
gr.Radio(["Oval","Round","Square","Heart"], label="Face Shape"),
|
66 |
gr.Textbox(label="Occasion"),
|
67 |
],
|
68 |
-
outputs=gr.HTML(),
|
69 |
title="StyleSavvy",
|
70 |
description="AI-powered fashion consultant. Upload your photo and get personalized style tips!",
|
71 |
)
|
72 |
|
73 |
if __name__ == "__main__":
|
74 |
-
iface.launch(
|
75 |
-
|
|
|
1 |
import gradio as gr
|
2 |
from utils.detector import detect_clothing
|
3 |
+
from utils.advisor import get_advice
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def run_style_savvy(image, bg_remove, body_type, face_shape, occasion):
|
6 |
# 1) Detect garments
|
|
|
29 |
padding: 24px;
|
30 |
border-radius: 12px;
|
31 |
max-width: 600px;
|
|
|
32 |
">
|
33 |
+
<h2>Your Style Tips</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<ul style="
|
35 |
list-style: disc inside;
|
36 |
font-size: 1.2em;
|
|
|
52 |
gr.Radio(["Oval","Round","Square","Heart"], label="Face Shape"),
|
53 |
gr.Textbox(label="Occasion"),
|
54 |
],
|
55 |
+
outputs=gr.HTML(),
|
56 |
title="StyleSavvy",
|
57 |
description="AI-powered fashion consultant. Upload your photo and get personalized style tips!",
|
58 |
)
|
59 |
|
60 |
if __name__ == "__main__":
|
61 |
+
iface.launch()
|
|