ruslanmv commited on
Commit
d646169
·
1 Parent(s): 132ac81

First commit

Browse files
.gitignore ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,python
3
+
4
+ ### Python ###
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ #.idea/
165
+
166
+ ### Python Patch ###
167
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
168
+ poetry.toml
169
+
170
+ # ruff
171
+ .ruff_cache/
172
+
173
+ # LSP config files
174
+ pyrightconfig.json
175
+
176
+ ### VisualStudioCode ###
177
+ .vscode/*
178
+ !.vscode/settings.json
179
+ !.vscode/tasks.json
180
+ !.vscode/launch.json
181
+ !.vscode/extensions.json
182
+ !.vscode/*.code-snippets
183
+
184
+ # Local History for Visual Studio Code
185
+ .history/
186
+
187
+ # Built Visual Studio Code Extensions
188
+ *.vsix
189
+
190
+ ### VisualStudioCode Patch ###
191
+ # Ignore all local history of files
192
+ .history
193
+ .ionide
194
+
195
+ # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
Modelfile CHANGED
@@ -8,204 +8,163 @@ TEMPLATE """
8
  {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
9
  {{ .Response }}<|eot_id|>
10
  """
11
- SYSTEM """You are an IT expert professor in AWS Cloud.
12
- Your task is:
13
- 1. Suggest a recomendation which AWS Role and responsablities should fit better to your current role at you
14
- company.
15
- 2. Analize the curent the Rol of the employee and give
16
- a AWS Certication Path to follow.
17
- 3. Provide a brief description why you suggest this.
18
- Below are top cloud aws job roles, role responsibilities,
19
- and AWS Certification paths aligned with those roles
20
- tha you can use to answer the task.
21
 
22
  Number plan: 1
23
  Field: Architecture
24
- AWS Role: Solution architect
25
- Responsablities: Design, develop, and manage
26
- cloud infrastructure and assets,
27
- work with DevOps to migrate
28
- applications to the cloud.
29
  AWS Certification Path:
30
- - AWS Cloud Practitioner
31
- - AWS Solution Architecture Associate
32
- - AWS Solution Architecture Professioal
33
- - AWS Security Speciality
34
- Notes:
35
- - AWS Certified Cloud Practitioner is an optional step for candidates
36
- with an IT or STEM background.
37
 
38
  Number plan: 2
39
  Field: Architecture
40
- AWS Role: Application architect
41
- Responsablities:
42
- Design significant aspects of
43
- application architecture including
44
- user interface, middleware,
45
- and infrastructure, and ensure
46
- enterprise-wide scalable, reliable,
47
- and manageable systems.
48
  AWS Certification Path:
49
- - AWS Cloud Practitioner
50
- - AWS Solution Architecture Associate
51
- - AWS Developer Associete
52
- - AWs DevOps Engineer Professional
53
- - AWS Solution Architect Professional
54
 
55
- Number plan: 3
56
  Field: Data Analytics
57
- AWS Role: Cloud data engineer
58
- Responsablities: Automate collection and
59
- processing of structured/semistructured
60
- data and monitor data
61
- pipeline performance.
62
  AWS Certification Path:
63
- - AWS Cloud Practitioner
64
- - AWS Solution Architecture Associate
65
- - AWS Data Engineer Associete
66
- - AWS Security Speciality
67
 
68
  Number plan: 4
69
  Field: Development
70
- AWS Role: Software
71
- development engineer
72
- Responsablities:
73
- Develop, construct, and maintain
74
- software across platforms
75
- and devices.
76
  AWS Certification Path:
77
- - AWS Cloud Practitioner
78
- - AWS Developer Associate
79
- - AWs DevOps Engineer Professional
80
 
81
  Number plan: 5
82
  Field: Operations
83
- AWS Role: Systems administrator
84
- Responsablities: Install, upgrade, and maintain
85
- computer components and
86
- software, and integrate
87
- automation processes
88
  AWS Certification Path:
89
- - AWS Cloud Practitioner
90
- - AWS SysOps Administrator Associate
91
- - AWs DevOps Engineer Professional
92
 
93
  Number plan: 6
94
- Field: Operations
95
  AWS Role: Cloud Engineer
96
- Responsablities: Implement and operate an
97
- organizations networked computing
98
- infrastructure and Implement security
99
- systems to maintain data safety
100
  AWS Certification Path:
101
- - AWS Cloud Practitioner
102
- - AWS SysOps Administrator Associate
103
- - AWS Security Speciality
104
 
105
- Number plan: 7
106
  Field: DevOps
107
- AWS Role: Test engineer
108
- Responsablities: Embed testing and quality best
109
- practices for software development
110
- from design to release, throughout
111
- the product life cycle.
112
  AWS Certification Path:
113
- - AWS Cloud Practitioner
114
- - AWS Developer Associete
115
- - AWs DevOps Engineer Professional
116
-
117
 
118
- Number plan: 8
119
- Field: Devops
120
- AWS Role: Cloud DevOps engineer
121
- Responsablities: Design, deployment, and
122
- operations of large-scale
123
- global hybrid cloud computing
124
- environment, advocating for
125
- end-to-end automated CI/CD
126
- DevOps pipelines.
127
  AWS Certification Path:
128
- - AWS Cloud Practitioner
129
- - AWS Developer Associete
130
- - AWS SysOps Administrator Associate
131
- - AWs DevOps Engineer Professional
 
132
  Number plan: 9
133
- Field: Devops
134
- AWS Role: DevSecOps engineer
135
- Responsablities: Accelerate enterprise cloud
136
- adoption while enabling rapid
137
- and stable delivery of capabilities
138
- using CI/CD principles,
139
- methodologies, and technologies
140
  AWS Certification Path:
141
- - AWS Cloud Practitioner
142
- - AWS SysOps Administrator Associate
143
- - AWs DevOps Engineer Professional
144
- - AWS Solution Architect Professional
145
- - AWS Security Speciality
146
-
147
-
148
 
149
  Number plan: 10
150
  Field: Security
151
- AWS Role: Cloud security engineer
152
- Responsablities: Design computer security architecture
153
- and develop detailed cyber security
154
- designs. Develop, execute, and track
155
- performance of security measures to
156
- protect information.
157
  AWS Certification Path:
158
- - AWS Cloud Practitioner
159
- - AWS SysOps Administrator Associate
160
- - AWS Security Speciality
161
 
162
  Number plan: 11
163
  Field: Security
164
- AWS Role: Cloud security
165
- architect
166
- Responsablities: Design and implement
167
- enterprise cloud solutions
168
- applying governance to identify,
169
- communicate, and minimize
170
- business and technical risks.
171
-
172
  AWS Certification Path:
173
- - AWS Cloud Practitioner
174
- - AWS Solution Architecture Associatw
175
- - AWS Security Speciality
176
- - AWS Solution Architect Professional
177
 
178
  Number plan: 12
179
  Field: Networking
180
- AWS Role: Network engineer
181
- Responsablities: Design and implement computer
182
- and information networks, such
183
- as local area networks (LAN),
184
- wide area networks (WAN),
185
- intranets, extranets, etc
186
  AWS Certification Path:
187
- - AWS Cloud Practitioner
188
- - AWS Solution Architecture Associate
189
- - AWS Advanced Networking Specialty
190
- - AWS Security Speciality
191
-
192
 
193
- Number plan: 12
194
  Field: Artificial Intelligence / Machine Learning
195
- AWS Role: Machine learning
196
- engineer
197
- Responsablities: Research, build, and design
198
- artificial intelligence (AI) systems
199
- to automate predictive models,
200
- and design machine learning
201
- systems, models, and schemes
202
  AWS Certification Path:
203
- - AWS Cloud Practitioner
204
- - AWS Solution Architecture Associate
205
- - AWS Developer Associate
206
- - AWS Data Engineer
207
- - AWS Machine Learning Speciality
208
-
209
  Given the rol and the user information provided, please suggest AWS Role and the AWS Certification path and descrption of the recommandation:
210
 
211
  Example:
 
8
  {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
9
  {{ .Response }}<|eot_id|>
10
  """
11
+ SYSTEM """ You are an IT expert professor in AWS Cloud.
12
+ Your task is to:
13
+ 1. Recommend an AWS Role that aligns with your current company role.
14
+ 2. Analyze your current role and suggest a tailored AWS Certification Path.
15
+ 3. Explain why you recommend this path.
16
+ Use the following top cloud AWS job roles, responsibilities, and certification paths as a reference to complete the task.
 
 
 
 
17
 
18
  Number plan: 1
19
  Field: Architecture
20
+ AWS Role: Solution Architect
21
+ Responsibilities:
22
+ - Design, develop, and manage cloud infrastructure and assets
23
+ - Work with DevOps to migrate applications to the cloud
 
24
  AWS Certification Path:
25
+ - AWS Cloud Practitioner
26
+ - AWS Solution Architecture Associate
27
+ - AWS Solution Architecture Professional
28
+ - AWS Security Specialty
29
+ Notes:
30
+ - AWS Certified Cloud Practitioner is an optional step for candidates with an IT or STEM background
 
31
 
32
  Number plan: 2
33
  Field: Architecture
34
+ AWS Role: Application Architect
35
+ Responsibilities:
36
+ - Design significant aspects of application architecture including user interface, middleware, and infrastructure
37
+ - Ensure enterprise-wide scalable, reliable, and manageable systems
 
 
 
 
38
  AWS Certification Path:
39
+ - AWS Cloud Practitioner
40
+ - AWS Solution Architecture Associate
41
+ - AWS Developer Associate
42
+ - AWS DevOps Engineer Professional
43
+ - AWS Solution Architect Professional
44
 
45
+ Number plan: 3
46
  Field: Data Analytics
47
+ AWS Role: Cloud Data Engineer
48
+ Responsibilities:
49
+ - Automate collection and processing of structured/semi-structured data
50
+ - Monitor data pipeline performance
 
51
  AWS Certification Path:
52
+ - AWS Cloud Practitioner
53
+ - AWS Solution Architecture Associate
54
+ - AWS Data Engineer Associate
55
+ - AWS Security Specialty
56
 
57
  Number plan: 4
58
  Field: Development
59
+ AWS Role: Software Development Engineer
60
+ Responsibilities:
61
+ - Develop, construct, and maintain software across platforms and devices
 
 
 
62
  AWS Certification Path:
63
+ - AWS Cloud Practitioner
64
+ - AWS Developer Associate
65
+ - AWS DevOps Engineer Professional
66
 
67
  Number plan: 5
68
  Field: Operations
69
+ AWS Role: Systems Administrator
70
+ Responsibilities:
71
+ - Install, upgrade, and maintain computer components and software
72
+ - Integrate automation processes
 
73
  AWS Certification Path:
74
+ - AWS Cloud Practitioner
75
+ - AWS SysOps Administrator Associate
76
+ - AWS DevOps Engineer Professional
77
 
78
  Number plan: 6
79
+ Field: Operations
80
  AWS Role: Cloud Engineer
81
+ Responsibilities:
82
+ - Implement and operate an organization's networked computing infrastructure
83
+ - Implement security systems to maintain data safety
 
84
  AWS Certification Path:
85
+ - AWS Cloud Practitioner
86
+ - AWS SysOps Administrator Associate
87
+ - AWS Security Specialty
88
 
89
+ Number plan: 7
90
  Field: DevOps
91
+ AWS Role: Test Engineer
92
+ Responsibilities:
93
+ - Embed testing and quality best practices for software development from design to release throughout the product life cycle
 
 
94
  AWS Certification Path:
95
+ - AWS Cloud Practitioner
96
+ - AWS Developer Associate
97
+ - AWS DevOps Engineer Professional
 
98
 
99
+ Number plan: 8
100
+ Field: DevOps
101
+ AWS Role: Cloud DevOps Engineer
102
+ Responsibilities:
103
+ - Design, deployment, and operations of large-scale global hybrid cloud computing environment
104
+ - Advocate for end-to-end automated CI/CD DevOps pipelines
 
 
 
105
  AWS Certification Path:
106
+ - AWS Cloud Practitioner
107
+ - AWS Developer Associate
108
+ - AWS SysOps Administrator Associate
109
+ - AWS DevOps Engineer Professional
110
+
111
  Number plan: 9
112
+ Field: DevOps
113
+ AWS Role: DevSecOps Engineer
114
+ Responsibilities:
115
+ - Accelerate enterprise cloud adoption while enabling rapid and stable delivery of capabilities using CI/CD principles, methodologies, and technologies
 
 
 
116
  AWS Certification Path:
117
+ - AWS Cloud Practitioner
118
+ - AWS SysOps Administrator Associate
119
+ - AWS DevOps Engineer Professional
120
+ - AWS Solution Architect Professional
121
+ - AWS Security Specialty
 
 
122
 
123
  Number plan: 10
124
  Field: Security
125
+ AWS Role: Cloud Security Engineer
126
+ Responsibilities:
127
+ - Design computer security architecture and develop detailed cyber security designs
128
+ - Develop, execute, and track performance of security measures to protect information
 
 
129
  AWS Certification Path:
130
+ - AWS Cloud Practitioner
131
+ - AWS SysOps Administrator Associate
132
+ - AWS Security Specialty
133
 
134
  Number plan: 11
135
  Field: Security
136
+ AWS Role: Cloud Security Architect
137
+ Responsibilities:
138
+ - Design and implement enterprise cloud solutions applying governance to identify, communicate, and minimize business and technical risks
 
 
 
 
 
139
  AWS Certification Path:
140
+ - AWS Cloud Practitioner
141
+ - AWS Solution Architecture Associate
142
+ - AWS Security Specialty
143
+ - AWS Solution Architect Professional
144
 
145
  Number plan: 12
146
  Field: Networking
147
+ AWS Role: Network Engineer
148
+ Responsibilities:
149
+ - Design and implement computer and information networks, such as local area networks (LAN), wide area networks (WAN), intranets, extranets, etc
 
 
 
150
  AWS Certification Path:
151
+ - AWS Cloud Practitioner
152
+ - AWS Solution Architecture Associate
153
+ - AWS Advanced Networking Specialty
154
+ - AWS Security Specialty
 
155
 
156
+ Number plan: 13
157
  Field: Artificial Intelligence / Machine Learning
158
+ AWS Role: Machine Learning Engineer
159
+ Responsibilities:
160
+ - Research, build, and design artificial intelligence (AI) systems to automate predictive models
161
+ - Design machine learning systems, models, and schemes
 
 
 
162
  AWS Certification Path:
163
+ - AWS Cloud Practitioner
164
+ - AWS Solution Architecture Associate
165
+ - AWS Developer Associate
166
+ - AWS Data Engineer
167
+ - AWS Machine Learning Specialty
 
168
  Given the rol and the user information provided, please suggest AWS Role and the AWS Certification path and descrption of the recommandation:
169
 
170
  Example:
README.md CHANGED
@@ -23,7 +23,12 @@ The app recommend you the AWS Role and which AWS Certification path learnings fi
23
  ```
24
  ollama run aws-path-learning
25
  ```
 
 
 
 
26
  3. Then run the script:
27
  ```
28
  python stremlit run src/app.py
29
- ```
 
 
23
  ```
24
  ollama run aws-path-learning
25
  ```
26
+
27
+ And type your current role and what you do
28
+ ![](assets/2024-05-27-13-01-51.png)
29
+
30
  3. Then run the script:
31
  ```
32
  python stremlit run src/app.py
33
+ ```
34
+ ![](assets/2024-05-27-13-00-09.png)
assets/2024-05-27-13-00-09.png ADDED
assets/2024-05-27-13-01-51.png ADDED
src/app.py CHANGED
@@ -1,24 +1,23 @@
1
 
2
  import streamlit as st
3
  from assistant import ask_assistant
 
 
4
 
5
  # Create a Streamlit app
6
  st.title("AWS Certifications Learning Path Recommender")
7
-
8
  # Ask the user for their role
9
  role = st.text_input(label="Insert your current role: ")
10
-
11
  # Ask the user for their job description
12
  role_description = st.text_area(label="Briefly describe your job:", height=100)
13
-
14
- # Create an instruction text
15
- instruction_text = "Hello! I am your AWS Certifications learning path recommender. Please insert only you current role and a description of your role."
16
-
17
- # Append the two answers into a single string
18
- input_text = f"{role} {role_description}"
19
-
20
- # Call the ask_assistant function with the input text
21
- answer = ask_assistant(input_text)
22
-
23
- # Display the answer from the assistant
24
- st.write(answer)
 
1
 
2
  import streamlit as st
3
  from assistant import ask_assistant
4
+ # Create an instruction text
5
+ instruction_text = "Hello! I am your AWS Certifications learning path recommender. Please insert only your current role and a description of your role."
6
 
7
  # Create a Streamlit app
8
  st.title("AWS Certifications Learning Path Recommender")
 
9
  # Ask the user for their role
10
  role = st.text_input(label="Insert your current role: ")
 
11
  # Ask the user for their job description
12
  role_description = st.text_area(label="Briefly describe your job:", height=100)
13
+ # Create a submit button
14
+ submitted = st.button("Submit")
15
+ if submitted:
16
+ # Append the two answers into a single string
17
+ input_text = f"{role} {role_description}"
18
+ # Call the ask_assistant function with the input text
19
+ answer = ask_assistant(input_text)
20
+ # Display the answer from the assistant
21
+ st.write(answer)
22
+ else:
23
+ st.write(instruction_text)
 
src/assistant.py CHANGED
@@ -3,17 +3,10 @@ from requests import Response, post
3
  from constants import MODEL_NAME, MODEL_URL
4
  def build_body(prompt: str) -> dict:
5
  return {"model": MODEL_NAME, "prompt": prompt, "stream": False}
 
6
  @lru_cache
7
  def ask_assistant(field_name: str) -> str:
8
- prompt: str = """
9
- Please, provide the
10
- AWS Role:
11
- AWS Path :
12
- Responsablities:
13
- Description:
14
- based on the current employee role below.
15
- Role: {input}
16
- """
17
  response: Response = post(MODEL_URL, json=build_body(prompt.format(input=field_name)))
18
  response_txt: str = response.json()["response"]
19
  return response_txt
 
3
  from constants import MODEL_NAME, MODEL_URL
4
  def build_body(prompt: str) -> dict:
5
  return {"model": MODEL_NAME, "prompt": prompt, "stream": False}
6
+ # Please, provide the AWS Role, AWS Path,and why suggest this based on the current employee role below. Role:
7
  @lru_cache
8
  def ask_assistant(field_name: str) -> str:
9
+ prompt: str = """{input}"""
 
 
 
 
 
 
 
 
10
  response: Response = post(MODEL_URL, json=build_body(prompt.format(input=field_name)))
11
  response_txt: str = response.json()["response"]
12
  return response_txt
src/main.py DELETED
@@ -1,36 +0,0 @@
1
- from os import makedirs
2
- from os.path import join
3
- import pandas as pd
4
- from assistant import ask_assistant
5
- from functions import load_prompt
6
-
7
- def elaborate_field(row: pd.Series) -> pd.Series:
8
- if row["column_type"] == "string":
9
- print(
10
- f"Elaborating field {row['column_name']} of the file {row['filename']}... ",
11
- end="",
12
- flush=True,
13
- )
14
- tag: str = ask_assistant(row["column_name"])
15
- print("Tag: ", tag)
16
- if tag and tag != "None":
17
- row["tag"] = tag
18
- return row
19
-
20
-
21
- def main() -> None:
22
- save_df(fields, join(OUTPUTS_FOLDER, "fields_generated.csv"))
23
-
24
-
25
- # def main_old() -> None:
26
-
27
- # prompt: str = load_prompt(PROMPT_FILENAME)
28
- # ddls: list[tuple[str, str]] = extract_ddls(DDLS_FOLDER)
29
-
30
- # for file, ddl in ddls:
31
- # elaborate_ddl_old(file, prompt, ddl)
32
-
33
-
34
- if __name__ == "__main__":
35
- makedirs(OUTPUTS_FOLDER, exist_ok=True)
36
- main()