ESMATUGBA commited on
Commit
24f7b17
·
verified ·
1 Parent(s): 4413138

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +7 -6
src/streamlit_app.py CHANGED
@@ -20,7 +20,7 @@ st.sidebar.title("🏥 Health & Calorie Guide / Sağlık ve Kalori Rehberi")
20
 
21
  st.sidebar.subheader("⚖️ Daily Calorie Needs / Günlük Kalori İhtiyacı")
22
  st.sidebar.write("""
23
- - **Women / Kadınlar:** 2,000kcal
24
  - **Men / Erkekler:** 2,500 kcal
25
  """)
26
 
@@ -51,7 +51,7 @@ with col_note_tr:
51
  1. **Kalp Sağlığı:** Yüksek trans yağ ve sodyum içeriği damar sertliği ve tansiyona neden olur.
52
  2. **Kan Şekeri Dengesi:** Aşırı şeker ve işlenmiş karbonhidratlar ani insülin direnci ve diyabet riskini tetikler.
53
  3. **Besin Değeri Eksikliği:** Bu ürünler "boş kalori" kaynağıdır; vitamin, mineral ve lif açısından son derece fakirdir.
54
- 4. **Obezite Riski:** Pizza Hut- Burger King -KFC -Mcdonalds -Starbucks şirketlerinden yüksek kalori yoğunluğu olacağından kısa sürede kontrolsüz kilo alımına yol açar.
55
 
56
  * **🥤 Su İçin:** Asitli içecekler yerine su tüketmek sağlığınız için kritiktir.
57
  * **🥩 Protein Vurgusu:** Kas sağlığı ve metabolizma için **protein ağırlıklı** beslenmeye özen gösterilmelidir.
@@ -64,7 +64,7 @@ with col_note_en:
64
  1. **Heart Health:** High trans fat and sodium content cause arteriosclerosis and high blood pressure.
65
  2. **Blood Sugar Balance:** Excessive sugar and processed carbs trigger insulin resistance and diabetes risk.
66
  3. **Lack of Nutrients:** These products are sources of "empty calories"; they are extremely poor in vitamins and minerals.
67
- 4. **Obesity Risk:** High calorie density in foods from companies like Pizza Hut, Burger King, KFC, McDonald’s, and Starbucks can lead to rapid, uncontrolled weight gain.
68
 
69
  * **🥤 Drink Water:** Choosing water instead of sugary drinks is critical for your health.
70
  * **🥩 Focus on Protein:** Prioritize **protein-rich** nutrition for muscle health and metabolism.
@@ -73,7 +73,6 @@ with col_note_en:
73
  st.write("---")
74
 
75
  # --- ÖDEV METNİ (BÜYÜTÜLMÜŞ VE KOYULTULMUŞ) ---
76
- # HTML kullanarak yazıyı daha okunur hale getiriyoruz
77
  st.markdown("""
78
  <div style="text-align: center;">
79
  <h3 style="color: #1E1E1E; font-weight: bold;">
@@ -106,10 +105,12 @@ with c2:
106
  sns.histplot(df["Energy (kCal)"], bins=20, kde=True, ax=ax2, color="darkorange")
107
  st.pyplot(fig2)
108
 
109
- # --- VERİ TABLOSU ---
110
  st.subheader("📋 High-Calorie Products List / Yüksek Kalorili Ürün Listesi")
111
  top_20 = df.sort_values(by="Energy (kCal)", ascending=False).head(20)
112
- st.dataframe(top_20[["Company", "Product", "Energy (kCal)", "Sugar (g)", "Protein (g)", "Total Fat (g)"]], use_container_width=True)
 
 
113
 
114
  # --- DOWNLOAD ---
115
  st.write("---")
 
20
 
21
  st.sidebar.subheader("⚖️ Daily Calorie Needs / Günlük Kalori İhtiyacı")
22
  st.sidebar.write("""
23
+ - **Women / Kadınlar:** 2,000 kcal
24
  - **Men / Erkekler:** 2,500 kcal
25
  """)
26
 
 
51
  1. **Kalp Sağlığı:** Yüksek trans yağ ve sodyum içeriği damar sertliği ve tansiyona neden olur.
52
  2. **Kan Şekeri Dengesi:** Aşırı şeker ve işlenmiş karbonhidratlar ani insülin direnci ve diyabet riskini tetikler.
53
  3. **Besin Değeri Eksikliği:** Bu ürünler "boş kalori" kaynağıdır; vitamin, mineral ve lif açısından son derece fakirdir.
54
+ 4. **Obezite Riski:** **Pizza Hut, Burger King, KFC, McDonald’s ve Starbucks** şirketlerinden yüksek kalori yoğunluğu olacağından kısa sürede kontrolsüz kilo alımına yol açar.
55
 
56
  * **🥤 Su İçin:** Asitli içecekler yerine su tüketmek sağlığınız için kritiktir.
57
  * **🥩 Protein Vurgusu:** Kas sağlığı ve metabolizma için **protein ağırlıklı** beslenmeye özen gösterilmelidir.
 
64
  1. **Heart Health:** High trans fat and sodium content cause arteriosclerosis and high blood pressure.
65
  2. **Blood Sugar Balance:** Excessive sugar and processed carbs trigger insulin resistance and diabetes risk.
66
  3. **Lack of Nutrients:** These products are sources of "empty calories"; they are extremely poor in vitamins and minerals.
67
+ 4. **Obesity Risk:** High calorie density in foods from companies like **Pizza Hut, Burger King, KFC, McDonald’s, and Starbucks** can lead to rapid, uncontrolled weight gain.
68
 
69
  * **🥤 Drink Water:** Choosing water instead of sugary drinks is critical for your health.
70
  * **🥩 Focus on Protein:** Prioritize **protein-rich** nutrition for muscle health and metabolism.
 
73
  st.write("---")
74
 
75
  # --- ÖDEV METNİ (BÜYÜTÜLMÜŞ VE KOYULTULMUŞ) ---
 
76
  st.markdown("""
77
  <div style="text-align: center;">
78
  <h3 style="color: #1E1E1E; font-weight: bold;">
 
105
  sns.histplot(df["Energy (kCal)"], bins=20, kde=True, ax=ax2, color="darkorange")
106
  st.pyplot(fig2)
107
 
108
+ # --- VERİ TABLOSU (TITREME COZUMU UYGULANDI) ---
109
  st.subheader("📋 High-Calorie Products List / Yüksek Kalorili Ürün Listesi")
110
  top_20 = df.sort_values(by="Energy (kCal)", ascending=False).head(20)
111
+
112
+ # use_container_width yerine width='stretch' kullanılarak titreme sorunu giderildi
113
+ st.dataframe(top_20[["Company", "Product", "Energy (kCal)", "Sugar (g)", "Protein (g)", "Total Fat (g)"]], width='stretch')
114
 
115
  # --- DOWNLOAD ---
116
  st.write("---")