Gradio offers an easy way to share our application. By simply adding the pararmeter share and setting it to True in the launch() method, Gradio will create a publicly reachable temporary URL to make our application accessible. This will create a tunnel to our locally running application. We would need to keep our application running if we want to keep the URL accessible.

The complete chatbot

Now that we have built our chatbot features, we can combine them into one single application. While merging the multimodal chatbot with the RAG-based chatbot, we had to make one code change. Notice that we import Groq from the Groq library and the LlamaIndex library as well. This will cause issues. To keep the code working properly, we modified the Groq import to be as GroqOrg, referring to the original Groq library. Subsequently, we have also updated the usage on line 26. Feel free to test the application before we begin the deployment process.

Update the launch method to demo.launch(server_name="0.0.0.0", share=True) to access the application on a public URL.

Get hands-on with 1400+ tech skills courses.