Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,15 +13,20 @@ pipe = pipeline("text-generation", model=model_name, device="cuda")
|
|
13 |
generate_kwargs = {'max_new_tokens': 20}
|
14 |
|
15 |
|
16 |
-
system_prompt = '''You are given a partial input text for
|
|
|
17 |
- Fight under-specification.
|
18 |
- Complete text to save the user time.
|
19 |
|
20 |
Don't suggest anything if there are no good suggestions.
|
21 |
-
Make sure the suggestions are valid completions of the text!
|
22 |
-
Suggest only up to 5 works ahead. The scheme of your answer should be "answer1;answer2;answer3" (return between 0 to 4 answers).
|
23 |
Answers should be only the completions themselves.
|
|
|
|
|
|
|
24 |
|
|
|
|
|
25 |
Examples:
|
26 |
(1)
|
27 |
User: "Help me write a sentiment analysis pipeline"
|
@@ -34,7 +39,6 @@ Assistant: "" (nothing much to contribute at this point. return nothing)
|
|
34 |
(3)
|
35 |
User: "Help me find a present for my"
|
36 |
Assistant: "girlfriend;mother;father;friend"
|
37 |
-
You will now get a blank message from the user and then after your answer, the user will give you the text to complete.
|
38 |
'''
|
39 |
|
40 |
|
|
|
13 |
generate_kwargs = {'max_new_tokens': 20}
|
14 |
|
15 |
|
16 |
+
system_prompt = '''You are given a partial input text for another AI chat interface.
|
17 |
+
Propose auto-completion to the text. You have several roles:
|
18 |
- Fight under-specification.
|
19 |
- Complete text to save the user time.
|
20 |
|
21 |
Don't suggest anything if there are no good suggestions.
|
22 |
+
Make sure the suggestions are valid completions of the text! Suggest only up to 5 words ahead. The scheme of your answer should be "answer1;answer2;answer3" (return between 0 to 4 answers).
|
|
|
23 |
Answers should be only the completions themselves.
|
24 |
+
You will now get a blank message from the user and then after your answer, the user will give you the text to complete.
|
25 |
+
|
26 |
+
'''
|
27 |
|
28 |
+
|
29 |
+
extra_prompt = '''
|
30 |
Examples:
|
31 |
(1)
|
32 |
User: "Help me write a sentiment analysis pipeline"
|
|
|
39 |
(3)
|
40 |
User: "Help me find a present for my"
|
41 |
Assistant: "girlfriend;mother;father;friend"
|
|
|
42 |
'''
|
43 |
|
44 |
|