File size: 352 Bytes
3a66a27
43dad90
491741a
cf012cb
491741a
3a66a27
 
43dad90
 
 
491741a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import streamlit as st
import os 
from transformers import pipeline, Conversation

convo = pipeline("conversational")



def chatbot():
    st.title("ChatBot")
    if message := st.chat_input("Enter your message"):
        umsg = Conversation(message)
        answer = convo(umsg)
        with st.chat_message("assistant"):
            st.write(answer)