File size: 339 Bytes
cacd7f6
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import streamlit as st

class ChatInterface:
    def __init__(self):
        self.chat_input_key = "chat_input"

    def get_user_input(self):
        return st.chat_input("Type your message here...", key=self.chat_input_key)

    def display_message(self, role, content):
        with st.chat_message(role):
            st.write(content)