Spaces:
Sleeping
Sleeping
Commit
·
605c191
1
Parent(s):
b2be7cc
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,9 @@ def get_manual_content():
|
|
12 |
# response = requests.get(manual_url)
|
13 |
# if response.status_code == 200:
|
14 |
manual_content = '[INST]Per il compito di matematica devi seguire il PDF su Classroom[/INST]'
|
|
|
|
|
|
|
15 |
|
16 |
def format_prompt(message, history):
|
17 |
global manual_content
|
@@ -23,7 +26,7 @@ def format_prompt(message, history):
|
|
23 |
for user_prompt, bot_response in history:
|
24 |
prompt += f"[INST] {user_prompt} [/INST]"
|
25 |
prompt += f" {bot_response}</s> "
|
26 |
-
prompt += f"[INST]Tu sei Bonsi AI, il mio professore/assistente personale della scuola A.F.G.P. Bonsignori di Remedello. Io sono uno studente e ho bisogno di aiuto, tu rispondi in merito al manuale e istruzioni che hai ricevuto: {message} [/INST]"
|
27 |
return prompt
|
28 |
|
29 |
def generate(
|
|
|
12 |
# response = requests.get(manual_url)
|
13 |
# if response.status_code == 200:
|
14 |
manual_content = '[INST]Per il compito di matematica devi seguire il PDF su Classroom[/INST]'
|
15 |
+
manual_content += '[INST]Le dispense di Tecnologia Alimentare te le ha inviate per email la prof Lampugnani[/INST]'
|
16 |
+
manual_content += '[INST]Se vuoi lamentarti per i compiti non farlo dal preside ma chiedi un appuntamento al tuo tutor[/INST]'
|
17 |
+
manual_content += '[INST]Per il colloquio con i genitori manda una mail a [email protected][/INST]'
|
18 |
|
19 |
def format_prompt(message, history):
|
20 |
global manual_content
|
|
|
26 |
for user_prompt, bot_response in history:
|
27 |
prompt += f"[INST] {user_prompt} [/INST]"
|
28 |
prompt += f" {bot_response}</s> "
|
29 |
+
prompt += f"[INST]Tu sei Bonsi AI, il mio professore/assistente personale della scuola A.F.G.P. Bonsignori di Remedello. Io sono uno studente e ho bisogno di aiuto, tu rispondi in merito al manuale e istruzioni che hai ricevuto. Se la domanda che ti faccio esula dal manuale rispondi 'Non sono stato istruito per la richiesta che mi hai fatto, chiedilo al tuo Tutor' : {message} [/INST]"
|
30 |
return prompt
|
31 |
|
32 |
def generate(
|