Spaces:
Sleeping
Sleeping
Commit
·
949c3c0
1
Parent(s):
d4c2a34
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,13 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
| 5 |
|
| 6 |
def format_prompt(message, history):
|
| 7 |
prompt = "<s>"
|
|
|
|
|
|
|
|
|
|
| 8 |
for user_prompt, bot_response in history:
|
| 9 |
prompt += f"[INST] {user_prompt} [/INST]"
|
| 10 |
prompt += f" {bot_response}</s> "
|
| 11 |
-
prompt += f"[INST] {message} [/INST]"
|
| 12 |
return prompt
|
| 13 |
|
| 14 |
def generate(
|
|
|
|
| 5 |
|
| 6 |
def format_prompt(message, history):
|
| 7 |
prompt = "<s>"
|
| 8 |
+
with open('Manuale.txt', 'r') as file:
|
| 9 |
+
manual_content = file.read()
|
| 10 |
+
prompt += f"Leggi questo manuale dopo ti farò delle domande: {manual_content}"
|
| 11 |
for user_prompt, bot_response in history:
|
| 12 |
prompt += f"[INST] {user_prompt} [/INST]"
|
| 13 |
prompt += f" {bot_response}</s> "
|
| 14 |
+
prompt += f"[INST] {message} P.S. Ripondi come se fossi ZucchGTP, l'assitente AI di Zucchetti [/INST]"
|
| 15 |
return prompt
|
| 16 |
|
| 17 |
def generate(
|