Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
@@ -8,5 +8,45 @@ sdk_version: 1.29.0
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
+
# NLP Text Analyzer
|
12 |
+
|
13 |
+
This project is a Python-based Natural Language Processing (NLP) Text Analyzer that uses Streamlit for the user interface and leverages Hugging Face's `transformers` library to perform text summarization using the BART model, visualize word clouds, and display the most common words in a given text.
|
14 |
+
|
15 |
+
## Overview
|
16 |
+
|
17 |
+
The NLP Text Analyzer consists of the following functionalities:
|
18 |
+
|
19 |
+
- **Text Summarization**: Utilizes the BART model from Hugging Face's `transformers` library to generate a summary of the user-provided text.
|
20 |
+
- **Word Cloud Generation**: Generates a word cloud visualization based on the input text.
|
21 |
+
- **Most Common Words**: Displays the top 10 most common words and their frequencies in the input text.
|
22 |
+
|
23 |
+
## Libraries Used
|
24 |
+
|
25 |
+
- `streamlit`: Used for building the web-based user interface.
|
26 |
+
- `transformers` (from Hugging Face): Provides pre-trained models for NLP tasks. Specifically, the `BartForConditionalGeneration` and `BartTokenizer` are used for text summarization.
|
27 |
+
- `nltk`: Utilized for text processing tasks like tokenization and frequency analysis.
|
28 |
+
- `wordcloud`: Enables the creation of word cloud visualizations.
|
29 |
+
- `matplotlib`: Used for plotting word cloud and other visualizations.
|
30 |
+
|
31 |
+
## Usage
|
32 |
+
|
33 |
+
### Setup
|
34 |
+
|
35 |
+
1. Install the necessary Python dependencies listed in `requirements.txt`.
|
36 |
+
2. Run the Streamlit app locally using the command: `streamlit run your_script.py`.
|
37 |
+
|
38 |
+
### Functionality
|
39 |
+
|
40 |
+
1. **Text Input**: Enter your text in the provided text area.
|
41 |
+
2. **Summary**: Displays a summary of the input text using the BART model.
|
42 |
+
3. **Word Cloud**: Shows a visual representation of word frequency in the input text.
|
43 |
+
4. **Most Common Words**: Provides a table showing the top 10 most common words and their frequencies.
|
44 |
+
|
45 |
+
## Collab Notebook
|
46 |
+
Access the Colab notebook used for development [here](https://colab.research.google.com/drive/1Y2vv_pZ5nKXKLrXrmsSu6z8hz6ncjWOz#scrollTo=y5-24_9jLdT2).
|
47 |
+
|
48 |
+
## Acknowledgments
|
49 |
+
- The project utilizes the power of Hugging Face's `transformers` library for NLP tasks.
|
50 |
+
- The word cloud visualization is created using the `wordcloud` library.
|
51 |
|
52 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|