Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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": "
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
},
|
20 |
},
|
21 |
"embedder": {
|
@@ -26,8 +36,7 @@ app = App.from_config(config={
|
|
26 |
},
|
27 |
})
|
28 |
|
29 |
-
app.add(
|
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)
|