rdsarjito commited on
Commit
2a3f5bb
·
1 Parent(s): 4eb348b
Files changed (1) hide show
  1. app.py +22 -10
app.py CHANGED
@@ -111,13 +111,21 @@ def load_css():
111
  margin: 1rem 0;
112
  }
113
 
114
- /* Ingredient list styling */
115
- .ingredient-item {
116
  background: #f8f9fa;
117
- padding: 0.5rem 1rem;
118
- margin: 0.25rem 0;
119
- border-radius: 20px;
120
- border-left: 3px solid #667eea;
 
 
 
 
 
 
 
 
121
  }
122
 
123
  /* Footer */
@@ -345,10 +353,14 @@ def main():
345
  else:
346
  st.success("✅ Bahan berhasil diambil!")
347
 
348
- # Display ingredients in a nice format
349
- st.markdown("**🧾 Daftar Bahan:**")
350
- for ing in ingredients:
351
- st.markdown(f'<div class="ingredient-item">• {ing}</div>', unsafe_allow_html=True)
 
 
 
 
352
 
353
  # Predict allergens
354
  joined_ingredients = " ".join(ingredients)
 
111
  margin: 1rem 0;
112
  }
113
 
114
+ /* Improved ingredient list styling - single div */
115
+ .ingredients-container {
116
  background: #f8f9fa;
117
+ padding: 1rem 1.5rem;
118
+ margin: 1rem 0;
119
+ border-radius: 10px;
120
+ border-left: 4px solid #667eea;
121
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
122
+ line-height: 1.6;
123
+ font-size: 1rem;
124
+ }
125
+
126
+ .ingredients-container strong {
127
+ color: #495057;
128
+ font-weight: 600;
129
  }
130
 
131
  /* Footer */
 
353
  else:
354
  st.success("✅ Bahan berhasil diambil!")
355
 
356
+ # Display ingredients in a single nice container
357
+ ingredients_text = ", ".join(ingredients)
358
+ st.markdown(f'''
359
+ <div class="ingredients-container">
360
+ <strong>🧾 Daftar Bahan:</strong><br>
361
+ {ingredients_text}
362
+ </div>
363
+ ''', unsafe_allow_html=True)
364
 
365
  # Predict allergens
366
  joined_ingredients = " ".join(ingredients)