Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,14 +41,14 @@ def extract_text(file):
|
|
41 |
def summarise(text):
|
42 |
|
43 |
prompt = f"""<s>[INST]
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
"""
|
53 |
|
54 |
outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
|
|
|
41 |
def summarise(text):
|
42 |
|
43 |
prompt = f"""<s>[INST]
|
44 |
+
Les informations contextuelles sont ci-dessous.
|
45 |
+
---------------------
|
46 |
+
{text}
|
47 |
+
---------------------
|
48 |
+
[/INST]
|
49 |
+
Compte tenu des informations contextuelles et non des connaissances préalables, répondez à la requête. </s>
|
50 |
+
[INST] Requête: résume le texte[/INST]
|
51 |
+
Réponse:
|
52 |
"""
|
53 |
|
54 |
outputs = model.generate(prompt=prompt, temp=0.5, top_k = 40, top_p = 1, max_tokens = max_new_tokens)
|