Aliya05 commited on
Commit
071b65a
·
verified ·
1 Parent(s): 9d1fc29

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,7 +3,7 @@ import os
3
  from PIL import Image
4
  import google.generativeai as genai
5
 
6
- genai.configure(api_key="API KEy")
7
 
8
  # Load the Gemini model
9
  model = genai.GenerativeModel('gemini-1.5-flash')
@@ -43,7 +43,7 @@ if uploaded_file is not None:
43
 
44
  # AI Prompt
45
  input_prompt = (
46
- "You are an expert microbiologist who has worked for more than 30 years. "
47
  "We will upload an image of food, and you will have to answer any questions based on the uploaded image in 20 words."
48
  )
49
 
@@ -58,4 +58,5 @@ if submit:
58
  st.subheader("The Response is:")
59
  st.write(response)
60
  else:
61
- st.warning("Please upload an image before submitting.")
 
 
3
  from PIL import Image
4
  import google.generativeai as genai
5
 
6
+ genai.configure(api_key="AIzaSyCUIDWVCkslMJi4azNcPDJveuyqZyhnJMg")
7
 
8
  # Load the Gemini model
9
  model = genai.GenerativeModel('gemini-1.5-flash')
 
43
 
44
  # AI Prompt
45
  input_prompt = (
46
+ "You are an expert chef who has worked for more than 30 years. "
47
  "We will upload an image of food, and you will have to answer any questions based on the uploaded image in 20 words."
48
  )
49
 
 
58
  st.subheader("The Response is:")
59
  st.write(response)
60
  else:
61
+ st.warning("Please upload an image before submitting.")
62
+