You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-5
Original file line number
Diff line number
Diff line change
@@ -221,20 +221,32 @@ The root directory contains configuration files and documentation for the overal
221
221
pip install -r backend/requirements.txt
222
222
pip install -r frontend/requirements.txt
223
223
```
224
+
3. Set SERVICE_TOKEN environment variable with the service token for the backend API. You can set the environment variable in the terminal before running the application:
224
225
225
-
3. Run the backend FastAPI application:
226
+
(Linux/Mac)
227
+
```bash
228
+
export SERVICE_TOKEN="myllservicetoken2024"
229
+
```
230
+
or
231
+
232
+
(Windows)
233
+
```bash
234
+
$env:SERVICE_TOKEN="myllservicetoken2024"
235
+
```
236
+
237
+
4. Run the backend FastAPI application:
226
238
227
239
```bash
228
-
uvicorn backend.api.main:app --reload
240
+
uvicorn backend.api.main:api --reload
229
241
```
230
-
4. Run the frontend Streamlit application:
242
+
5. Run the frontend Streamlit application:
231
243
232
244
```bash
233
245
streamlit run frontend/app/main.py
234
246
```
235
-
5. Open your web browser and go to `http://localhost:8501` to access the Streamlit application Chat of the frontend.
247
+
6. Open your web browser and go to `http://localhost:8501` to access the Streamlit application Chat of the frontend.
236
248
237
-
6. Go to `http://localhost:8000/docs` to access the FastAPI Swagger documentation of the backend.
249
+
7. Go to `http://localhost:8000/docs` to access the FastAPI Swagger documentation of the backend.
238
250
239
251
### Frontend usage
240
252
@@ -243,6 +255,8 @@ The root directory contains configuration files and documentation for the overal
243
255
3. The backend API will process the message and generate a response using the TinyLlama model.
244
256
4. The response will be displayed in the chat interface on the Streamlit application.
245
257
258
+

259
+
246
260
From the frontend interface, you can interact with the chatbot and view the responses in real-time. The backend API handles the chatbot logic and interacts with the TinyLlama model to generate responses.
247
261
248
262
You can adjust the following parameters in the Streamlit interface to control the chatbot responses expand the "Config params" section:
@@ -251,6 +265,8 @@ You can adjust the following parameters in the Streamlit interface to control th
251
265
- **Top K**: The number of highest probability vocabulary tokens to keep for top-k-filtering.
252
266
- **Top P**: The cumulative probability of parameter settings for nucleus sampling.
The interface send all history of the chat to the backend API to generate the response. LLM model is a conversational model, so it needs the context of the conversation to generate the response correctly.
255
271
256
272
For clear the chat history, you can click the "New Chat" button.
0 commit comments