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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -44,6 +44,7 @@ class_colors = {
44
  3: "#d62728" # Level 4
45
  }
46
 
 
47
  st.title("Paper Citation Classifier")
48
 
49
  option = st.radio("Select input type:", ("Text", "PDF"))
@@ -54,9 +55,10 @@ if option == "Text":
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)}"
 
44
  3: "#d62728" # Level 4
45
  }
46
 
47
+ st.set_page_config("Paper Citation Calssifier")
48
  st.title("Paper Citation Classifier")
49
 
50
  option = st.radio("Select input type:", ("Text", "PDF"))
 
55
  abstract_input = st.text_area("Enter Abstract:")
56
  full_text_input = st.text_area("Enter Full Text:")
57
  affiliations_input = st.text_area("Enter Affiliations:")
58
+ options=["Nursing", "Physics", "Maths", "Chemical", "Nuclear" ,"Other"]
59
+ categories = pills("Select a category", options)
60
+
61
+ # categories = st.multiselect("Select WoS categories:", ["Nursing", "Physics", "Maths", "Chemical", "Nuclear" ,"Other"])
62
 
63
  # Combine selected categories with [SEP]
64
  combined_text = f"{title_input} [SEP] {abstract_input} [SEP] {full_text_input} [SEP] {affiliations_input} [SEP] {' [SEP] '.join(categories)}"