Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def input_image_setup(uploaded_file):
|
|
37 |
|
38 |
st.set_page_config(page_title="Gemini Image Demo")
|
39 |
|
40 |
-
st.header("Generative AI :
|
41 |
input=st.text_input("Input Prompt: ",key="input")
|
42 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
43 |
image=""
|
@@ -46,7 +46,7 @@ if uploaded_file is not None:
|
|
46 |
st.image(image, caption="Uploaded Image.", use_column_width=True)
|
47 |
|
48 |
|
49 |
-
submit=st.button("
|
50 |
|
51 |
input_prompt = """
|
52 |
You are an expert in understanding business cards.
|
@@ -60,5 +60,5 @@ input_prompt = """
|
|
60 |
if submit:
|
61 |
image_data = input_image_setup(uploaded_file)
|
62 |
response=get_gemini_response(input_prompt,image_data,input)
|
63 |
-
st.subheader("
|
64 |
st.write(response)
|
|
|
37 |
|
38 |
st.set_page_config(page_title="Gemini Image Demo")
|
39 |
|
40 |
+
st.header("Generative AI : Invoice Reader")
|
41 |
input=st.text_input("Input Prompt: ",key="input")
|
42 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
43 |
image=""
|
|
|
46 |
st.image(image, caption="Uploaded Image.", use_column_width=True)
|
47 |
|
48 |
|
49 |
+
submit=st.button("Tell me about the image")
|
50 |
|
51 |
input_prompt = """
|
52 |
You are an expert in understanding business cards.
|
|
|
60 |
if submit:
|
61 |
image_data = input_image_setup(uploaded_file)
|
62 |
response=get_gemini_response(input_prompt,image_data,input)
|
63 |
+
st.subheader("The Response is")
|
64 |
st.write(response)
|