mohamedashraf11 commited on
Commit
43ebfc1
·
verified ·
1 Parent(s): 3de2665

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -13,7 +13,8 @@ class HadithChatApp:
13
  self.embeddings = HuggingFaceEmbeddings(
14
  model_name="intfloat/multilingual-e5-large"
15
  )
16
-
 
17
  # Define paths
18
  self.zip_file_path = 'Hadith_Chroma_db_compressed.zip'
19
  self.extract_dir = 'Hadith_Chroma_db'
@@ -29,8 +30,8 @@ class HadithChatApp:
29
  )
30
 
31
  # Initialize the language model (AceGPT-v2-32B-Chat)
32
- self.tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/AceGPT-7B")
33
- self.model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/AceGPT-7B")
34
 
35
  def extract_zip(self, zip_path, extract_to):
36
  """Extract a ZIP file to a specified directory."""
 
13
  self.embeddings = HuggingFaceEmbeddings(
14
  model_name="intfloat/multilingual-e5-large"
15
  )
16
+ self.model_name = "malhajar/Mistral-7B-v0.1-arabic"
17
+
18
  # Define paths
19
  self.zip_file_path = 'Hadith_Chroma_db_compressed.zip'
20
  self.extract_dir = 'Hadith_Chroma_db'
 
30
  )
31
 
32
  # Initialize the language model (AceGPT-v2-32B-Chat)
33
+ self.tokenizer = AutoTokenizer.from_pretrained( self.model_name)
34
+ self.model = AutoModelForCausalLM.from_pretrained( self.model_name)
35
 
36
  def extract_zip(self, zip_path, extract_to):
37
  """Extract a ZIP file to a specified directory."""