title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned | license |
---|---|---|---|---|---|---|---|---|
Text Summarization |
🔥 |
yellow |
indigo |
gradio |
4.7.1 |
app.py |
false |
mit |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
This repository contains the source code for a Text Summarization Application that leverages a Hugging Face model and integrates with a Gradio web interface. Continuous integration is set up using Hugging Face Spaces. Additionally, it provides a command-line tool for text summarization and integrates with FastAPI through main.py
.
-
Hugging Face Model: Utilizes a pre-trained model from Hugging Face for text summarization.
-
Gradio Web Interface: Provides an interactive web interface powered by Gradio for easy input and output interaction.
-
Continuous Integration: Uses Hugging Face Spaces for continuous integration to ensure reliable and up-to-date deployments.
-
Command-Line Tool: Includes a command-line tool for convenient text summarization from the terminal.
-
FastAPI Integration: The
main.py
file integrates with FastAPI, allowing for RESTful API access to the summarization capabilities.
-
Clone the Repository:
git clone https://github.com/henrii1/NLP_Text_summarization_huggingface.git cd your-NLP_Text_smmarization_huggingface
-
Install Dependencies, Lint, Format and Test:
make all
-
Run the Application:
- For the Gradio web interface:
python app.py
- For the FastAPI integration:
uvicorn main:app --reload
- For the Gradio web interface:
-
Access the Application:
- Gradio web interface: Open your browser and go to
http://localhost:7860
. - FastAPI: Explore the API at
http://localhost:8000/docs
(Swagger UI) orhttp://localhost:8000/redoc
(ReDoc).
- Gradio web interface: Open your browser and go to
To use the command-line tool for summarization, run:
python appCLI.py --text "Your input text goes here."