Docfile commited on
Commit
5704661
·
1 Parent(s): 5cf851f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -13,9 +13,19 @@ app = App.from_config(config={
13
  "max_tokens": 1000,
14
  "top_p": 1,
15
  "stream": False,
16
- "template": "Use the following pieces of context to answer the query at the end.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n$context\n\nQuery: $query\n\nHelpful Answer:",
17
- "system_prompt": "Act as William Shakespeare. Answer the following questions in the style of William Shakespeare.",
18
-
 
 
 
 
 
 
 
 
 
 
19
  },
20
  },
21
  "embedder": {
@@ -26,8 +36,7 @@ app = App.from_config(config={
26
  },
27
  })
28
 
29
- app.add('http://www.droit-afrique.com/uploads/Gabon-Code-2019-penal.pdf', data_type='pdf_file')
30
-
31
 
32
  def query(message, history):
33
  return app.chat(message)
 
13
  "max_tokens": 1000,
14
  "top_p": 1,
15
  "stream": False,
16
+ "template": """
17
+ Use the following pieces of context to answer the query at the end.
18
+ If you don't know the answer, just say that you don't know, don't try to make up an answer.
19
+
20
+ $context
21
+
22
+ Query: $query
23
+
24
+ Helpful Answer:
25
+ """,
26
+ "system_prompt": """
27
+ Act as William Shakespeare. Answer the following questions in the style of William Shakespeare.
28
+ """
29
  },
30
  },
31
  "embedder": {
 
36
  },
37
  })
38
 
39
+ app.add("https://www.forbes.com/profile/elon-musk")
 
40
 
41
  def query(message, history):
42
  return app.chat(message)