-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
37 lines (28 loc) · 946 Bytes
/
app.py
File metadata and controls
37 lines (28 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import streamlit as st
from ui_components import (
setup_page, initialize_session_state, render_chat_interface,
render_chat_input, render_bot_response, render_initial_greeting,
render_reset_button
)
from conversation_handler import handle_user_input
def main():
"""Main application function"""
# Set up the page
setup_page()
# Initialize session state
initialize_session_state()
# Render the main chat interface
render_chat_interface()
# Render the initial greeting
render_initial_greeting()
# Handle user input
user_input = render_chat_input()
if user_input:
# Process the user input and get the bot's response
bot_response = handle_user_input(user_input)
# Render the bot's response
render_bot_response(bot_response)
# Render the reset button
render_reset_button()
if __name__ == "__main__":
main()