jorge-henao
commited on
Commit
路
68a1b59
1
Parent(s):
138cc0e
Update README.md
Browse files
README.md
CHANGED
@@ -40,8 +40,9 @@ Testing is a work in progress, we decide to share both model variations with com
|
|
40 |
- [Medical chat Dialogs](https://github.com/project-baize/baize)
|
41 |
|
42 |
- ### About pre-processing
|
43 |
-
|
44 |
```python
|
|
|
45 |
def format_instruction_without_context(example):
|
46 |
example["topic"] = example['input']
|
47 |
input = "La conversaci贸n entre un humano y un asistente de IA."
|
@@ -54,6 +55,22 @@ def format_instruction_without_context(example):
|
|
54 |
example["topic"] += f" ({topics})"
|
55 |
example["input"] = input
|
56 |
return example`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
```
|
58 |
|
59 |
|
|
|
40 |
- [Medical chat Dialogs](https://github.com/project-baize/baize)
|
41 |
|
42 |
- ### About pre-processing
|
43 |
+
Ask2Democracy-cfqa-salud-pension dataset was pre-processed in a conversational style like this:
|
44 |
```python
|
45 |
+
|
46 |
def format_instruction_without_context(example):
|
47 |
example["topic"] = example['input']
|
48 |
input = "La conversaci贸n entre un humano y un asistente de IA."
|
|
|
55 |
example["topic"] += f" ({topics})"
|
56 |
example["input"] = input
|
57 |
return example`
|
58 |
+
|
59 |
+
def format_instruction_with_context(example):
|
60 |
+
example["topic"] = example['input']
|
61 |
+
context = example['instruction'].replace("Given the context please answer the question. Context:","")
|
62 |
+
context = ' '.join(context.strip().split())[1:-3]
|
63 |
+
input = "La conversaci贸n entre un humano y un asistente de IA."
|
64 |
+
input += "\n[|Human|] "+example['input']+f"\nPara responder la pregunta, usa el siguiente contexto:\n{context}"
|
65 |
+
input += "\n[|AI|] "+example["output"]
|
66 |
+
if len(example["topics"])>0:
|
67 |
+
topics = ", ".join(example["topics"])
|
68 |
+
input += "\n[|Human|] "+"驴En cu谩les t贸picos clasificar铆as su respuesta?"
|
69 |
+
input += "\n[|AI|] "+f"Aqu铆 una lista de t贸picos: {topics}."
|
70 |
+
example["topic"] += f" ({topics})"
|
71 |
+
example["input"] = input
|
72 |
+
return example
|
73 |
+
|
74 |
```
|
75 |
|
76 |
|