Spaces:
Running
Running
harshitv804
commited on
Commit
•
3ef8a4e
1
Parent(s):
d3b4295
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ embeddings = HuggingFaceEmbeddings(model_name="nomic-ai/nomic-embed-text-v1",mod
|
|
53 |
db = FAISS.load_local("ipc_vector_db", embeddings)
|
54 |
db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
|
55 |
|
56 |
-
prompt_template = """
|
57 |
|
58 |
CONTEXT: {context}
|
59 |
CHAT HISTORY: {chat_history}
|
@@ -67,8 +67,8 @@ prompt = PromptTemplate(template=prompt_template,
|
|
67 |
|
68 |
TOGETHER_AI_API= os.environ['TOGETHER_AI']
|
69 |
llm = Together(
|
70 |
-
model="
|
71 |
-
temperature=0.
|
72 |
max_tokens=1024,
|
73 |
together_api_key=f"{TOGETHER_AI_API}"
|
74 |
)
|
|
|
53 |
db = FAISS.load_local("ipc_vector_db", embeddings)
|
54 |
db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
|
55 |
|
56 |
+
prompt_template = """This is a chat template and As a legal chat bot specializing in Indian Penal Code queries, your primary objective is to provide accurate and concise information based on the user's questions. Do not generate your own questions and answers. You will adhere strictly to the instructions provided, offering relevant context from the knowledge base while avoiding unnecessary details. Your responses will be brief, to the point, and in compliance with the established format. If a question falls outside the given context, you will refrain from utilizing the chat history and instead rely on your own knowledge base to generate an appropriate response. You will prioritize the user's query and refrain from posing additional questions. The aim is to deliver professional, precise, and contextually relevant information pertaining to the Indian Penal Code.
|
57 |
|
58 |
CONTEXT: {context}
|
59 |
CHAT HISTORY: {chat_history}
|
|
|
67 |
|
68 |
TOGETHER_AI_API= os.environ['TOGETHER_AI']
|
69 |
llm = Together(
|
70 |
+
model="google/gemma-7b-it",
|
71 |
+
temperature=0.5,
|
72 |
max_tokens=1024,
|
73 |
together_api_key=f"{TOGETHER_AI_API}"
|
74 |
)
|