jayparmar0109 commited on
Commit
b0c0f2a
·
verified ·
1 Parent(s): 7f0c07b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -38,7 +38,7 @@ def input_image_setup(uploaded_file):
38
 
39
  st.set_page_config(page_title="Gemini Image Demo")
40
 
41
- st.header("Generative AI : Invoice Reader")
42
  input=st.text_input("Input Prompt: ",key="input")
43
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
44
  image=""
@@ -51,9 +51,9 @@ submit=st.button("Tell me about the image")
51
 
52
  input_prompt = """
53
  You are an expert in understanding business cards.
54
- You will receive input images as business card & you will have to answer questions based on the input image.
55
  You have to extract information from business card images and give correct tag to the output text
56
- like person name, company name, occupation, address, phone/telephone number, email, website, etc.
57
  """
58
 
59
  ## If ask button is clicked
@@ -61,5 +61,5 @@ input_prompt = """
61
  if submit:
62
  image_data = input_image_setup(uploaded_file)
63
  response=get_gemini_response(input_prompt,image_data,input)
64
- st.subheader("The Response is")
65
  st.write(response)
 
38
 
39
  st.set_page_config(page_title="Gemini Image Demo")
40
 
41
+ st.header("Generative AI : Business card Reader")
42
  input=st.text_input("Input Prompt: ",key="input")
43
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
44
  image=""
 
51
 
52
  input_prompt = """
53
  You are an expert in understanding business cards.
54
+ You will receive input images of business card & you will have to answer questions based on the input image.
55
  You have to extract information from business card images and give correct tag to the output text
56
+ like person name, company name, occupation, address, phone/telephone number, email, website, etc. Give out put in json format.
57
  """
58
 
59
  ## If ask button is clicked
 
61
  if submit:
62
  image_data = input_image_setup(uploaded_file)
63
  response=get_gemini_response(input_prompt,image_data,input)
64
+ st.subheader("Output :")
65
  st.write(response)