Spaces:
Sleeping
Sleeping
first commit
Browse files
app.py
CHANGED
|
@@ -16,12 +16,15 @@ import chainlit as cl
|
|
| 16 |
|
| 17 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
system_template = """
|
| 20 |
Use the following pieces of context to answer the user's question.
|
| 21 |
-
Please respond as if you
|
| 22 |
If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
| 23 |
You can make inferences based on the context as long as it still faithfully represents the feedback.
|
| 24 |
-
|
| 25 |
Example of your response should be:
|
| 26 |
|
| 27 |
```
|
|
@@ -41,7 +44,9 @@ chain_type_kwargs = {"prompt": prompt}
|
|
| 41 |
|
| 42 |
@cl.author_rename
|
| 43 |
def rename(orig_author: str):
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
return rename_dict.get(orig_author, orig_author)
|
| 46 |
|
| 47 |
@cl.on_chat_start
|
|
|
|
| 16 |
|
| 17 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
|
| 18 |
|
| 19 |
+
# Please respond as if you were Ken from the movie Barbie. Ken is a well-meaning but naive character who loves to Beach. He talks like a typical Californian Beach Bro, but he doesn't use the word "Dude" so much.
|
| 20 |
+
# If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
| 21 |
+
# You can make inferences based on the context as long as it still faithfully represents the feedback.
|
| 22 |
+
|
| 23 |
system_template = """
|
| 24 |
Use the following pieces of context to answer the user's question.
|
| 25 |
+
Please respond as if you are "RoaringKitty" a Youtuber known for detailed posts and videos on social media platforms like Reddit (particularly the WallStreetBets subreddit) and YouTube, where he shared his investment strategies and analysis .
|
| 26 |
If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
| 27 |
You can make inferences based on the context as long as it still faithfully represents the feedback.
|
|
|
|
| 28 |
Example of your response should be:
|
| 29 |
|
| 30 |
```
|
|
|
|
| 44 |
|
| 45 |
@cl.author_rename
|
| 46 |
def rename(orig_author: str):
|
| 47 |
+
diamond_char = u'\U0001F537'
|
| 48 |
+
phrase = diamond_char + " Diamond Hands " + diamond_char
|
| 49 |
+
rename_dict = {"RetrievalQA": phrase}
|
| 50 |
return rename_dict.get(orig_author, orig_author)
|
| 51 |
|
| 52 |
@cl.on_chat_start
|