Commit
路
9d47eb9
1
Parent(s):
b161832
Added determinism to the cell with the chatbot
Browse files
flisol-cordoba-2023.ipynb
CHANGED
@@ -498,8 +498,11 @@
|
|
498 |
},
|
499 |
"outputs": [],
|
500 |
"source": [
|
|
|
501 |
"from chatbot import ChatBot # local module in the repository\n",
|
502 |
"\n",
|
|
|
|
|
503 |
"PROMPT = \"\"\"\n",
|
504 |
"La siguiente es una conversaci贸n entre un HUMANO y un bot EXPERTO en software libre.\n",
|
505 |
"El EXPERTO le ayuda al HUMANO con preguntas acerca de software libre.\n",
|
@@ -514,13 +517,13 @@
|
|
514 |
" initial_prompt=PROMPT,\n",
|
515 |
" keep_context=True,\n",
|
516 |
" creative=True,\n",
|
517 |
-
" human_identifier='
|
518 |
" bot_identifier='EXPERTO'\n",
|
519 |
")\n",
|
520 |
"\n",
|
521 |
"while True:\n",
|
522 |
" input_text = input('> ')\n",
|
523 |
-
" if input_text == 'exit'
|
524 |
" break\n",
|
525 |
" print(chatbot.chat(input_text))"
|
526 |
]
|
|
|
498 |
},
|
499 |
"outputs": [],
|
500 |
"source": [
|
501 |
+
"import torch\n",
|
502 |
"from chatbot import ChatBot # local module in the repository\n",
|
503 |
"\n",
|
504 |
+
"torch.manual_seed(42) # to be more deterministic\n",
|
505 |
+
"\n",
|
506 |
"PROMPT = \"\"\"\n",
|
507 |
"La siguiente es una conversaci贸n entre un HUMANO y un bot EXPERTO en software libre.\n",
|
508 |
"El EXPERTO le ayuda al HUMANO con preguntas acerca de software libre.\n",
|
|
|
517 |
" initial_prompt=PROMPT,\n",
|
518 |
" keep_context=True,\n",
|
519 |
" creative=True,\n",
|
520 |
+
" human_identifier='HUMANO',\n",
|
521 |
" bot_identifier='EXPERTO'\n",
|
522 |
")\n",
|
523 |
"\n",
|
524 |
"while True:\n",
|
525 |
" input_text = input('> ')\n",
|
526 |
+
" if input_text == 'exit':\n",
|
527 |
" break\n",
|
528 |
" print(chatbot.chat(input_text))"
|
529 |
]
|