SayedShaun commited on
Commit
2924e2d
·
verified ·
1 Parent(s): 6857106

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import streamlit as st
2
  import os
3
- os.getenv("GOOGLE_API_KEY")
4
  from langchain_google_genai import ChatGoogleGenerativeAI
5
-
6
 
7
  def llm_response(question):
8
- llm = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.5)
9
  response = llm.invoke(question)
10
  return response.content
11
 
 
1
  import streamlit as st
2
  import os
 
3
  from langchain_google_genai import ChatGoogleGenerativeAI
4
+ google_api_key = st.sidebar.text_input("Provide Your Google Gemini API Key")
5
 
6
  def llm_response(question):
7
+ llm = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.5, google_api_key=google_api_key)
8
  response = llm.invoke(question)
9
  return response.content
10