# Trying to train simple custom chatbot w/ gpt-neo

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-train-simple-custom-chatbot-w-gpt-neo%2F20198%3E%5C
**Category:** Beginners\
**Created:** [July 9, 2022, 8:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-train-simple-custom-chatbot-w-gpt-neo%2F20198 "2022-07-09T20:45:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SwampMidget](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@SwampMidget](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSwampMidget)%5C
**Post date:** [July 9, 2022, 8:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-train-simple-custom-chatbot-w-gpt-neo%2F20198%2F1 "2022-07-09T20:45:10Z")

</div>

Hi,

I’m a newb and I’m trying to alter responses of a basic chatbot based on gpt-neo-1.3B and a training file. My train.txt seems to have no effect on this script’s output. Would you please give me an example of a way to alter the output w/ a training file?  
Thanks very much.

from transformers import pipeline  
from happytransformer import HappyGeneration  
from happytransformer import GENSettings  
from happytransformer import GENTrainArgs  
import sys

if len(sys.argv) \> 1:  
prompt = sys.argv[1]  
print(“== HAPPY GENERATOR ==\n”)  
happy\_gen = HappyGeneration(“GPT-NEO”, “EleutherAI/gpt-neo-1.3B”)

```
args = GENTrainArgs(num_train_epochs=1)
happy_gen.train("train.txt", args=args)

args = GENSettings(no_repeat_ngram_size=2, do_sample=True, early_stopping=False, top_k=50, temperature=0.7)

print("RESULT: \n")
result = happy_gen.generate_text(prompt)
#print(result)
print(result.text)

```

else:  
print(“No input…”)

# ============================================== train.txt below

This is a discussion between a [human] and a [robot].  
The [robot] is very nice and empathetic.

[human]: Hello nice to meet you.  
[robot]: Nice to meet you too.

### 

[human]: How is it going today?  
[robot]: Not so bad, thank you! How about you?

### 

[human]: I am ok, but I am a bit sad…  
[robot]: Oh? Why that?

### 

[human]: I broke up with my girlfriend…  
[robot]:

---

<div class="post-metadata">

**Author:** ![MikeyBeez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mikeybeez/32/21067_2.png) [@MikeyBeez](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMikeyBeez)%5C
**Post date:** [August 28, 2022, 3:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-train-simple-custom-chatbot-w-gpt-neo%2F20198%2F2 "2022-08-28T15:55:36Z")

</div>

Why not try DialoGPT instead? It’s trained to be a chatbot.
