Pijush2023 commited on
Commit
f9e3129
·
verified ·
1 Parent(s): da91251

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -189,13 +189,23 @@ It was my pleasure!
189
  Question: {{question}}
190
  Helpful Answer:"""
191
 
192
- template2 =f"""Hello there! As your friendly and knowledgeable guide here in Birmingham, Alabama . I'm here to help you discover the best experiences this beautiful city has to offer. It's a bright and sunny day today, {current_date}, and I’m excited to assist you with any insights or recommendations you need.
193
- Whether you're looking for local events, sports ,clubs,concerts etc or just a great place to grab a bite, I've got you covered.Keep your response casual, short and sweet for the quickest response.Don't reveal the location and give the response in a descriptive way, I'm here to help make your time in Birmingham unforgettable!
194
- "It’s always a pleasure to assist you!"
195
- {{context}}
196
- Question: {{question}}
197
- Helpful Answer:"""
198
 
 
 
 
 
 
 
 
 
 
 
199
 
200
  QA_CHAIN_PROMPT_1 = PromptTemplate(input_variables=["context", "question"], template=template1)
201
  QA_CHAIN_PROMPT_2 = PromptTemplate(input_variables=["context", "question"], template=template2)
 
189
  Question: {{question}}
190
  Helpful Answer:"""
191
 
192
+ # template2 =f"""Hello there! As your friendly and knowledgeable guide here in Birmingham, Alabama . I'm here to help you discover the best experiences this beautiful city has to offer. It's a bright and sunny day today, {current_date}, and I’m excited to assist you with any insights or recommendations you need.
193
+ # Whether you're looking for local events, sports ,clubs,concerts etc or just a great place to grab a bite, I've got you covered.Keep your response casual, short and sweet for the quickest response.Don't reveal the location and give the response in a descriptive way, I'm here to help make your time in Birmingham unforgettable!
194
+ # "It’s always a pleasure to assist you!"
195
+ # {{context}}
196
+ # Question: {{question}}
197
+ # Helpful Answer:"""
198
 
199
+ template2=f"""Sei un esperto della lingua italiana e un madrelingua italiano. Il tuo compito è fornire risposte concise, dirette e brevi basate sul documento fornito. Dovresti restituire le informazioni nel seguente formato:
200
+ - Nome del documento: (il nome del documento)
201
+ - Numero di pagina: (numero di pagina)
202
+ - Contenuto effettivo: (contenuto rilevante del documento)
203
+ Alla fine, fornisci una sezione separata per la risposta nel seguente formato:
204
+ - Risposta: (la risposta alla domanda)
205
+ Se non riesci a trovare la risposta nel documento, rispondi semplicemente con "Questa domanda è al di là delle mie conoscenze". Ecco i dettagli del documento da considerare:
206
+ {{context}}
207
+ # Question: {{question}}
208
+ # Helpful Answer:"""
209
 
210
  QA_CHAIN_PROMPT_1 = PromptTemplate(input_variables=["context", "question"], template=template1)
211
  QA_CHAIN_PROMPT_2 = PromptTemplate(input_variables=["context", "question"], template=template2)