QuaidKhalid commited on
Commit
b329469
·
verified ·
1 Parent(s): d5b1c8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -9,9 +9,9 @@ from sentence_transformers import SentenceTransformer
9
  import torch
10
  import os
11
  import tempfile
12
- from langchain.llm import LLaMAForConversation
13
 
14
- llm = LLaMAForConversation(temperature=0.7)
15
 
16
 
17
  # Define the embedding class
@@ -38,6 +38,8 @@ embedding_model = SentenceTransformerEmbedding('all-MiniLM-L6-v2')
38
  groq_api_key = "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"
39
  langchain_api_key = "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"
40
 
 
 
41
  def load_document(document_path):
42
  try:
43
  with tempfile.TemporaryDirectory() as tmp_dir:
@@ -96,4 +98,4 @@ if document_path is not None and query:
96
 
97
 
98
 
99
- st.write("Note: Replace `llm` with an appropriate language model.")
 
9
  import torch
10
  import os
11
  import tempfile
12
+ from langchain_groq import ChatGroq
13
 
14
+ llm = ChatGroq(model="llama3-8b-8192")
15
 
16
 
17
  # Define the embedding class
 
38
  groq_api_key = "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"
39
  langchain_api_key = "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"
40
 
41
+ llm = ChatGroq(model="llama3-8b-8192")
42
+
43
  def load_document(document_path):
44
  try:
45
  with tempfile.TemporaryDirectory() as tmp_dir:
 
98
 
99
 
100
 
101
+ # st.write("Note: Replace `llm` with an appropriate language model.")