From 12910f3a937633a25aa0de463a6edf756f2b8cdd Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Mon, 29 Dec 2025 19:59:36 +0800 Subject: refactor: Refactor code structure for improved readability and maintainability --- .gitignore | 4 ++++ main.py | 4 ++++ pyproject.toml | 14 ++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 main.py create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index 68bc17f..60a202b 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,7 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +# uv +.python-version +uv.lock \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..de058e7 --- /dev/null +++ b/main.py @@ -0,0 +1,4 @@ +from transformers import BertTokenizer, BertModel + +tokenizer = BertTokenizer.from_pretrained("hfl/minirbt-h256") +model = BertModel.from_pretrained("hfl/minirbt-h256") \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f6fb85a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "base-model" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "torch>=2.9.1", + "transformers>=4.57.3", +] + +[[tool.uv.index]] +url = "https://mirrors.aliyun.com/pypi/simple" +default = true -- cgit v1.2.3-70-g09d2