File size: 1,076 Bytes
01f4465
7524f15
 
01f4465
7524f15
01f4465
7524f15
01f4465
7524f15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
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