Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
generator = pipeline('text-generation', model='sr5434/chatbot', tokenizer='EleutherAI/gpt-neo-125M')
|
5 |
|
6 |
def generate(text):
|
7 |
-
result = generator("Human: " + text + "\nAssistant:", max_length=128, num_return_sequences=1)
|
8 |
return result[0]["generated_text"][23:]
|
9 |
|
10 |
examples = [
|
|
|
4 |
generator = pipeline('text-generation', model='sr5434/chatbot', tokenizer='EleutherAI/gpt-neo-125M')
|
5 |
|
6 |
def generate(text):
|
7 |
+
result = generator("Human: " + text + "\nAssistant:", max_length=128, num_return_sequences=1, temperature = 0.8)
|
8 |
return result[0]["generated_text"][23:]
|
9 |
|
10 |
examples = [
|