Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def show_dashboard():
|
|
64 |
for result in recommended_products:
|
65 |
pid = result['corpus_id']
|
66 |
product_info = chatbot.product_data[pid]
|
67 |
-
|
68 |
<div style='border: 1px solid #ddd; padding: 10px; margin: 10px 0; border-radius: 5px;'>
|
69 |
<p><strong>Product Name:</strong> {product_name}</p>
|
70 |
<p><strong>Category:</strong> {category}</p>
|
@@ -72,7 +72,7 @@ def show_dashboard():
|
|
72 |
<p><strong>Usage:</strong> {usage}</p>
|
73 |
<p><strong>Season:</strong> {season}</p>
|
74 |
<p><strong>Gender:</strong> {gender}</p>
|
75 |
-
<img src="{
|
76 |
</div>
|
77 |
""".format(
|
78 |
product_name=product_info['productDisplayName'],
|
@@ -81,7 +81,7 @@ def show_dashboard():
|
|
81 |
usage=product_info['usage'],
|
82 |
season=product_info['season'],
|
83 |
gender=product_info['gender'],
|
84 |
-
|
85 |
), unsafe_allow_html=True)
|
86 |
|
87 |
# Main Streamlit app
|
|
|
64 |
for result in recommended_products:
|
65 |
pid = result['corpus_id']
|
66 |
product_info = chatbot.product_data[pid]
|
67 |
+
st.markdown("""
|
68 |
<div style='border: 1px solid #ddd; padding: 10px; margin: 10px 0; border-radius: 5px;'>
|
69 |
<p><strong>Product Name:</strong> {product_name}</p>
|
70 |
<p><strong>Category:</strong> {category}</p>
|
|
|
72 |
<p><strong>Usage:</strong> {usage}</p>
|
73 |
<p><strong>Season:</strong> {season}</p>
|
74 |
<p><strong>Gender:</strong> {gender}</p>
|
75 |
+
<img src="{image_url}" width="150" />
|
76 |
</div>
|
77 |
""".format(
|
78 |
product_name=product_info['productDisplayName'],
|
|
|
81 |
usage=product_info['usage'],
|
82 |
season=product_info['season'],
|
83 |
gender=product_info['gender'],
|
84 |
+
image_url="uploads/" + uploaded_file.name # assuming images are saved in uploads folder
|
85 |
), unsafe_allow_html=True)
|
86 |
|
87 |
# Main Streamlit app
|