cosmoruler commited on
Commit
8e1f727
Β·
1 Parent(s): 01e53d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -8
README.md CHANGED
@@ -32,24 +32,122 @@ A ChatGPT-like interface built with Gradio that supports file uploads and uses a
32
  - **πŸ›‘οΈ Error Handling**: Graceful fallback to smaller models if the main model fails
33
  - **πŸ“± Responsive Design**: Clean, user-friendly interface
34
 
35
- ## πŸš€ Quick Start
36
 
37
- ### Option 1: Easy Start (Windows)
38
 
39
- Double-click the `start_chatbot.bat` file
40
 
41
- ### Option 2: From Terminal
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  ```bash
44
- python app.py
45
  ```
46
 
47
- ### Option 3: From VS Code
 
 
48
 
49
- Open the integrated terminal and run:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  ```bash
52
- python app.py
 
 
 
 
53
  ```
54
 
55
  ## 🌐 Using the Chatbot
 
32
  - **πŸ›‘οΈ Error Handling**: Graceful fallback to smaller models if the main model fails
33
  - **πŸ“± Responsive Design**: Clean, user-friendly interface
34
 
35
+ ## πŸš€ How to Run the Chatbot
36
 
37
+ ### ⚠️ **IMPORTANT: Virtual Environment Required**
38
 
39
+ This project uses a virtual environment with all dependencies installed. Follow the **exact sequence** below to run the chatbot successfully.
40
 
41
+ ### **βœ… Recommended Method (Step-by-Step)**
42
+
43
+ 1. **Open Terminal** in the project folder:
44
+
45
+ ```bash
46
+ cd "C:\Users\Cosmo\Desktop\GPT\GPT"
47
+ ```
48
+
49
+ 2. **Activate Virtual Environment**:
50
+
51
+ ```bash
52
+ .\env\Scripts\activate.bat
53
+ ```
54
+
55
+ 3. **Run with Full Python Path** (this ensures it works even if activation doesn't fully work):
56
+
57
+ ```bash
58
+ C:/Users/Cosmo/Desktop/GPT/GPT/env/Scripts/python.exe app.py
59
+ ```
60
+
61
+ 4. **Success! You should see**:
62
+
63
+ ```
64
+ * Running on local URL: http://127.0.0.1:7860
65
+ ```
66
+
67
+ 5. **Open your browser** and go to: **http://127.0.0.1:7860**
68
+
69
+ ### **Alternative Methods**
70
+
71
+ ### **Method 1: Using the Batch File (if available)**
72
+
73
+ 1. **Double-click** the `start_chatbot.bat` file in the project folder
74
+ 2. This should automatically handle everything
75
+
76
+ ### **Method 2: PowerShell (if execution policy allows)**
77
+
78
+ 1. **Open PowerShell** in the project folder
79
+ 2. **Fix execution policy** (one-time setup):
80
+ ```powershell
81
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
82
+ ```
83
+ 3. **Activate and run**:
84
+ ```powershell
85
+ .\env\Scripts\Activate.ps1
86
+ python app.py
87
+ ```
88
+
89
+ ### **Method 3: From VS Code**
90
+
91
+ 1. **Open the project folder** in VS Code
92
+ 2. **Open integrated terminal** (Ctrl + `)
93
+ 3. **Use the recommended sequence**:
94
+ ```bash
95
+ .\env\Scripts\activate.bat
96
+ C:/Users/Cosmo/Desktop/GPT/GPT/env/Scripts/python.exe app.py
97
+ ```
98
+
99
+ ### **βœ… Verify Virtual Environment is Active**
100
+
101
+ When the virtual environment is active, you should see `(env)` at the beginning of your command prompt:
102
+
103
+ ```
104
+ (env) C:\Users\Cosmo\Desktop\GPT\GPT>
105
+ ```
106
+
107
+ **⚠️ Important**: Even with `(env)` showing, you may still need to use the full Python path for the app to work correctly.
108
+
109
+ ### **❌ Common Errors & Solutions**
110
+
111
+ #### **Error: "ModuleNotFoundError: No module named 'gradio'"**
112
+
113
+ **Even if you see `(env)` in your prompt**, this error means the Python path isn't correct.
114
+
115
+ **βœ… Solution**: Always use the full Python path:
116
 
117
  ```bash
118
+ C:/Users/Cosmo/Desktop/GPT/GPT/env/Scripts/python.exe app.py
119
  ```
120
 
121
+ #### **Error: ".\env\Scripts\Activate.ps1 cannot be loaded"**
122
+
123
+ This is a PowerShell execution policy issue.
124
 
125
+ **βœ… Solutions** (choose one):
126
+
127
+ 1. **Use Command Prompt activation instead**:
128
+
129
+ ```bash
130
+ .\env\Scripts\activate.bat
131
+ ```
132
+
133
+ 2. **Fix PowerShell execution policy**:
134
+
135
+ ```powershell
136
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
137
+ ```
138
+
139
+ 3. **Use the batch file**: Double-click `start_chatbot.bat`
140
+
141
+ #### **Error: Missing packages**
142
+
143
+ If packages aren't installed in the virtual environment:
144
 
145
  ```bash
146
+ # Activate first
147
+ .\env\Scripts\activate.bat
148
+
149
+ # Then install
150
+ pip install -r requirements.txt
151
  ```
152
 
153
  ## 🌐 Using the Chatbot