import gradio as gr from transformers import pipeline # Użyj modelu, który obsługuje generowanie tekstu chatbot = pipeline("text-generation", model="microsoft/DialoGPT-medium") def chat_with_bot(message): response = chatbot(message, max_length=50, num_return_sequences=1) return response[0]['generated_text'] gr.Interface(fn=chat_with_bot, inputs="text", outputs="text").launch()