A Python notebook that integrates a Gradio chatbot app (frontend) with a Dialogflow CX virtual agent (conversational chatbot backend).
- You have a Google Cloud account and a project
- You have enabled the Dialogflow CX API in Google Cloud for your project
- You've created a virtual agent in Dialogflow CX (I suggest trying one of the pre-built agents!)
- Clone this repo and
cd
into this directory - Install dependencies with
pip install -r requirements.txt
- Open the notebook in this repo
- Define the values in the notebook for your Google Cloud project ID,
Dialogflow CX agent region, Dialogflow CX agent ID, and language. For
example:
PROJECT_ID = "my-awesome-google-cloud-project" LOCATION_ID = "global" AGENT_ID = "1111aa11-aaaa-1111-a111-1a1aa1a111aa" LANGUAGE_CODE = "en-us"
- Run all of the cells in the notebook
- View the app in your browser on your local machine and chat with it!
- (Optional) Make your Gradio app link publicly accessible by running a new
cell with
demo.launch(share=True)