Spaces:
Runtime error
Runtime error
from transformers import pipeline, set_send | |
generator = pipeline('text-generation', model='bigscience/bloom') | |
generator("Conversacion entre Sara y Emiliano", max_length=30, num_return_sequences=5) | |
context = '''Hola | |
Hola | |
Como estas | |
Bien y tu | |
Igual bien | |
Que haces | |
Nada y tu''' | |
while True: | |
output = generator(context, max_length=len(context) + 30, num_return_sequences=1)[0]['generated_text'].split(context)[1].split(\nSara:)[0] | |
print(output) | |
context += output + '\nSara:' | |
inputText = input('Yo:') | |
context += inputText + '\nSara:' |