- Python Code Analyst** is a web application built with Streamlit that allows users to input news article URLs and receive summarized content in various tones. The application fetches the content of the news articles, processes it, and generates summaries using Cloudflare Workers AI. The main features of the project include:
- Fetching news article content from allowed domains
- Summarizing the content in different tones (e.g., humorous, majestic, academic)
- Handling errors for invalid URLs or disallowed domains
- Providing a user-friendly interface with Streamlit
To install and set up the project locally, follow these steps:
-
Clone the repository: Clone the repository to your local machine:
git clone https://github.com/canstralian/python-code-analyst.git cd python-code-analyst -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Enter a news article URL: Use the Streamlit interface to input a news article URL from allowed domains (e.g.,
example.com,another-example.com). -
Select a tone: Choose a tone for the summary (e.g., humorous, majestic, academic).
-
Generate the summary: Click the "Enter" button to fetch the article content and generate the summary.
We welcome contributions to the project! To contribute, please follow these guidelines:
- Fork the repository: Fork the repository to your GitHub account.
- Create a new branch: Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Make your changes: Make your changes to the codebase.
- Commit your changes: Commit your changes with a descriptive commit message:
git commit -m "Add feature description" - Push to your branch: Push your changes to your forked repository:
git push origin feature-name
- Create a pull request: Create a pull request to the main repository with a description of your changes.
This project is licensed under the MIT License. See the LICENSE file for more information.
- Added a timeout parameter to the
requests.getcall in thefetch_article_contentfunction. - Updated the
README.mdfile with project overview, installation instructions, usage examples, contribution guidelines, and license information.
- Initial release of the Python Code Analyst project.
For any questions or inquiries, please contact the project maintainers:
- Canstralian: GitHub
We would like to thank the following third-party libraries and tools that were used in this project:
Let me know if you'd like any adjustments!