Spaces:
Sleeping
Sleeping
| title: simple_chatwebUI | |
| app_file: chatUI.py | |
| sdk: gradio | |
| sdk_version: 5.7.1 | |
| # **Simple ChatWebUI** | |
| A lightweight and customizable framework for creating a web-based chatbot with support for Retrieval-Augmented Generation (RAG). | |
| --- | |
| ## **Installation** | |
| 1. **Create and activate a virtual environment**: | |
| ```bash | |
| python -m venv venv | |
| source venv/bin/activate | |
| ``` | |
| 2. **Install the required packages**: | |
| ```bash | |
| pip install anthropic openai PyYAML backoff gradio | |
| ``` | |
| ## **Run Conversational AI on UI** | |
| ```bash | |
| python chatUI.py | |
| ``` | |
| ## **Run Conversational AI on Terminal** | |
| This is good for testing and debugging. | |
| 1. Export your OpenAI API key as an environment variable: | |
| ```bash | |
| export OPENAI_API_KEY=<your_openai_api_key> # or set it to other LLM providers | |
| ``` | |
| 2. Start the RAG system: | |
| ```bash | |
| python character.py | |
| ``` | |
| --- | |
| ## **Notes** | |
| - To share the demo, set share=True in the launch() method in chatUI.py. You should get a URL to share and it lasts for 72 hours. | |
| - https://www.gradio.app/guides/sharing-your-app | |