An example chatbot app with Gradio that uses the PaLM API from Vertex AI in Google Cloud
-
Clone this repository and
cd
into thesrc/
directory. -
Install the required dependencies:
pip install -r requirements.txt
-
Set up authentication in Google Cloud using your preferred method. For example, you can use
gcloud auth
to generate credentials for client libraries, as in:gcloud auth application-default login
-
Run the app:
python src/app.py
-
Navigate to
http://127.0.0.1:8080/
in your browser. -
Start chatting with your PaLM-powered chatbot!
The above steps allow you to test and use the chatbot app on your local machine. You can use a fully managed service such as Cloud Run to publish your app.
-
From the
src/
directory, run the following command using the gcloud CLI:gcloud run deploy chatbot-app --source . --allow-unauthenticated --region us-central1
-
After a couple of minutes, your chatbot app will be deployed on Cloud Run, and you can access the app via a URL similar to: