360big / app.py
scriptolip's picture
update 3 app.py
fd5c58c verified
raw
history blame
444 Bytes
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()