Update app.py
Browse files
app.py
CHANGED
@@ -463,22 +463,4 @@ st.pyplot(fig)
|
|
463 |
|
464 |
|
465 |
|
466 |
-
st,write('''
|
467 |
-
In this code:
|
468 |
-
|
469 |
-
1. The text input is provided through a textarea (`st.text_area`) and stored in the `text_input` variable.
|
470 |
-
2. The user can specify the number of dictionary components using a slider (`st.slider`).
|
471 |
-
3. When the "Analyze" button is clicked (`st.button`), the following steps are performed:
|
472 |
-
- The text is preprocessed using the `CountVectorizer` from scikit-learn.
|
473 |
-
- Dictionary learning is performed on the preprocessed text data.
|
474 |
-
- The dictionary components and their corresponding terms are displayed in a DataFrame using Streamlit's `st.dataframe`.
|
475 |
-
- A graph is created using the NetworkX library to visualize the connections between the terms based on their co-occurrence in the dictionary components.
|
476 |
-
- The graph is plotted using Matplotlib and displayed using Streamlit's `st.pyplot`.
|
477 |
-
|
478 |
-
The text input is directly included in the code using a multiline string (triple quotes `'''`). This allows the user to analyze the provided text by clicking the "Analyze" button.
|
479 |
-
|
480 |
-
The rest of the code remains the same as before, with the addition of the text input being provided through the textarea.
|
481 |
-
|
482 |
-
''')
|
483 |
-
|
484 |
|
|
|
463 |
|
464 |
|
465 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|