27 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

# Frontend Application Launch Instructions
A small frontend application, a streamlit app, is provided to demonstrate how to build a UI on top of the solution accelerator API.
### 1. Deploy the GraphRAG solution accelerator
Follow instructions from the [deployment guide](../docs/DEPLOYMENT-GUIDE.md) to deploy a full instance of the solution accelerator.
### 2. (optional) Create a `.env` file:
| Variable Name | Required | Example | Description |
| :--- | --- | :--- | ---: |
DEPLOYMENT_URL | No | https://<my_apim>.azure-api.net | Base url of the deployed graphrag API. Also referred to as the APIM Gateway URL.
APIM_SUBSCRIPTION_KEY | No | <subscription_key> | A [subscription key](https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions) generated by APIM.
DEPLOYER_EMAIL | No | deployer@email.com | Email address of the person/organization that deployed the solution accelerator.
### 3. Start UI
The frontend application can be run locally as a docker container. If a `.env` file is not provided, the UI will prompt the user for additional information.
```
# cd to the root directory of the repo
> docker build -t graphrag:frontend -f docker/Dockerfile-frontend .
> docker run --env-file <env_file> -p 8080:8080 graphrag:frontend
```
To access the app , visit `localhost:8080` in your browser.
This UI application can also be hosted in Azure as a [Web App](https://azure.microsoft.com/en-us/products/app-service/web).