DerrickMuturi commited on
Commit
6d64d4f
·
verified ·
1 Parent(s): 8c08c39

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +22 -0
main.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from models.models import chat_with_bots
3
+
4
+ st.set_page_config(page_title="Sira", page_icon="🤖")
5
+
6
+ st.title("Sira Chatbot")
7
+
8
+ # Input text
9
+ user_input = st.text_area("Enter your message:")
10
+
11
+ # Select model
12
+ model_name = st.selectbox("Choose a model:", ["google", "facebook", "bart"])
13
+
14
+ # Submit button
15
+ if st.button("Send"):
16
+ if user_input.strip() == "":
17
+ st.warning("Please enter some text.")
18
+ else:
19
+ with st.spinner("Thinking..."):
20
+ reply = chat_with_bots(user_input, model_name=model_name)
21
+ st.success("Bot says:")
22
+ st.write(reply)