Spaces:
Running
Running
Chandranshu Jain
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -60,6 +60,7 @@ def text_splitter(text):
|
|
60 |
|
61 |
#GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
62 |
#COHERE_API_KEY = os.getenv("COHERE_API_KEY")
|
|
|
63 |
|
64 |
def get_conversational_chain():
|
65 |
prompt_template = """
|
@@ -77,7 +78,7 @@ def get_conversational_chain():
|
|
77 |
#model = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.3, google_api_key=GOOGLE_API_KEY)
|
78 |
repo_id='meta-llama/Meta-Llama-3-70B'
|
79 |
llm = HuggingFaceEndpoint(
|
80 |
-
repo_id=repo_id, max_length=512, temperature=0.5, token=
|
81 |
pt = ChatPromptTemplate.from_template(template)
|
82 |
# Retrieve and generate using the relevant snippets of the blog.
|
83 |
retriever = db.as_retriever()
|
|
|
60 |
|
61 |
#GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
62 |
#COHERE_API_KEY = os.getenv("COHERE_API_KEY")
|
63 |
+
HUGGING_FACE_API_KEY = os.getenv("HUGGING_FACE_API_KEY")
|
64 |
|
65 |
def get_conversational_chain():
|
66 |
prompt_template = """
|
|
|
78 |
#model = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.3, google_api_key=GOOGLE_API_KEY)
|
79 |
repo_id='meta-llama/Meta-Llama-3-70B'
|
80 |
llm = HuggingFaceEndpoint(
|
81 |
+
repo_id=repo_id, max_length=512, temperature=0.5, token=HUGGING_FACE_API_KEY)
|
82 |
pt = ChatPromptTemplate.from_template(template)
|
83 |
# Retrieve and generate using the relevant snippets of the blog.
|
84 |
retriever = db.as_retriever()
|