JamalAG commited on
Commit
1c52f86
1 Parent(s): a78c002

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -4,14 +4,15 @@ from langchain.llms import HuggingFaceHub
4
  #Function to return the response
5
  def generate_answer(query):
6
  llm = HuggingFaceHub(
7
- repo_id = "huggingfaceh4/zephyr-7b-alpha",
8
  model_kwargs={"temperature": 0.5, "max_length": 64,"max_new_tokens":512}
9
  )
10
  prompt = f"""
11
- You are a doctor assistant trained to provide medical advice and support. Please respond with empathy and consider the patient's well-being.
12
- </s>
13
-
14
- {query}</s>
 
15
 
16
  """
17
  result = llm.predict(prompt)
 
4
  #Function to return the response
5
  def generate_answer(query):
6
  llm = HuggingFaceHub(
7
+ repo_id = "TheBloke/goliath-120b-GGUF",
8
  model_kwargs={"temperature": 0.5, "max_length": 64,"max_new_tokens":512}
9
  )
10
  prompt = f"""
11
+ A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input.
12
+ USER:
13
+ Hi
14
+ ASSISTANT:
15
+ Hello! How can I help you today? If you have any questions or need assistance, feel free to ask.
16
 
17
  """
18
  result = llm.predict(prompt)