--- title: Summarization emoji: 📝 colorFrom: green colorTo: blue sdk: gradio sdk_version: 3.50.2 app_file: app.py pinned: false license: apache-2.0 --- # Text Summarization Hugging Face Spaces App Welcome to the Text Summarization Hugging Face Spaces App! This app allows you to generate text titles using the XJLULU/NTU_ADL_SUMMARIZATION_MT5_S model. ## App Description This app takes a piece of text as input and generates a summary of the text. You can either enter your own text or click the "Random" button to get a random example from a provided dataset and generate a summary. ## How to Use 1. Enter or paste a piece of text into the "Context paragraph" textbox. 2. Click the "Generate" button to generate a summary. 3. You can also click the "Random" button to generate a random example for summarization. ## Example Data The app uses a dataset of examples provided in the [sample_data.jsonl](https://huggingface.co./spaces/xjlulu/summarization/blob/main/sample_data.jsonl) file. Each example in the dataset contains a "text" field. You can either provide your own text or use the "Random" button to choose an example from the dataset. ## Model Information This project uses the [xjlulu/ntu_adl_summarization_mt5_s](https://huggingface.co./xjlulu/ntu_adl_summarization_mt5_s) model from Hugging Face. ## Local Setup If you want to run this app locally, follow these steps: 1. Clone the repository: ```python git clone https://huggingface.co./spaces/xjlulu/summarization ``` 2. Navigate to the project directory: ```python cd summarization ``` 3. Install the required libraries: ```python pip install -r requirements.txt ``` 4. Run the app: ```python python app.py ``` The app will start locally and be accessible at [http://localhost:7860]. You can access it in your web browser. ## Credits - [Hugging Face Transformers](https://github.com/huggingface/transformers) - [Gradio](https://gradio.app/) - [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) ## License This project is licensed under the apache-2.0 - see the [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) file for details. ## Acknowledgments Thank you to the open-source community for developing the amazing tools and libraries that make this project possible.