File size: 4,093 Bytes
48fd95e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import streamlit as st
def app():
	#st.set_page_config(page_title='Calorie Calculator for Korean Food')
	st.title("Calorie Calculator for Korean Food")
	st.write("Enter the name of a food item with the serving amount")
	st.markdown("""
<style>
body {
    color: #000;
    background-color: #CF9FFF;
}
</style>
    """, unsafe_allow_html=True)
	import pandas as pd
	df1 = pd.read_csv('Korean food_calorie__.csv',index_col=0)
	dish = st.selectbox("Select the name of dish ",('Kimbap/๊น€๋ฐฅ','Tteokbokki/๋–ก๋ณถ์ด','Kalguksu/์นผ๊ตญ์ˆ˜','Gopchang-jeongol/๊ณฑ์ฐฝ์ „๊ณจ','Chadolbagi/์ฐจ๋Œ๋ฐ”๊ธฐ','Samgyeopsal/์‚ผ๊ฒน์‚ด','Panjeon/ํŒ์ „','Korean Tofu Kimchi Soup/๋‘๋ถ€ ๊น€์น˜์ฐŒ๊ฐœ','Samgetang/์‚ผ๊ณ„ํƒ•','Pork Ribs/๋ผ์ง€ ๊ฐˆ๋น„','Dumplings/๋งŒ๋‘','Carrots In Korean/๋‹น๊ทผ ํ•œ๊ตญ์–ด','Galbi Jjim/๊ฐˆ๋น„์ฐœ','Bibimbap/๋น„๋น”๋ฐฅ','Yeongyang dolsatbap/์˜์–‘ ๋Œ์†ฅ๋ฐฅ','Carrot Salad/๋‹น๊ทผ ์ƒ๋Ÿฌ๋“œ','Korean Food Lunch/ํ•œ์‹ ์ ์‹ฌ','Ddukbaegi Bulgogi/๋š๋ฐฐ๊ธฐ ๋ถˆ๊ณ ๊ธฐ','Jjamppong/์งฌ๋ฝ•','Octopus bibimbap/๋ฌธ์–ด๋น„๋น”๋ฐฅ','Sujebi/์ˆ˜์ œ๋น„','Dumpling Soup/๋งŒ๋‘ ์ˆ˜ํ”„','Yukgaejang/์œก๊ฐœ์žฅ','Beef bulgogi/์†Œ๋ถˆ๊ณ ๊ธฐ','Vegetable Dumbling/์•ผ์ฑ„ ๋ค๋ธ”๋ง','Bulgogi/๋ถˆ๊ณ ๊ธฐ','Korean cold noodles/ํ•œ๊ตญ ๋ƒ‰๋ฉด','Korean Eel soup/์žฅ์–ดํƒ•','Sundubu/์ˆœ๋‘๋ถ€','Korean Homemade food/ํ•œ๊ตญ ์ง‘์—์„œ ๋งŒ๋“  ์Œ์‹','Bibimnangmein/๋น„๋น”๋‚ญ๋งˆ์ธ','Bi Bim Bap/๋น„๋น”๋ฐฅ','Noodle/๊ตญ์ˆ˜','Galbi-tang /๊ฐˆ๋น„ํƒ•','Bibimbap With Beef/์†Œ๊ณ ๊ธฐ ๋น„๋น”๋ฐฅ','Ginseng Chicken Soup/์ธ์‚ผ ์น˜ํ‚จ ์ˆ˜ํ”„','Dwen Jang Jigae/๋“œ์›ฌ ์žฅ์ง€๊ฐœ','Korean Beef Noodles/ํ•œ์šฐ๊ตญ์ˆ˜','Tofu Kimchi/๋‘๋ถ€','Makchang/๋ง‰์ฐฝ','Steamed Monkfish/์•„๊ท€์ฐœ','Sundaegukbab/์ˆœ๋Œ€๊ตญ๋ฐฅ','Doganitang/๋„๊ฐ€๋‹ˆํƒ•','Bulgogi /๋ถˆ๊ณ ๊ธฐ','Eomukguk/์–ด๋ฌต๊ตญ','Soon Dae/์ˆœ๋Œ€','Sirloin Steak/๋“ฑ์‹ฌ ์Šคํ…Œ์ดํฌ','Oi Kimchi/์˜ค์ด ๊น€์น˜','Tempah/ํ…œํŒŒ','Seaweed Salad/๋ฏธ์—ญ ์ƒ๋Ÿฌ๋“œ','Hobbang/ํ˜ธ๋ฑ…','Broiled Eels/๊ตฌ์šด ์žฅ์–ด','Korean bbq/ํ•œ๊ตญ์‹ ๋ฐ”๋ฒ ํ','Nori/Seaweed/๊น€','Upjinsal roast/์›์ง„์‚ด ๊ตฌ์ด','Samgyupsal Pork Belly/์‚ผ๊ฒน์‚ด ์‚ผ๊ฒน์‚ด','JwiPo/์ฃผ์ดํฌ','Kim Bugak/๋ฏธ์—ญ ์Šค๋‚ต','Sogogi Youkgajang/์†Œ๊ณ ๊ธฐ์œก๊ฐ€์žฅ','Korean bbq marinade/ํ•œ๊ตญ์‹ ๋ฐ”๋ฒ ํ ๋งˆ๋ฆฌ๋„ค์ด๋“œ','Self heating food/์ž์ฒด ๊ฐ€์—ด ์‹ํ’ˆ','Korean Chicken Stir-Fry/ํ•œ๊ตญ ์น˜ํ‚จ ๋ณถ์Œ','Beef Intestine /์‡ ๊ณ ๊ธฐ ์ฐฝ์ž','Pork Bone Soup โ€“ Gamjatang/๊ฐ์žํƒ•','Ojingeo Deopbap/์˜ค์ง•์–ด๋ฎ๋ฐฅ','Ddukbokkie/๋–ก๋ณถ์ด','Dwenjanggigae/์›ฌ์žฅ๊ธฐ๊ฐœ','Ja Jang Myeon/์ž์žฅ๋ฉด','Doenjang Soup With Spinach/์‹œ๊ธˆ์น˜ ๋œ์žฅ๊ตญ','Korean Biscuit/ํ•œ๊ตญ ๊ณผ์ž','Seasoned Tofu /์–‘๋… ๋‘๋ถ€','Korean Short Rib Soup/ํ•œ์‹ ๊ฐˆ๋น„ํƒ•','Roasted Pork Belly /๊ตฌ์šด ์‚ผ๊ฒน์‚ด','Tteokguk/์ถ•ํ•˜ ์ˆ˜ํ”„','Korean beef/ํ•œ์šฐ','Dak kkochi/๋–ก๋ณถ์ด','Rice Cake Soup/๋–ก๊ตญ','Stuffed Cucumber Kimchi/์˜ค์ด ๋ฐ•์ œ ๊น€์น˜','Yeot/์ฏง์ฏง','Gim/๊น€','Triangular kimbap/์‚ผ๊ฐ๊น€๋ฐฅ','Baked Chub Mackerel/๊ตฌ์šด ๊ณ ๋“ฑ์–ด','Bebimbap/๋น„๋น”๋ฐฅ','Bread Ttoah/๋นต๋˜์•„','Korean seaweed/ํ•œ๊ตญ ํ•ด์ดˆ','Saeukkang/์ƒˆ๊ฐ•','Bread Ttoah/๋นต๋˜์•„','Korean seaweed/ํ•œ๊ตญ ํ•ด์ดˆ','Udon boeuf/์šฐ๋™๋ถ€ํ”„','Korean Kimchi/ํ•œ๊ตญ ๊น€์น˜','Korean Bbq/ํ•œ๊ตญ์‹ ๋ฐ”๋ฒ ํ','Dashida/๋‹ค์‹œ๋‹ค','Galbitang/๊ฐˆ๋น„ํƒ•','Kimchi/๊น€์น˜','Bibimbap vegetables/๋น„๋น”๋ฐฅ ์•ผ์ฑ„','Korean Chicken/ํ•œ๊ตญ ์น˜ํ‚จ','Sikhye/์‹ํ˜œ','Saeng Maekju/์ƒ๋งฅ์ฃผ','Patbingsu/ํŒฅ๋น™์ˆ˜','Tangpyeongchae/ํƒ•ํ‰์ฑ„'))
	serving_ = st.number_input("Enter number of Servings")
	try: 
		index_ = df1.index[df1['Name of the food']==dish].item()	
	except ValueError:
		index_ = 1
	else:
		recipe_ = df1['Recipe'][index_]
		cal_ = df1['Calories'][index_]
		carb_ = df1['Carb(g)'][index_]
		fat_ = df1['Fat (g)'][index_]
		proteins_ = df1['Proteins(g)'][index_]
		image_ = df1['Image'][index_]
		kd = df1['Korean Description'][index_]
		st.write("**Calorie count** ",round(cal_*serving_,2))
		st.write("**Carbohydrate value** ",round(carb_*serving_,2))
		st.write("**Fat value** ",round(fat_*serving_,2))
		st.write("**Protein intake** ",round(proteins_*serving_,2))
		st.write("**Recipe**",recipe_)
		st.write("**Description in Korean**",kd)	
		st.image(image_,width=500)