Vitrous commited on
Commit
ce3f5fc
·
verified ·
1 Parent(s): fdad829

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md CHANGED
@@ -9,4 +9,62 @@ license: mit
9
  app_port: 7860
10
  ---
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  app_port: 7860
10
  ---
11
 
12
+ Certainly! Here's the content for your README.md file in markdown format:
13
+
14
+ ```markdown
15
+ # Eren Bot
16
+
17
+ Eren Bot is an AI chatbot built using FastAPI and Hugging Face's transformers library. It allows users to initiate conversations with the bot and receive responses based on predefined persona templates.
18
+
19
+ ## Requirements
20
+ - Python 3.x
21
+ - FastAPI
22
+ - Hugging Face Transformers
23
+
24
+ ## Installation
25
+ 1. Clone the repository:
26
+ ```bash
27
+ git clone https://github.com/your_username/eren-bot.git
28
+ ```
29
+ 2. Navigate to the project directory:
30
+ ```bash
31
+ cd eren-bot
32
+ ```
33
+ 3. Install dependencies:
34
+ ```bash
35
+ pip install -r requirements.txt
36
+ ```
37
+
38
+ ## Usage
39
+ 1. Run the FastAPI server:
40
+ ```bash
41
+ uvicorn main:app --reload
42
+ ```
43
+ This will start the FastAPI server with automatic reloading enabled for development.
44
+
45
+ 2. Open your web browser and go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) to access the API documentation provided by FastAPI.
46
+
47
+ 3. Use the provided endpoints to interact with the chatbot:
48
+ - `/start_chat/`: Start a new chat thread by providing a prompt and a contextual prompt.
49
+ - `/start_conversation/`: Start a new conversation thread by providing a prompt.
50
+ - `/get_response/{thread_id}`: Retrieve the response from an existing conversation thread using its thread ID.
51
+ - `/chat/`: Initiate a chat session by providing a prompt.
52
+
53
+ ## Example
54
+
55
+ ```python
56
+ import requests
57
+
58
+ # Start a new chat session
59
+ response = requests.post("http://127.0.0.1:8000/chat/", json={"prompt": "Hello, how are you?"})
60
+ print(response.json())
61
+ ```
62
+
63
+ ---
64
+
65
+ This README provides an overview of the project, installation instructions, usage guidelines, and an example of how to interact with the chatbot using the provided endpoints. Feel free to customize it further to suit your project's needs.
66
+ ```
67
+
68
+ You can save this content to a file named `README.md` in your project directory.
69
+
70
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference