/gradio-dialogflow-cx

A Python notebook that integrates Gradio (app frontend) with Dialogflow CX (conversational backend)

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Gradio app + Dialogflow CX agent

A Python notebook that integrates a Gradio chatbot app (frontend) with a Dialogflow CX virtual agent (conversational chatbot backend).

Screenshot of a Gradio app integrated with Dialogflow CX

Prerequisites

Usage

  1. Clone this repo and cd into this directory
  2. Install dependencies with
    pip install -r requirements.txt
    
  3. Open the notebook in this repo
  4. 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"
    
  5. Run all of the cells in the notebook
  6. View the app in your browser on your local machine and chat with it!
  7. (Optional) Make your Gradio app link publicly accessible by running a new cell with demo.launch(share=True)