Today, there is such an abundance of news and information that it is a real challenge to stay up-to-date on the topics that interest us the most. Our project aims to compress this abundance of news and information through a news recommendation system capable of providing this content in a summarized, precise, and easy-to-digest manner, both in easy reading text and voice, and in multiple languages. This way, people with visual impairments can stay informed in an accessible way, thanks to Azure AI Speech's Speech-to-Text and Text-to-Speech services, and the incredible Generative AI of the Azure OpenAI Service.
- Create an Azure AI Speech resource on Azure, and obtain its Key and Region from Resource Management > Keys and Endpoints.
- Create an Azure AI Language resource on Azure, and obtain its Endpoint and Key from Resource Management > Keys and Endpoints.
- Create an Azure AI Translator resource on Azure, and obtain its Text Translation Endpoint and Key from Resource Management > Keys and Endpoints.
- Create an Azure OpenAI resource on Azure, and obtain its Key and Endpoint from Resource Management > Keys and Endpoints.
- Open Azure OpenAI Studio, deploy a new GPT model (3.5 or better recommended), and obtain your model's deployment name, e.g. 'mygpt4modeldeployment'.
- Choose an Azure OpenAI API version, e.g. "2024-02-01". The available OpenAI API versions can be found here.
- After cloning the repository (steps below), rename the provided .env-example file to just '.env', and enter the corresponding values from the previous steps.
Open up a Terminal (macOS/Linux) or PowerShell (Windows) and enter the following commands:
git clone https://github.com/Underdoge/ReadMyNews
cd ReadMyNews
python -m venv venv
source venv/bin/activate
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
winget install ffmpeg
apt install ffmpeg
brew install ffmpeg
python app.py
streamlit run streamlit.py
- We adapted several of the functions from the Working with functions in Azure OpenAI Jupyter Notebook found in the Azure OpenAI Service Samples repo.
- We adapted code available in the mslearn-ai-language repo.
- We filter out user input that doesn’t comply with Azure OpenAI’s GPT model’s default content filtering. We recommend using the default content filtering configuration for the GPT model in the Azure OpenAI service, since we find it is apt for the content in the Microsoft News Dataset. The default content filtering configuration for the GPT model series is set to filter at the medium severity threshold for all four content harm categories (hate, violence, sexual, and self-harm) and applies to both prompts (text, multi-modal text/image) and completions (text). This means that content that is detected at severity level medium or high is filtered, while content detected at severity level low isn't filtered by the content filters. Please use this guide to customize content filtering if more strict filtering is required.