Yousefsalem commited on
Commit
2dbe17d
·
verified ·
1 Parent(s): 244de83

Update src/models.py

Browse files
Files changed (1) hide show
  1. src/models.py +7 -4
src/models.py CHANGED
@@ -25,17 +25,20 @@ classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnl
25
 
26
  # Load LLM models using CTransformers
27
  general_llm = CTransformers(
28
- model="./llama-2-7b.Q4_K_M.gguf",
29
  model_type="llama",
30
- config={'max_new_tokens': 512, 'temperature': 0.7}
 
31
  )
32
 
33
  medical_llm = CTransformers(
34
- model="./BioMistral-7B.Q4_K_M.gguf",
35
  model_type="llama",
36
- config={'max_new_tokens': 512, 'temperature': 0.7}
 
37
  )
38
 
 
39
  # Prompt template for generating responses
40
  template = """
41
  You are a versatile AI assistant that can provide both medical advice and help users with general concerns, emotions, and questions outside the medical field. Your responses should be empathetic, supportive, and insightful, regardless of the topic.
 
25
 
26
  # Load LLM models using CTransformers
27
  general_llm = CTransformers(
28
+ model="/kaggle/working/llama-2-7b.Q8_0.gguf",
29
  model_type="llama",
30
+ config={'max_new_tokens': 512, 'temperature': 0.7},
31
+ stream=True # Enable streaming here
32
  )
33
 
34
  medical_llm = CTransformers(
35
+ model="/kaggle/working/BioMistral-7B.Q8_0.gguf",
36
  model_type="llama",
37
+ config={'max_new_tokens': 512, 'temperature': 0.7},
38
+ stream=True # Enable streaming here
39
  )
40
 
41
+
42
  # Prompt template for generating responses
43
  template = """
44
  You are a versatile AI assistant that can provide both medical advice and help users with general concerns, emotions, and questions outside the medical field. Your responses should be empathetic, supportive, and insightful, regardless of the topic.