diff --git a/app.py b/app.py index 330f031..ec89574 100644 --- a/app.py +++ b/app.py @@ -44,13 +44,10 @@ def get_gemini_response(input,image): ## If ask button is clicked -if submit: - +if submit: response=get_gemini_response(input,image) st.subheader("The Response is") st.write(response) - - # from dotenv import load_dotenv # load_dotenv() @@ -59,22 +56,22 @@ def get_gemini_response(input,image): # import google.generativeai as genai # genai.configure(api_key=os.getenv("GOOGLE_API_KEY")) -# model = genai.GenerativeModel("gemini-pro") + model = genai.GenerativeModel("gemini-pro") -# def get_response(input_text): -# response = model.generate_content(input_text) -# return response.text + def get_response(input_text): + response = model.generate_content(input_text) + return response.text -# st.set_page_config(page_title="Q & A", page_icon=":gem:") + st.set_page_config(page_title="Q & A", page_icon=":gem:") -# st.header("Here you GO...!") -# input = st.text_input("Enter your question here", key="input") + st.header("Here you GO...!") + input = st.text_input("Enter your question here", key="input") -# input = st.text_input("Enter your question here", key="input") -# submit = st.button("Submit") + input = st.text_input("Enter your question here", key="input") + submit = st.button("Submit") -# if submit: -# response = get_response(input) -# st.subheader("The Response is :") -# st.write(response) + if submit: + response = get_response(input) + st.subheader("The Response is :") + st.write(response)