forked from camilasp/customer_support_bot_router
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
30 lines (23 loc) · 889 Bytes
/
app.py
File metadata and controls
30 lines (23 loc) · 889 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
import streamlit as st
import pandas as pd
import numpy as np
from prediction import transform_predict
with open("style.css") as f:
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
st.title('Customer Support Bot Router')
columns = st.columns(2)
with columns[0]:
first_name = st.text_input("First Name:", max_chars=90)
with columns[1]:
last_name = st.text_input("Last Name:", max_chars=90)
txt = st.text_area("Type your question:")
if st.button("Send"):
if txt:
text = txt
result = transform_predict(text)
st.write(f'Dear {first_name} {last_name}. We will forward your request to the {result[0]} department.')
else:
st.write("Please fill the box with your request!")
st.image('assets/customer-support-flat.png')
url = "https://github.com/camilasp/customer_support_bot_router"
st.write("Know our [work](%s)" % url)