Spaces:
Running
Running
SagayaAbinesh
commited on
Commit
•
e3baf59
1
Parent(s):
1ce3a8f
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from langchain.chains import ConversationalRetrievalChain
|
|
7 |
import time
|
8 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
9 |
import streamlit as st
|
|
|
10 |
|
11 |
st.set_page_config(page_title="GymGPT")
|
12 |
col1, col2, col3 = st.columns([1,2,1])
|
@@ -79,10 +80,9 @@ ASSISTANT:
|
|
79 |
prompt = PromptTemplate(template=prompt_template,
|
80 |
input_variables=['question', 'context', 'chat_history'])
|
81 |
|
82 |
-
|
83 |
-
os.environ['gemini_api']
|
84 |
|
85 |
-
llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
|
86 |
|
87 |
# Create a conversational chain using only your database retriever
|
88 |
qa = ConversationalRetrievalChain.from_llm(
|
|
|
7 |
import time
|
8 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
9 |
import streamlit as st
|
10 |
+
import os
|
11 |
|
12 |
st.set_page_config(page_title="GymGPT")
|
13 |
col1, col2, col3 = st.columns([1,2,1])
|
|
|
80 |
prompt = PromptTemplate(template=prompt_template,
|
81 |
input_variables=['question', 'context', 'chat_history'])
|
82 |
|
83 |
+
# GOOGLE_API_KEY = os.environ['gemini_api']
|
|
|
84 |
|
85 |
+
llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash", google_api_key=os.environ['gemini_api'])
|
86 |
|
87 |
# Create a conversational chain using only your database retriever
|
88 |
qa = ConversationalRetrievalChain.from_llm(
|