AurelioAguirre commited on
Commit
526ff2e
Β·
1 Parent(s): 8083005

added readme

Browse files
Files changed (1) hide show
  1. README.md +133 -0
README.md CHANGED
@@ -8,3 +8,136 @@ pinned: false
8
  ---
9
 
10
  # LLM Server
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
  # LLM Server
11
+
12
+ This repository contains a FastAPI-based server that serves open-source Large Language Models from Hugging Face.
13
+
14
+ ## Getting Started
15
+
16
+ These instructions will help you set up and run the project on your local machine.
17
+
18
+ ### Prerequisites
19
+
20
+ - Python 3.10 or higher
21
+ - Git
22
+
23
+ ### Cloning the Repository
24
+
25
+ Choose one of the following methods to clone the repository:
26
+
27
+ #### HTTPS
28
+ ```bash
29
+ git clone https://huggingface.co/spaces/TeamGenKI/LLMServer
30
+ cd project-name
31
+ ```
32
+
33
+ #### SSH
34
+ ```bash
35
+ git clone git@hf.co:spaces/TeamGenKI/LLMServer
36
+ cd project-name
37
+ ```
38
+
39
+ ### Setting Up the Virtual Environment
40
+
41
+ #### Windows
42
+ ```bash
43
+ # Create virtual environment
44
+ python -m venv myenv
45
+
46
+ # Activate virtual environment
47
+ myenv\Scripts\activate
48
+
49
+ # Install dependencies
50
+ pip install -r requirements.txt
51
+ ```
52
+
53
+ #### Linux
54
+ ```bash
55
+ # Create virtual environment
56
+ python -m venv myenv
57
+
58
+ # Activate virtual environment
59
+ source myenv/bin/activate
60
+
61
+ # Install dependencies
62
+ pip install -r requirements.txt
63
+ ```
64
+
65
+ #### macOS
66
+ ```bash
67
+ # Create virtual environment
68
+ python3 -m venv myenv
69
+
70
+ # Activate virtual environment
71
+ source myenv/bin/activate
72
+
73
+ # Install dependencies
74
+ pip3 install -r requirements.txt
75
+ ```
76
+
77
+ ### Running the Application
78
+
79
+ Once you have set up your environment and installed the dependencies, you can start the FastAPI application:
80
+
81
+ ```bash
82
+ uvicorn main.app:app --reload
83
+ ```
84
+
85
+ The API will be available at `http://localhost:8001`
86
+
87
+ ### API Documentation
88
+
89
+ Once the application is running, you can access:
90
+ - Interactive API documentation (Swagger UI) at `http://localhost:8000/docs`
91
+ - Alternative API documentation (ReDoc) at `http://localhost:8000/redoc`
92
+
93
+ ### Deactivating the Virtual Environment
94
+
95
+ When you're done working on the project, you can deactivate the virtual environment:
96
+
97
+ ```bash
98
+ deactivate
99
+ ```
100
+
101
+ ## Contributing
102
+
103
+ [Add contributing guidelines here]
104
+
105
+ ## License
106
+
107
+ [Add license information here]
108
+
109
+ ## Project Structure
110
+
111
+ ```
112
+ .
113
+ β”œβ”€β”€ Dockerfile
114
+ β”œβ”€β”€ main
115
+ β”‚ β”œβ”€β”€ api.py
116
+ β”‚ β”œβ”€β”€ app.py
117
+ β”‚ β”œβ”€β”€ config.yaml
118
+ β”‚ β”œβ”€β”€ env_template
119
+ β”‚ β”œβ”€β”€ __init__.py
120
+ β”‚ β”œβ”€β”€ logs
121
+ β”‚ β”‚ └── llm_api.log
122
+ β”‚ β”œβ”€β”€ models
123
+ β”‚ β”œβ”€β”€ __pycache__
124
+ β”‚ β”‚ β”œβ”€β”€ api.cpython-39.pyc
125
+ β”‚ β”‚ β”œβ”€β”€ app.cpython-39.pyc
126
+ β”‚ β”‚ β”œβ”€β”€ __init__.cpython-39.pyc
127
+ β”‚ β”‚ └── routes.cpython-39.pyc
128
+ β”‚ β”œβ”€β”€ routes.py
129
+ β”‚ β”œβ”€β”€ test_locally.py
130
+ β”‚ └── utils
131
+ β”‚ β”œβ”€β”€ errors.py
132
+ β”‚ β”œβ”€β”€ helpers.py
133
+ β”‚ β”œβ”€β”€ __init__.py
134
+ β”‚ β”œβ”€β”€ logging.py
135
+ β”‚ β”œβ”€β”€ __pycache__
136
+ β”‚ β”‚ β”œβ”€β”€ helpers.cpython-39.pyc
137
+ β”‚ β”‚ β”œβ”€β”€ __init__.cpython-39.pyc
138
+ β”‚ β”‚ β”œβ”€β”€ logging.cpython-39.pyc
139
+ β”‚ β”‚ └── validation.cpython-39.pyc
140
+ β”‚ └── validation.py
141
+ β”œβ”€β”€ README.md
142
+ └── requirements.txt
143
+ ```