Update app.py
Browse files
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 :
|
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
|
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("
|
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)
|