Код: Выделить всё
from transformers import pipeline
pipe = pipeline("text-generation", model="openai-community/gpt2", device="cpu")
while True:
AiPrompt = input("User input: ")
print(pipe(AiPrompt, max_length=30, num_return_sequences=5))
Код: Выделить всё
[{'generated_text': 'test, gzip, blobs, zip\n\nDownload the zip file as plain text file'}, {'generated_text': 'test1.pydepalm.werkt.de/#8794824\n\nhttps://github.com/the-drum'}, {'generated_text': 'test:\n\n- Remove error logging from the app.\n\n( defun css-error-logging ( and ( error ) ('}, {'generated_text': "test I've got some other updates from the test team that look really exciting. All that's left is for you to submit your results here.\n"}, {'generated_text': 'tests/mgr.py" ); print_error("magnarials_error: %@", getattr ( dict. __'}]
Спасибо, что прочитали это!
Подробнее здесь: https://stackoverflow.com/questions/793 ... t-readable
Мобильная версия