hakim commited on
Commit
ca2e56b
1 Parent(s): 581e5e4

project template and requirements added

Browse files
.github/workflows/.gitkeep ADDED
File without changes
Dockerfile ADDED
File without changes
app.py ADDED
File without changes
config/config.yaml ADDED
File without changes
main.py ADDED
File without changes
params.yaml ADDED
File without changes
requirements.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ transformers
2
+ transformers[sentencepiece]
3
+ datasets
4
+ sacrebleu
5
+ rouge_score
6
+ py7zr
7
+ pandas
8
+ nltk
9
+ tqdm
10
+ PyYAML
11
+ matplotlib
12
+ torch
13
+ notebook
14
+ boto3
15
+ mypy-boto3-s3
16
+ python-box==6.0.2
17
+ ensure==1.0.2
18
+ fastapi==0.78.0
19
+ uvicorn==0.18.3
20
+ Jinja2==3.1.2
21
+ -e .
research/trials.ipynb ADDED
File without changes
setup.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import setuptools
2
+
3
+ with open("README.md", "r", encoding="utf-8") as f:
4
+ long_description = f.read()
5
+
6
+
7
+ __version__ = "0.0.0"
8
+
9
+ REPO_NAME = "text-summarization"
10
+ AUTHOR_USER_NAME = "HAKIM-ML"
11
+ SRC_REPO = "textsummarizer"
12
+ AUTHOR_EMAIL = "akborislamamir5555@gmail.com"
13
+
14
+
15
+
16
+ setuptools.setup(
17
+ name=SRC_REPO,
18
+ version=__version__,
19
+ author=AUTHOR_USER_NAME,
20
+ author_email=AUTHOR_EMAIL,
21
+ description="A small python package for NLP app",
22
+ long_description=long_description,
23
+ long_description_content="text/markdown",
24
+ url=f"https://github.com/{AUTHOR_USER_NAME}/{REPO_NAME}",
25
+ project_urls={
26
+ "Bug Tracker": f"https://github.com/{AUTHOR_USER_NAME}/{REPO_NAME}/issues",
27
+ },
28
+ package_dir={"": "src"},
29
+ packages=setuptools.find_packages(where="src")
30
+ )
src/textsummarizer/__init__.py ADDED
File without changes
src/textsummarizer/config/__init__.py ADDED
File without changes
src/textsummarizer/config/configuration.py ADDED
File without changes
src/textsummarizer/conponents/__init__.py ADDED
File without changes
src/textsummarizer/constants/__init__.py ADDED
File without changes
src/textsummarizer/entity/__init__.py ADDED
File without changes
src/textsummarizer/logging/__init__.py ADDED
File without changes
src/textsummarizer/pipeline/__init__.py ADDED
File without changes
src/textsummarizer/utils/__init__.py ADDED
File without changes
src/textsummarizer/utils/common.py ADDED
File without changes
template.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from pathlib import Path
3
+ import logging
4
+
5
+ logging.basicConfig(level=logging.INFO, format='[%(asctime)s]: %(message)s:')
6
+
7
+
8
+ project_name = "textsummarizer"
9
+
10
+ list_of_files = [
11
+ ".github/workflows/.gitkeep",
12
+ f"src/{project_name}/__init__.py",
13
+ f"src/{project_name}/conponents/__init__.py",
14
+ f"src/{project_name}/utils/__init__.py",
15
+ f"src/{project_name}/utils/common.py",
16
+ f"src/{project_name}/logging/__init__.py",
17
+ f"src/{project_name}/config/__init__.py",
18
+ f"src/{project_name}/config/configuration.py",
19
+ f"src/{project_name}/pipeline/__init__.py",
20
+ f"src/{project_name}/entity/__init__.py",
21
+ f"src/{project_name}/constants/__init__.py",
22
+ "config/config.yaml",
23
+ "params.yaml",
24
+ "app.py",
25
+ "main.py",
26
+ "Dockerfile",
27
+ "requirements.txt",
28
+ "setup.py",
29
+ "research/trials.ipynb",
30
+
31
+ ]
32
+
33
+
34
+ for filepath in list_of_files:
35
+ filepath = Path(filepath)
36
+ filedir, filename = os.path.split(filepath)
37
+
38
+ if filedir != "":
39
+ os.makedirs(filedir, exist_ok=True)
40
+ logging.info(f"Creating directory:{filedir} for the file {filename}")
41
+
42
+
43
+ if (not os.path.exists(filepath)) or (os.path.getsize(filepath) == 0):
44
+ with open(filepath,'w') as f:
45
+ pass
46
+ logging.info(f"Creating empty file: {filepath}")
47
+
48
+
49
+
50
+ else:
51
+ logging.info(f"{filename} is already exists")
52
+