-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
24 lines (20 loc) · 843 Bytes
/
app.py
File metadata and controls
24 lines (20 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit as st
from joblib import load
def run():
bug_clf = load('bug_clf.joblib') # load trained model
st.sidebar.info('You can check Firefox bug type online!')
add_selectbox = st.sidebar.selectbox("How would you like to predict?", ("Online", "+"))
st.title("Predicting Firefox bugs type")
st.header('This application is predicting the type of firefox bug.')
if add_selectbox == "Online":
bug = [st.text_area('Enter bug text')]
output = ""
if st.button("Predict") and len(bug)>0:
output = bug_clf.predict(bug)
output = str(output[0]) # since its a list, get the 1st item
st.success(f"The bug type is {output}")
st.balloons()
else:
st.success('More features are comming soon!')
if __name__ == "__main__":
run()