neuralleap commited on
Commit
ab09d94
·
verified ·
1 Parent(s): f087644

Update README.MD

Browse files
Files changed (1) hide show
  1. README.md +94 -81
README.md CHANGED
@@ -1,82 +1,95 @@
1
- # GPT-Style Chat Assistant
2
-
3
- A sophisticated Streamlit app that mimics the ChatGPT interface, using OpenAI's GPT models for advanced reasoning capabilities.
4
-
5
- ![Screenshot](https://i.ibb.co/bJfyXXn/gpt-style-assistant.png)
6
-
7
- ## Features
8
-
9
- - **ChatGPT-like interface** with conversation sidebar
10
- - **Multiple conversation management**:
11
- - Create new chats
12
- - Switch between conversations
13
- - Delete old conversations
14
- - **Conversation history** preserved between sessions
15
- - **Demo mode** that works without an API key
16
- - **Responsive design** that adapts to different screen sizes
17
-
18
- ## Setup
19
-
20
- 1. Clone this repository
21
- 2. Install the required packages:
22
- ```
23
- pip install -r requirements.txt
24
- ```
25
- 3. (Required for full functionality) Get an OpenAI API key:
26
- - Create an account at [OpenAI](https://platform.openai.com/signup)
27
- - Go to [API Keys](https://platform.openai.com/account/api-keys)
28
- - Create a new API key
29
- - Add it to a `.env` file in the root directory:
30
- ```
31
- OPENAI_API_KEY=your_api_key_here
32
- ```
33
-
34
- ## Running Locally
35
-
36
- Run the app with the following command:
37
-
38
- ```
39
- streamlit run app.py
40
- ```
41
-
42
- If you're having trouble with the `streamlit` command not being found, you can use the full path to the executable:
43
- ```
44
- python -m streamlit run app.py
45
- ```
46
-
47
- Or use the provided runner script:
48
- ```
49
- python run_app.py
50
- ```
51
-
52
- This will start the app and open it in your default browser.
53
-
54
- ## Demo Mode
55
-
56
- The app includes a demo mode that works without an API key. In this mode:
57
- - The assistant will provide pre-defined responses to common questions
58
- - You'll see a text field in the sidebar where you can optionally enter an OpenAI API key
59
- - For a full chatbot experience with reasoning capabilities, it's recommended to add your OpenAI API key
60
-
61
- ## Deploying to Hugging Face Spaces
62
-
63
- 1. Create a new Space on Hugging Face Spaces (https://huggingface.co/spaces)
64
- 2. Choose Streamlit as the SDK
65
- 3. Link your GitHub repository or upload the files directly
66
- 4. Add your OpenAI API key as a secret:
67
- - Go to Settings > Repository Secrets
68
- - Add a secret named `OPENAI_API_KEY` with your key
69
-
70
- The app will automatically deploy and be available at your Hugging Face Spaces URL.
71
-
72
- ## About the Model
73
-
74
- This app uses OpenAI's GPT-3.5-Turbo model, which is a powerful language model with excellent reasoning capabilities. You'll need an OpenAI API key to access this model.
75
-
76
- ## Customization
77
-
78
- You can easily customize the app by:
79
- - Changing the model in the `get_ai_response` function
80
- - Adjusting the styling in the CSS section
81
- - Adding more features to the sidebar
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  - Creating additional response templates for the demo mode
 
1
+ ---
2
+ title: GPT-Style Chat Assistant
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: streamlit
7
+ sdk_version: 1.24.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ # GPT-Style Chat Assistant
15
+
16
+ A sophisticated Streamlit app that mimics the ChatGPT interface, using OpenAI's GPT models for advanced reasoning capabilities.
17
+
18
+ ![Screenshot](https://i.ibb.co/bJfyXXn/gpt-style-assistant.png)
19
+
20
+ ## Features
21
+
22
+ - **ChatGPT-like interface** with conversation sidebar
23
+ - **Multiple conversation management**:
24
+ - Create new chats
25
+ - Switch between conversations
26
+ - Delete old conversations
27
+ - **Conversation history** preserved between sessions
28
+ - **Demo mode** that works without an API key
29
+ - **Responsive design** that adapts to different screen sizes
30
+
31
+ ## Setup
32
+
33
+ 1. Clone this repository
34
+ 2. Install the required packages:
35
+ ```
36
+ pip install -r requirements.txt
37
+ ```
38
+ 3. (Required for full functionality) Get an OpenAI API key:
39
+ - Create an account at [OpenAI](https://platform.openai.com/signup)
40
+ - Go to [API Keys](https://platform.openai.com/account/api-keys)
41
+ - Create a new API key
42
+ - Add it to a `.env` file in the root directory:
43
+ ```
44
+ OPENAI_API_KEY=your_api_key_here
45
+ ```
46
+
47
+ ## Running Locally
48
+
49
+ Run the app with the following command:
50
+
51
+ ```
52
+ streamlit run app.py
53
+ ```
54
+
55
+ If you're having trouble with the `streamlit` command not being found, you can use the full path to the executable:
56
+ ```
57
+ python -m streamlit run app.py
58
+ ```
59
+
60
+ Or use the provided runner script:
61
+ ```
62
+ python run_app.py
63
+ ```
64
+
65
+ This will start the app and open it in your default browser.
66
+
67
+ ## Demo Mode
68
+
69
+ The app includes a demo mode that works without an API key. In this mode:
70
+ - The assistant will provide pre-defined responses to common questions
71
+ - You'll see a text field in the sidebar where you can optionally enter an OpenAI API key
72
+ - For a full chatbot experience with reasoning capabilities, it's recommended to add your OpenAI API key
73
+
74
+ ## Deploying to Hugging Face Spaces
75
+
76
+ 1. Create a new Space on Hugging Face Spaces (https://huggingface.co/spaces)
77
+ 2. Choose Streamlit as the SDK
78
+ 3. Link your GitHub repository or upload the files directly
79
+ 4. Add your OpenAI API key as a secret:
80
+ - Go to Settings > Repository Secrets
81
+ - Add a secret named `OPENAI_API_KEY` with your key
82
+
83
+ The app will automatically deploy and be available at your Hugging Face Spaces URL.
84
+
85
+ ## About the Model
86
+
87
+ This app uses OpenAI's GPT-3.5-Turbo model, which is a powerful language model with excellent reasoning capabilities. You'll need an OpenAI API key to access this model.
88
+
89
+ ## Customization
90
+
91
+ You can easily customize the app by:
92
+ - Changing the model in the `get_ai_response` function
93
+ - Adjusting the styling in the CSS section
94
+ - Adding more features to the sidebar
95
  - Creating additional response templates for the demo mode