Giter Site home page Giter Site logo

azure-samples / summarization-python-openai Goto Github PK

View Code? Open in Web Editor NEW
23.0 14.0 13.0 221 KB

E2E ready to deploy solution architecture combining Cognitive (Enterprise) Search with OpenAI to search for relevant information and then to summarize the content to present to the user in a concise and succinct manner.

License: MIT License

Jupyter Notebook 79.32% Bicep 20.33% Dockerfile 0.35%
azd-templates

summarization-python-openai's Introduction

[IMPORTANT NOTE Azure OpenAI is currently in limited public preview. Please request access here https://aka.ms/oaiapply. You will need this access in order to create OpenAI resources and try out the last OpenAI portion of the notebook.]

This repository contains a Python Notebook that shows you how easy it is to deploy and use Azure OpenAI along with Azure Cognitive Search, Azure Storage and Visual Studio Code to make sense of large amounts of data. Figure 1: End-to-end Architecture

Figure 1: End-to-end Architecture

Following are detailed step by step instructions to setup an environment to try out this solution notebook for yourself:

I Setup the Azure Developer Environment using azd up

  1. Install Azure Developer CLI
  2. Open VSCode. Create an empty folder and open this folder in VSCode using Open Folder. Install the extension for GitHub
  3. In the VSCode Terminal run
azd up --template summarization-python-openai

[NOTE: OpenAI creation will fail if your Azure subscription is not yet whitelisted or if it has more than the number of OpenAI instances allowed per your quota]

  1. Copy the resource group (rg*) and storage account (st*) names somewhere. You will need them later.
  2. Ctrl-Shift-P, then select Python: Create Environment (see here for more guidance Using Python Environments in Visual Studio Code). Pick venv and the Python interpreter. Wait for the environment to get created, this will also take a while (see the bottom right for status)

II Configure Notebook

  1. Open the qbs_end_to_end.ipynb notebook file in the src folder. Change the environment to the above .venv (top right hand corner, might say base or Select Kernel or Python <version>).
  2. Run the cells in the notebook to setup the enviroment completing the step where the dataset is uploaded into Storage.

IIa [KNOWN ISSUE. THIS SECTION WILL BE AUTOMATED POST GA VIA THE SDK] Configure Cognitive Search Preview

  1. Go to the Search Service under the rg* resource group. Select Keys and check Role-based access control. Return to Search Service page. Click Import data and fill in the settings as below
Data Source: Azure Blob Storage
Data Source Name: azureblob-index
Data to extract: Content and metadata
Parsing mode: JSON array
Connection string - Choose an existing connection - Storage Account (copied above) - Container (openaiblob)
  1. (Click Next then ...) Skip to Customize target index. Check the fields id/article/highlights making all 3 retrievable and the latter 2 searchable. Create indexer and Submit.

III Query based summarization

  1. Run cells in the notebook that use Cognitive Search
  2. [Optional] Run cells that use OpenAI (if you have access to the preview)

[Optional] Cleanup

  1. Go to rg* in https://portal.azure.com.
  2. [KNOWN ISSUE] Select the OpenAI Service under the rg* resource group. Click on Deploy (or Model Deployments on the left side of the page). Click on each deployed model and select delete. Wait for one deletion to complete before deleting the next one.
  3. Return to rg* page. Click Delete and fill in the name of the resource group and click delete.

summarization-python-openai's People

Contributors

achandmsft avatar jongio avatar microsoftopensource avatar rcarun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

summarization-python-openai's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.