Harsh502s commited on
Commit
7853d1d
β€’
1 Parent(s): c5d623b
.streamlit/config.toml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [theme]
2
+ base='light'
3
+ primaryColor="#607985"
4
+ backgroundColor="#c7c6c6"
5
+ secondaryBackgroundColor="#949fa2"
6
+ textColor="#333333"
Images/Group.svg ADDED
Images/Robot.svg ADDED
Images/Sort.svg ADDED
Pages/3_πŸ‘‹_About.py DELETED
@@ -1,28 +0,0 @@
1
- import streamlit as st
2
-
3
-
4
- # Display the about page of the app with information about the creator, code, and data
5
- def about_page():
6
- st.header("About")
7
- st.write(
8
- "This app was created by [Harshit Singh](https://harsh502s.github.io), Poorvi Singh and Samruddhi Raskar as a part of their MSc Data Science 3rd semester project."
9
- )
10
- st.write("The code for this app can be found [here]( ).")
11
- st.write(
12
- "The data on which these models are trained can be found [here](https://www.kaggle.com/datasets/harsh502s/stackexchange-tag-dataset)."
13
- )
14
- st.subheader("Models used in this app are:")
15
- st.write(
16
- "1. [BERTopic](https://maartengr.github.io/BERTopic/api/bertopic.html#:~:text=BERTopic%20is%20a%20topic%20modeling,words%20in%20the%20topic%20descriptions.)"
17
- )
18
- st.write(
19
- "2. [KeyBERT](https://maartengr.github.io/KeyBERT/#:~:text=KeyBERT%20is%20a%20minimal%20and,most%20similar%20to%20a%20document.)"
20
- )
21
- st.write(
22
- "3. [CNN](https://www.tensorflow.org/tutorials/text/text_classification_rnn)"
23
- )
24
- pass
25
-
26
-
27
- if __name__ == "__main__":
28
- about_page()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Pages/About.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+
4
+ # Display the about page of the app with information about the creator, code, and data
5
+ def about_page():
6
+ st.title("About Us")
7
+ with st.container():
8
+ col = st.columns([1, 1])
9
+ with col[0]:
10
+ st.write("\n")
11
+ st.write("\n")
12
+ st.write("\n")
13
+ st.write(
14
+ "This app was created by [Harshit Singh](https://harsh502s.github.io), Poorvi Singh and Samruddhi Raskar as a part of their MSc Data Science 3rd semester project."
15
+ )
16
+ st.write("\n")
17
+ st.write("The code for this app can be found [here]( ).")
18
+ st.write("\n")
19
+ st.write(
20
+ "The data on which these models are trained can be found [here](https://www.kaggle.com/datasets/harsh502s/stackexchange-tag-dataset)."
21
+ )
22
+ with col[1]:
23
+ st.image("Images/group.svg", width=300)
24
+
25
+ st.write("\n")
26
+ st.write("\n")
27
+
28
+ with st.container():
29
+ col = st.columns([1, 2])
30
+ with col[0]:
31
+ st.image("Images/Robot.svg", width=350)
32
+ with col[1]:
33
+ st.title("Models Used:")
34
+ st.write(
35
+ """1. [BERTopic](https://maartengr.github.io/BERTopic/api/bertopic.html#:~:text=BERTopic%20is%20a%20topic%20modeling,words%20in%20the%20topic%20descriptions.)
36
+ is a topic modeling technique that leverages BERT embeddings and c-TF-IDF to create dense clusters allowing for easily interpretable topics whilst keeping important words in the topic descriptions."""
37
+ )
38
+ st.write(
39
+ """2. [KeyBERT](https://maartengr.github.io/KeyBERT/#:~:text=KeyBERT%20is%20a%20minimal%20and,most%20similar%20to%20a%20document.)
40
+ is a minimal and easy-to-use keyword extraction technique that leverages BERT embeddings to create keywords and keyphrases that are most similar to a document."""
41
+ )
42
+ st.write(
43
+ """3. Convolutional Neural Networks (CNNs) are used for text classification. CNNs can identify patterns in text data, such as bigrams, trigrams, or n-grams. CNNs are translation invariant, so they can detect these patterns regardless of their position in the sentence."""
44
+ )
45
+
46
+
47
+ if __name__ == "__main__":
48
+ about_page()
Pages/{2_πŸ€–_Models.py β†’ Models.py} RENAMED
File without changes
Pages/{1_πŸ“Š_Topic Model Results.py β†’ Topic Model Results.py} RENAMED
File without changes
app.py CHANGED
@@ -5,9 +5,9 @@ from st_pages import Page, show_pages
5
  show_pages(
6
  [
7
  Page(r"app.py", "Home", "🏠"),
8
- Page(r"Pages/1_πŸ“Š_Topic Model Results.py", 'Topic Model Result',"πŸ“Š"),
9
- Page(r"Pages/2_πŸ€–_Models.py", "Models", "πŸ€–"),
10
- Page(r"Pages/3_πŸ‘‹_About.py", "About", "πŸ‘‹"),
11
  ]
12
  )
13
 
@@ -22,15 +22,26 @@ st.set_page_config(
22
  # Display the main page of the app with instructions on how to use it
23
  def main():
24
  st.title("Autonomous Text Tagging App")
25
- st.subheader(
26
- "This application shows a demo of different supervised and unsupervised approches taken in the field of NLP to give relevant tags to the text."
27
- )
28
- st.subheader("This is a multi-page app.")
29
- st.write("1. You can navigate between pages by clicking on the sidebar.")
30
- st.write("2. The Topic Modeling Results page shows the results of BERTopic.")
31
- st.write("3. The Model page give a demo of all the models used in this app.")
32
- st.write("4. The About page gives information about the creator, code, and data.")
33
- st.divider()
 
 
 
 
 
 
 
 
 
 
 
34
 
35
 
36
  if __name__ == "__main__":
 
5
  show_pages(
6
  [
7
  Page(r"app.py", "Home", "🏠"),
8
+ Page(r"Pages/Topic Model Results.py", "Topic Model Result", "πŸ“Š"),
9
+ Page(r"Pages/Models.py", "Models", "πŸ€–"),
10
+ Page(r"Pages/About.py", "About", "πŸ‘‹"),
11
  ]
12
  )
13
 
 
22
  # Display the main page of the app with instructions on how to use it
23
  def main():
24
  st.title("Autonomous Text Tagging App")
25
+ cols = st.columns([1, 1])
26
+ with st.container():
27
+ with cols[0]:
28
+ st.write(
29
+ "A Text tagging is the process of adding metadata or labels to specific elements within a text, such as identifying and categorizing named entities, parts of speech, or sentiment."
30
+ )
31
+ st.write(
32
+ "This app show the results of BERTopic Model and a demo of all the models used in this project."
33
+ )
34
+ st.subheader("How to use this app:")
35
+ st.write("1. Select the model you want to use from the sidebar.")
36
+ st.write("2. Enter the text you want to tag.")
37
+ st.write('3. Click on the "Tag" button.')
38
+ st.write("4. The tags will be displayed in the output section.")
39
+ st.write("5. You can see the results of BERTopic Model in the sidebar.")
40
+ st.write("6. You can use tabs to see the visualization of the results.")
41
+ st.divider()
42
+
43
+ with cols[1]:
44
+ st.image("Images/sort.svg", width=450)
45
 
46
 
47
  if __name__ == "__main__":