Rahatara commited on
Commit
4040e28
1 Parent(s): ff899f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ class MyApp:
14
  self.documents = []
15
  self.embeddings = None
16
  self.index = None
17
- self.load_pdf("DB.pdf")
18
  self.build_vector_db()
19
 
20
  def load_pdf(self, file_path: str) -> None:
@@ -64,7 +64,7 @@ def preprocess_response(response: str) -> str:
64
  def shorten_response(response: str) -> str:
65
  """Uses the Zephyr model to shorten and refine the response."""
66
  messages = [{"role": "system", "content": "Shorten and refine this response in bullet list."}, {"role": "user", "content": response}]
67
- result = client.chat_completion(messages, max_tokens=256, temperature=0.5, top_p=0.9)
68
  return result.choices[0].message['content'].strip()
69
 
70
  def respond(message: str, history: List[Tuple[str, str]]):
 
14
  self.documents = []
15
  self.embeddings = None
16
  self.index = None
17
+ self.load_pdf("THEDIA1.pdf")
18
  self.build_vector_db()
19
 
20
  def load_pdf(self, file_path: str) -> None:
 
64
  def shorten_response(response: str) -> str:
65
  """Uses the Zephyr model to shorten and refine the response."""
66
  messages = [{"role": "system", "content": "Shorten and refine this response in bullet list."}, {"role": "user", "content": response}]
67
+ result = client.chat_completion(messages, max_tokens=512, temperature=0.98, top_p=0.9)
68
  return result.choices[0].message['content'].strip()
69
 
70
  def respond(message: str, history: List[Tuple[str, str]]):