Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -353,32 +353,15 @@ QA_CHAIN_PROMPT_2 = PromptTemplate(input_variables=["context", "question"], temp
|
|
353 |
# Sure! Here's the information:
|
354 |
# """
|
355 |
|
356 |
-
# phi_custom_template = """
|
357 |
-
# <|system|>
|
358 |
-
# 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:
|
359 |
-
# - Nome del documento: (il nome del documento)
|
360 |
-
# - Numero di pagina: (numero di pagina)
|
361 |
-
# - Contenuto effettivo: (contenuto rilevante del documento)
|
362 |
-
# Alla fine, fornisci una sezione separata per la risposta nel seguente formato:
|
363 |
-
# - Risposta: (la risposta alla domanda)
|
364 |
-
# 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:
|
365 |
-
# <|end|>
|
366 |
-
# <|user|>
|
367 |
-
# {context}
|
368 |
-
# Question: {question}<|end|>
|
369 |
-
# <|assistant|>
|
370 |
-
# Sure! The Responses are as follows:
|
371 |
-
# """
|
372 |
-
|
373 |
phi_custom_template = """
|
374 |
<|system|>
|
375 |
-
|
376 |
-
-
|
377 |
-
-
|
378 |
-
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
<|end|>
|
383 |
<|user|>
|
384 |
{context}
|
@@ -387,6 +370,23 @@ Question: {question}<|end|>
|
|
387 |
Sure! The Responses are as follows:
|
388 |
"""
|
389 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
|
391 |
# phi_custom_template = """
|
392 |
# <|system|>
|
|
|
353 |
# Sure! Here's the information:
|
354 |
# """
|
355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
phi_custom_template = """
|
357 |
<|system|>
|
358 |
+
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:
|
359 |
+
- Nome del documento: (il nome del documento)
|
360 |
+
- Numero di pagina: (numero di pagina)
|
361 |
+
- Contenuto effettivo: (contenuto rilevante del documento)
|
362 |
+
Alla fine, fornisci una sezione separata per la risposta nel seguente formato:
|
363 |
+
- Risposta: (la risposta alla domanda)
|
364 |
+
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:
|
365 |
<|end|>
|
366 |
<|user|>
|
367 |
{context}
|
|
|
370 |
Sure! The Responses are as follows:
|
371 |
"""
|
372 |
|
373 |
+
# phi_custom_template = """
|
374 |
+
# <|system|>
|
375 |
+
# You are an expert in the Italian language and a native Italian speaker. Your task is to provide concise, direct and short answers based on the document provided. You should return the information in the following format:
|
376 |
+
# - Document name: (the name of the document)
|
377 |
+
# - Page number: (page number)
|
378 |
+
# - Top 5 Relevant Answer
|
379 |
+
# -Actual Answer
|
380 |
+
|
381 |
+
# If you can't find the answer in the document, simply reply with "This question is beyond my knowledge." Here are the document details to consider:
|
382 |
+
# <|end|>
|
383 |
+
# <|user|>
|
384 |
+
# {context}
|
385 |
+
# Question: {question}<|end|>
|
386 |
+
# <|assistant|>
|
387 |
+
# Sure! The Responses are as follows:
|
388 |
+
# """
|
389 |
+
|
390 |
|
391 |
# phi_custom_template = """
|
392 |
# <|system|>
|