Spaces:
Sleeping
Sleeping
Download setup.py from Divb30/network-intrusion-detection: direct link, hf CLI and curl.
- Browser
- Download file 916 Bytes
-
https://huggingface.co/spaces/Divb30/network-intrusion-detection/resolve/main/setup.py
- Command line
-
hf download hf://spaces/Divb30/network-intrusion-detection/setup.py
-
curl -L -o setup.py https://huggingface.co/spaces/Divb30/network-intrusion-detection/resolve/main/setup.py
916 Bytes
| from setuptools import find_packages,setup | |
| from typing import List | |
| def get_requirements()->List[str]: | |
| """ | |
| Thiss function will return list of requirements | |
| """ | |
| requirement_lst:List[str]=[] | |
| try: | |
| with open('requirements.txt','r') as file: | |
| #Read lines from the file | |
| lines=file.readlines() | |
| ## Process each line | |
| for line in lines: | |
| requirement=line.strip() | |
| ## ignore empty lines and -e . | |
| if requirement and requirement!= '-e .': | |
| requirement_lst.append(requirement) | |
| except FileNotFoundError: | |
| print("requirements.txt file not found") | |
| return requirement_lst | |
| setup( | |
| name="NetworkSecurity", | |
| version="0.0.1", | |
| author="Divyansh Bansal", | |
| author_email="divyanshb30@gmail.com", | |
| packages=find_packages(), | |
| install_requires=get_requirements() | |
| ) |