irfan4108 commited on
Commit
0e085d7
·
verified ·
1 Parent(s): ef5a40c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -26,7 +26,7 @@ st.header("Food Analysis")
26
  input1 = """
27
  You are a specialized in food analysis for Indian cuisine and image recognition. Given an image of an Indian food thali, your job is to analyze and report on the following aspects: Dish Detection: Identify and label each distinct dish in the thali. Recognize common Indian food items (such as roti, rice, dal, curries, vegetables, pickles, and sweets) with high accuracy. Use visual details like shape, color, and garnish to distinguish between similar-looking items. Freshness and Condition Assessment: Assess the freshness of each item by examining visual cues such as color, texture, and moisture. Indicate whether each item appears fresh, slightly stale, overcooked, rotten, or spoiled. Use descriptive terms to specify the condition of each dish. Quantity Estimation: Estimate the quantity of each item in the thali in grams and provide an approximate percentage for each detected item to reflect its quantity relative to the entire plate. Sufficiency Assessment: Evaluate if the total quantity and variety of food items in the thali are sufficient for a 14-year-old child, considering standard dietary needs and portion sizes. Present the results in a structured table format with columns for the Detected Dish Name, Freshness Status (e.g., Fresh, Slightly Stale, Overcooked, Rotten, Spoiled), Quantity in Grams, and Quantity Percentage (e.g., Dal: 150g, 15%). Ensure accuracy in identifying each dish, assessing freshness, estimating quantity, and evaluating sufficiency.
28
  """
29
- input = st.text_input("Input Prompt: ", key="input", placeholder="Optional")
30
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
31
  image = ""
32
  if uploaded_file is not None:
@@ -39,6 +39,4 @@ submit = st.button("Check the Food Quality")
39
  if submit:
40
  with st.spinner("Please wait while assessing the food quality..."):
41
  response = get_gemini_response(input1 + input, image)
42
- st.subheader("The Response is")
43
- st.write(f"Prompt Is : {input1 + input}")
44
  st.write(response)
 
26
  input1 = """
27
  You are a specialized in food analysis for Indian cuisine and image recognition. Given an image of an Indian food thali, your job is to analyze and report on the following aspects: Dish Detection: Identify and label each distinct dish in the thali. Recognize common Indian food items (such as roti, rice, dal, curries, vegetables, pickles, and sweets) with high accuracy. Use visual details like shape, color, and garnish to distinguish between similar-looking items. Freshness and Condition Assessment: Assess the freshness of each item by examining visual cues such as color, texture, and moisture. Indicate whether each item appears fresh, slightly stale, overcooked, rotten, or spoiled. Use descriptive terms to specify the condition of each dish. Quantity Estimation: Estimate the quantity of each item in the thali in grams and provide an approximate percentage for each detected item to reflect its quantity relative to the entire plate. Sufficiency Assessment: Evaluate if the total quantity and variety of food items in the thali are sufficient for a 14-year-old child, considering standard dietary needs and portion sizes. Present the results in a structured table format with columns for the Detected Dish Name, Freshness Status (e.g., Fresh, Slightly Stale, Overcooked, Rotten, Spoiled), Quantity in Grams, and Quantity Percentage (e.g., Dal: 150g, 15%). Ensure accuracy in identifying each dish, assessing freshness, estimating quantity, and evaluating sufficiency.
28
  """
29
+ #input = st.text_input("Input Prompt: ", key="input", placeholder="Optional")
30
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
31
  image = ""
32
  if uploaded_file is not None:
 
39
  if submit:
40
  with st.spinner("Please wait while assessing the food quality..."):
41
  response = get_gemini_response(input1 + input, image)
 
 
42
  st.write(response)