niko-ai / app.py
Sebilay's picture
Update app.py
269a0a9 verified
Raw
History Blame Contribute Delete
571 Bytes
import gradio as gr
def respond(message, chat_history):
# Bu aşamada Niko'nun basit bir test cevabı vermesini sağlıyoruz
bot_message = f"Merhaba! Ben Niko. Mesajını aldım: '{message}'"
chat_history.append({"role": "user", "content": message})
chat_history.append({"role": "assistant", "content": bot_message})
return "", chat_history
with gr.Blocks() as demo:
chatbot = gr.Chatbot(type="messages")
msg = gr.Textbox()
clear = gr.ClearButton([msg, chatbot])
msg.submit(respond, [msg, chatbot], [msg, chatbot])
demo.launch()