dnnsdunca commited on
Commit
b3a805b
β€’
1 Parent(s): 1f6a5b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +191 -180
README.md CHANGED
@@ -1,180 +1,191 @@
1
- # Ddroidlabs-mixture-of-agents
2
- small agentic model designed as a coding assistant
3
-
4
- # Mixture of Agents Model (MAM) - Full-Stack Development Team
5
-
6
- ## Overview
7
-
8
- The Mixture of Agents Model (MAM) is an AI-driven full-stack development team that integrates specialized agents for front-end development, back-end development, database management, DevOps, and project management. This unified model leverages a pretrained transformer and fine-tuned datasets to handle a variety of software development tasks efficiently.
9
-
10
- ## Folder Structure
11
-
12
- ```
13
- mixture_of_agents/
14
- β”œβ”€β”€ app.py
15
- β”œβ”€β”€ colab_notebook.ipynb
16
- β”œβ”€β”€ dataset/
17
- β”‚ └── code_finetune_dataset.json
18
- β”œβ”€β”€ agents/
19
- β”‚ β”œβ”€β”€ front_end_agent.py
20
- β”‚ β”œβ”€β”€ back_end_agent.py
21
- β”‚ β”œβ”€β”€ database_agent.py
22
- β”‚ β”œβ”€β”€ devops_agent.py
23
- β”‚ └── project_management_agent.py
24
- β”œβ”€β”€ integration/
25
- β”‚ └── integration_layer.py
26
- └── model/
27
- β”œβ”€β”€ load_pretrained_model.py
28
- └── fine_tune_model.py
29
- ```
30
-
31
- ## Setup Instructions
32
-
33
- ### Prerequisites
34
-
35
- - Python 3.7 or higher
36
- - Flask
37
- - Google Colab account (for running the notebook)
38
- - Libraries: `transformers`, `datasets`, `numpy`, `pandas`
39
-
40
- ### Installation
41
-
42
- 1. **Clone the Repository:**
43
- ```bash
44
- git clone https://github.com/your-repo/mixture_of_agents.git
45
- cd mixture_of_agents
46
- ```
47
-
48
- 2. **Install Required Libraries:**
49
- ```bash
50
- pip install -r requirements.txt
51
- ```
52
-
53
- 3. **Upload to Google Drive:**
54
- - Upload the `mixture_of_agents` folder to your Google Drive.
55
-
56
- 4. **Open Colab Notebook:**
57
- - Open `colab_notebook.ipynb` in Google Colab.
58
-
59
- ### Running the Model
60
-
61
- 1. **Mount Google Drive:**
62
- - Mount your Google Drive in Colab by running the first cell of the notebook:
63
- ```python
64
- from google.colab import drive
65
- drive.mount('/content/drive')
66
- ```
67
-
68
- 2. **Install Necessary Packages:**
69
- - Install the required packages in the Colab environment:
70
- ```python
71
- !pip install transformers datasets
72
- ```
73
-
74
- 3. **Load and Fine-Tune the Model:**
75
- - Follow the steps in the Colab notebook to load the pretrained model and fine-tune it using the provided dataset:
76
- ```python
77
- from model.load_pretrained_model import load_model_and_tokenizer
78
- model, tokenizer = load_model_and_tokenizer()
79
-
80
- from model.fine_tune_model import fine_tune_model
81
- fine_tune_model(model, tokenizer, '/content/drive/MyDrive/mixture_of_agents/dataset/code_finetune_dataset.json')
82
- ```
83
-
84
- 4. **Initialize and Use the Agents:**
85
- - Initialize the agents and use the integration layer to process tasks:
86
- ```python
87
- from agents.front_end_agent import FrontEndAgent
88
- from agents.back_end_agent import BackEndAgent
89
- from agents.database_agent import DatabaseAgent
90
- from agents.devops_agent import DevOpsAgent
91
- from agents.project_management_agent import ProjectManagementAgent
92
- from integration.integration_layer import IntegrationLayer
93
-
94
- front_end_agent = FrontEndAgent(model, tokenizer)
95
- back_end_agent = BackEndAgent(model, tokenizer)
96
- database_agent = DatabaseAgent(model, tokenizer)
97
- devops_agent = DevOpsAgent(model, tokenizer)
98
- project_management_agent = ProjectManagementAgent(model, tokenizer)
99
- integration_layer = IntegrationLayer(front_end_agent, back_end_agent, database_agent, devops_agent, project_management_agent)
100
-
101
- task_data = {'task': 'Create a responsive website layout'}
102
- result = integration_layer.process_task('front_end', task_data)
103
- print(result)
104
- ```
105
-
106
- ### Running the Web Application
107
-
108
- 1. **Ensure All Agent Files and Integration Layer Are Available:**
109
- - Make sure the `agents` and `integration` directories with their respective Python files (`front_end_agent.py`, `back_end_agent.py`, `database_agent.py`, `devops_agent.py`, `project_management_agent.py`, and `integration_layer.py`) are in the same directory as `app.py`.
110
-
111
- 2. **Run the Application:**
112
- - Execute the `app.py` script to start the Flask web server:
113
- ```bash
114
- python app.py
115
- ```
116
-
117
- 3. **Using the API:**
118
- - Open your web browser and navigate to `http://127.0.0.1:5000/` to see the welcome message.
119
- - Use a tool like `curl` or Postman to send a POST request to the `/process` endpoint with JSON payload to process tasks.
120
-
121
- ### Example POST Request
122
- You can use the following example JSON payload to test the `/process` endpoint:
123
-
124
- ```json
125
- {
126
- "task_type": "front_end",
127
- "task_data": {
128
- "task": "Create a responsive website layout"
129
- }
130
- }
131
- ```
132
-
133
- **Using `curl`:**
134
- ```bash
135
- curl -X POST http://127.0.0.1:5000/process -H "Content-Type: application/json" -d '{"task_type": "front_end", "task_data": {"task": "Create a responsive website layout"}}'
136
- ```
137
-
138
- ## Agent Descriptions
139
-
140
- ### Front-End Agent
141
- - **File:** `agents/front_end_agent.py`
142
- - **Responsibilities:** UI/UX design, HTML, CSS, JavaScript frameworks (React, Vue).
143
-
144
- ### Back-End Agent
145
- - **File:** `agents/back_end_agent.py`
146
- - **Responsibilities:** Server-side logic, API development, frameworks like Node.js, Django.
147
-
148
- ### Database Agent
149
- - **File:** `agents/database_agent.py`
150
- - **Responsibilities:** Database design, query optimization, data migration.
151
-
152
- ### DevOps Agent
153
- - **File:** `agents/devops_agent.py`
154
- - **Responsibilities:** CI/CD pipelines, server management, deployment automation.
155
-
156
- ### Project Management Agent
157
- - **File:** `agents/project_management_agent.py`
158
- - **Responsibilities:** Requirement gathering, task management, progress tracking.
159
-
160
- ### Integration Layer
161
- - **File:** `integration/integration_layer.py`
162
- - **Responsibilities:** Ensures seamless communication and coordination between agents.
163
-
164
- ## Fine-Tuning Dataset
165
-
166
- ### Dataset File
167
- - **File:** `dataset/code_finetune_dataset.json`
168
- - **Description:** Contains examples of various coding tasks to fine-tune the model for development-related tasks.
169
-
170
- ## Contributing
171
-
172
- Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure your code follows the project's style guidelines and includes appropriate tests.
173
-
174
- ## License
175
-
176
- This project is licensed under the apache-2.0 License.
177
-
178
- ## Contact
179
-
180
- For any questions or issues, please open an issue on GitHub or contact the repository maintainer.
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ metrics:
6
+ - code_eval
7
+ library_name: adapter-transformers
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - code
11
+ ---
12
+ # Ddroidlabs-mixture-of-agents
13
+ small agentic model designed as a coding assistant
14
+
15
+ # Mixture of Agents Model (MAM) - Full-Stack Development Team
16
+
17
+ ## Overview
18
+
19
+ The Mixture of Agents Model (MAM) is an AI-driven full-stack development team that integrates specialized agents for front-end development, back-end development, database management, DevOps, and project management. This unified model leverages a pretrained transformer and fine-tuned datasets to handle a variety of software development tasks efficiently.
20
+
21
+ ## Folder Structure
22
+
23
+ ```
24
+ mixture_of_agents/
25
+ β”œβ”€β”€ app.py
26
+ β”œβ”€β”€ colab_notebook.ipynb
27
+ β”œβ”€β”€ dataset/
28
+ β”‚ └── code_finetune_dataset.json
29
+ β”œβ”€β”€ agents/
30
+ β”‚ β”œβ”€β”€ front_end_agent.py
31
+ β”‚ β”œβ”€β”€ back_end_agent.py
32
+ β”‚ β”œβ”€β”€ database_agent.py
33
+ β”‚ β”œβ”€β”€ devops_agent.py
34
+ β”‚ └── project_management_agent.py
35
+ β”œβ”€β”€ integration/
36
+ β”‚ └── integration_layer.py
37
+ └── model/
38
+ β”œβ”€β”€ load_pretrained_model.py
39
+ └── fine_tune_model.py
40
+ ```
41
+
42
+ ## Setup Instructions
43
+
44
+ ### Prerequisites
45
+
46
+ - Python 3.7 or higher
47
+ - Flask
48
+ - Google Colab account (for running the notebook)
49
+ - Libraries: `transformers`, `datasets`, `numpy`, `pandas`
50
+
51
+ ### Installation
52
+
53
+ 1. **Clone the Repository:**
54
+ ```bash
55
+ git clone https://github.com/your-repo/mixture_of_agents.git
56
+ cd mixture_of_agents
57
+ ```
58
+
59
+ 2. **Install Required Libraries:**
60
+ ```bash
61
+ pip install -r requirements.txt
62
+ ```
63
+
64
+ 3. **Upload to Google Drive:**
65
+ - Upload the `mixture_of_agents` folder to your Google Drive.
66
+
67
+ 4. **Open Colab Notebook:**
68
+ - Open `colab_notebook.ipynb` in Google Colab.
69
+
70
+ ### Running the Model
71
+
72
+ 1. **Mount Google Drive:**
73
+ - Mount your Google Drive in Colab by running the first cell of the notebook:
74
+ ```python
75
+ from google.colab import drive
76
+ drive.mount('/content/drive')
77
+ ```
78
+
79
+ 2. **Install Necessary Packages:**
80
+ - Install the required packages in the Colab environment:
81
+ ```python
82
+ !pip install transformers datasets
83
+ ```
84
+
85
+ 3. **Load and Fine-Tune the Model:**
86
+ - Follow the steps in the Colab notebook to load the pretrained model and fine-tune it using the provided dataset:
87
+ ```python
88
+ from model.load_pretrained_model import load_model_and_tokenizer
89
+ model, tokenizer = load_model_and_tokenizer()
90
+
91
+ from model.fine_tune_model import fine_tune_model
92
+ fine_tune_model(model, tokenizer, '/content/drive/MyDrive/mixture_of_agents/dataset/code_finetune_dataset.json')
93
+ ```
94
+
95
+ 4. **Initialize and Use the Agents:**
96
+ - Initialize the agents and use the integration layer to process tasks:
97
+ ```python
98
+ from agents.front_end_agent import FrontEndAgent
99
+ from agents.back_end_agent import BackEndAgent
100
+ from agents.database_agent import DatabaseAgent
101
+ from agents.devops_agent import DevOpsAgent
102
+ from agents.project_management_agent import ProjectManagementAgent
103
+ from integration.integration_layer import IntegrationLayer
104
+
105
+ front_end_agent = FrontEndAgent(model, tokenizer)
106
+ back_end_agent = BackEndAgent(model, tokenizer)
107
+ database_agent = DatabaseAgent(model, tokenizer)
108
+ devops_agent = DevOpsAgent(model, tokenizer)
109
+ project_management_agent = ProjectManagementAgent(model, tokenizer)
110
+ integration_layer = IntegrationLayer(front_end_agent, back_end_agent, database_agent, devops_agent, project_management_agent)
111
+
112
+ task_data = {'task': 'Create a responsive website layout'}
113
+ result = integration_layer.process_task('front_end', task_data)
114
+ print(result)
115
+ ```
116
+
117
+ ### Running the Web Application
118
+
119
+ 1. **Ensure All Agent Files and Integration Layer Are Available:**
120
+ - Make sure the `agents` and `integration` directories with their respective Python files (`front_end_agent.py`, `back_end_agent.py`, `database_agent.py`, `devops_agent.py`, `project_management_agent.py`, and `integration_layer.py`) are in the same directory as `app.py`.
121
+
122
+ 2. **Run the Application:**
123
+ - Execute the `app.py` script to start the Flask web server:
124
+ ```bash
125
+ python app.py
126
+ ```
127
+
128
+ 3. **Using the API:**
129
+ - Open your web browser and navigate to `http://127.0.0.1:5000/` to see the welcome message.
130
+ - Use a tool like `curl` or Postman to send a POST request to the `/process` endpoint with JSON payload to process tasks.
131
+
132
+ ### Example POST Request
133
+ You can use the following example JSON payload to test the `/process` endpoint:
134
+
135
+ ```json
136
+ {
137
+ "task_type": "front_end",
138
+ "task_data": {
139
+ "task": "Create a responsive website layout"
140
+ }
141
+ }
142
+ ```
143
+
144
+ **Using `curl`:**
145
+ ```bash
146
+ curl -X POST http://127.0.0.1:5000/process -H "Content-Type: application/json" -d '{"task_type": "front_end", "task_data": {"task": "Create a responsive website layout"}}'
147
+ ```
148
+
149
+ ## Agent Descriptions
150
+
151
+ ### Front-End Agent
152
+ - **File:** `agents/front_end_agent.py`
153
+ - **Responsibilities:** UI/UX design, HTML, CSS, JavaScript frameworks (React, Vue).
154
+
155
+ ### Back-End Agent
156
+ - **File:** `agents/back_end_agent.py`
157
+ - **Responsibilities:** Server-side logic, API development, frameworks like Node.js, Django.
158
+
159
+ ### Database Agent
160
+ - **File:** `agents/database_agent.py`
161
+ - **Responsibilities:** Database design, query optimization, data migration.
162
+
163
+ ### DevOps Agent
164
+ - **File:** `agents/devops_agent.py`
165
+ - **Responsibilities:** CI/CD pipelines, server management, deployment automation.
166
+
167
+ ### Project Management Agent
168
+ - **File:** `agents/project_management_agent.py`
169
+ - **Responsibilities:** Requirement gathering, task management, progress tracking.
170
+
171
+ ### Integration Layer
172
+ - **File:** `integration/integration_layer.py`
173
+ - **Responsibilities:** Ensures seamless communication and coordination between agents.
174
+
175
+ ## Fine-Tuning Dataset
176
+
177
+ ### Dataset File
178
+ - **File:** `dataset/code_finetune_dataset.json`
179
+ - **Description:** Contains examples of various coding tasks to fine-tune the model for development-related tasks.
180
+
181
+ ## Contributing
182
+
183
+ Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure your code follows the project's style guidelines and includes appropriate tests.
184
+
185
+ ## License
186
+
187
+ This project is licensed under the apache-2.0 License.
188
+
189
+ ## Contact
190
+
191
+ For any questions or issues, please open an issue on GitHub or contact the repository maintainer.