Spaces:
Running
Running
Update Readme.md
Browse files
Readme.md
CHANGED
@@ -1,71 +1,10 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
### Dependencies
|
12 |
-
|
13 |
-
This code uses the following libraries:
|
14 |
-
|
15 |
-
- `streamlit`: for building the user interface.
|
16 |
-
- `gemini`: for chat
|
17 |
-
- Gemini API key: Get it from [Google AI Studio](https://ai.google.dev/tutorials/setup?hl=tr)
|
18 |
-
|
19 |
-
|
20 |
-
### Usage
|
21 |
-
|
22 |
-
Follow these steps to set up and run the project:
|
23 |
-
|
24 |
-
1. Create a virtual environment:
|
25 |
-
```
|
26 |
-
python3 -m venv my_env
|
27 |
-
source my_env/bin/activate
|
28 |
-
.\my_env\Scripts\activate
|
29 |
-
```
|
30 |
-
|
31 |
-
2. Install dependencies:
|
32 |
-
```
|
33 |
-
pip install -r requirements.txt
|
34 |
-
```
|
35 |
-
|
36 |
-
3. Run the Streamlit server:
|
37 |
-
```
|
38 |
-
streamlit run app_chat.py
|
39 |
-
```
|
40 |
-
|
41 |
-
4. Access the application in your browser at http://localhost:8501.
|
42 |
-
|
43 |
-
5. Start chatting with the assistant!
|
44 |
-
|
45 |
-
## Repository Structure
|
46 |
-
```
|
47 |
-
repository/
|
48 |
-
βββ app_chat.py # the code and UI integrated together live here
|
49 |
-
βββ requirements.txt # the python packages needed to run locally
|
50 |
-
βββ .streamlit/
|
51 |
-
β βββ config.toml # theme info for the UI
|
52 |
-
βββ data/ # folder for saved chat messages
|
53 |
-
βββ docs/ # preview for github
|
54 |
-
|
55 |
-
```
|
56 |
-
|
57 |
-
## How it Works
|
58 |
-
|
59 |
-
The app as follows:
|
60 |
-
|
61 |
-
1. The user enters a question in the input field.
|
62 |
-
|
63 |
-
2. User messages are sent to the Gemini model for processing.
|
64 |
-
|
65 |
-
3. The user's input, along with the chat history, is used to generate a response.
|
66 |
-
|
67 |
-
4. The Gemini model generates a response based on the patterns it learned during training.
|
68 |
-
|
69 |
-
5. The application saves chat messages and Gemini AI chat history to files for later retrieval.
|
70 |
-
|
71 |
-
6. A new chat is created if the user initiates a conversation that hasn't been stored before, or user can go back to past chats.
|
|
|
1 |
+
license: afl-3.0
|
2 |
+
title:
|
3 |
+
Chatbot_Gemini_Streamlit
|
4 |
+
sdk: streamlit
|
5 |
+
emoji: π
|
6 |
+
colorFrom: red
|
7 |
+
colorTo: yellow
|
8 |
+
pinned: true
|
9 |
+
sdk_version: 1.42.2
|
10 |
+
short_description: Transform your audience's thoughts into persuasive bullets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|