aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2025-12-29 19:59:36 +0800
committerHsiangNianian <i@jyunko.cn>2025-12-29 19:59:36 +0800
commit12910f3a937633a25aa0de463a6edf756f2b8cdd (patch)
tree96d715856d9fbc85dd23525d5596b21ff887f17a
parent2f4904f6dbd34a492a7783c037db85237588ae06 (diff)
downloadbase-model-12910f3a937633a25aa0de463a6edf756f2b8cdd.tar.gz
base-model-12910f3a937633a25aa0de463a6edf756f2b8cdd.zip
refactor: Refactor code structure for improved readability and maintainability
-rw-r--r--.gitignore4
-rw-r--r--main.py4
-rw-r--r--pyproject.toml14
3 files changed, 22 insertions, 0 deletions
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