Mhassanen commited on
Commit
0bb86ad
·
verified ·
1 Parent(s): a05144a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -50,15 +50,16 @@ option = st.radio("Select input type:", ("Text", "PDF"))
50
 
51
  if option == "Text":
52
  # Input text boxes for abstract, full text, and affiliations
 
53
  abstract_input = st.text_area("Enter Abstract:")
54
  full_text_input = st.text_area("Enter Full Text:")
55
  affiliations_input = st.text_area("Enter Affiliations:")
56
 
57
  # Select categories using pills
58
- categories = st.multiselect("Select categories:", ["Category 1", "Category 2", "Category 3", "Category 4"])
59
 
60
  # Combine selected categories with [SEP]
61
- combined_text = f"{abstract_input} [SEP] {full_text_input} [SEP] {affiliations_input} [SEP] {' [SEP] '.join(categories)}"
62
 
63
  if st.button("Predict"):
64
  with st.spinner("Predicting..."):
 
50
 
51
  if option == "Text":
52
  # Input text boxes for abstract, full text, and affiliations
53
+ title_input = st.text_area("Enter Title:")
54
  abstract_input = st.text_area("Enter Abstract:")
55
  full_text_input = st.text_area("Enter Full Text:")
56
  affiliations_input = st.text_area("Enter Affiliations:")
57
 
58
  # Select categories using pills
59
+ categories = st.multiselect("Select WoS categories:", ["Nursing", "Physics", "Maths", "Chemical", "Nuclear" ,"Other"])
60
 
61
  # Combine selected categories with [SEP]
62
+ combined_text = f"{title_input} [SEP] {abstract_input} [SEP] {full_text_input} [SEP] {affiliations_input} [SEP] {' [SEP] '.join(categories)}"
63
 
64
  if st.button("Predict"):
65
  with st.spinner("Predicting..."):