import gradio as gr from transformers import pipeline # Загрузка модели model = pipeline("conversational", model="LLM360/K2-Chat") def chat(message, history): history.append((message, "")) response = model(history) history[-1] = (message, response[0]['generated_text']) return history, "" # Создание интерфейса iface = gr.ChatInterface(chat) # Запуск интерфейса iface.launch()