Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def save_uploaded_file(uploaded_file):
|
|
18 |
|
19 |
# Function to show dashboard content
|
20 |
def show_dashboard():
|
21 |
-
st.title("
|
22 |
st.write("Welcome to our Fashion Recommender System! Upload an image and get personalized product recommendations based on your image and queries.")
|
23 |
|
24 |
chatbot = Chatbot()
|
@@ -47,7 +47,7 @@ def show_dashboard():
|
|
47 |
for i, idx in enumerate(recommended_products[:5]):
|
48 |
with col1 if i == 0 else col2 if i == 1 else col3 if i == 2 else col4 if i == 3 else col5:
|
49 |
product_image = chatbot.images[idx['corpus_id']]
|
50 |
-
st.image(product_image, caption=f"Product {i+1}",
|
51 |
else:
|
52 |
st.error("Error in uploading the file.")
|
53 |
|
@@ -70,7 +70,7 @@ def show_dashboard():
|
|
70 |
st.write(f"**Usage:** {product_info['usage']}")
|
71 |
st.write(f"**Season:** {product_info['season']}")
|
72 |
st.write(f"**Gender:** {product_info['gender']}")
|
73 |
-
st.image(chatbot.images[pid],
|
74 |
|
75 |
# Main Streamlit app
|
76 |
def main():
|
@@ -88,3 +88,4 @@ def main():
|
|
88 |
# Run the main app
|
89 |
if __name__ == "__main__":
|
90 |
main()
|
|
|
|
18 |
|
19 |
# Function to show dashboard content
|
20 |
def show_dashboard():
|
21 |
+
st.title("Fashion Recommender System")
|
22 |
st.write("Welcome to our Fashion Recommender System! Upload an image and get personalized product recommendations based on your image and queries.")
|
23 |
|
24 |
chatbot = Chatbot()
|
|
|
47 |
for i, idx in enumerate(recommended_products[:5]):
|
48 |
with col1 if i == 0 else col2 if i == 1 else col3 if i == 2 else col4 if i == 3 else col5:
|
49 |
product_image = chatbot.images[idx['corpus_id']]
|
50 |
+
st.image(product_image, caption=f"Product {i+1}", width=150)
|
51 |
else:
|
52 |
st.error("Error in uploading the file.")
|
53 |
|
|
|
70 |
st.write(f"**Usage:** {product_info['usage']}")
|
71 |
st.write(f"**Season:** {product_info['season']}")
|
72 |
st.write(f"**Gender:** {product_info['gender']}")
|
73 |
+
st.image(chatbot.images[pid], width=150)
|
74 |
|
75 |
# Main Streamlit app
|
76 |
def main():
|
|
|
88 |
# Run the main app
|
89 |
if __name__ == "__main__":
|
90 |
main()
|
91 |
+
|