{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceId":8630177,"sourceType":"datasetVersion","datasetId":5167299}],"dockerImageVersionId":30733,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!pip install sentence_transformers","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-06-07T09:20:34.508067Z","iopub.execute_input":"2024-06-07T09:20:34.508357Z","iopub.status.idle":"2024-06-07T09:20:48.498196Z","shell.execute_reply.started":"2024-06-07T09:20:34.508331Z","shell.execute_reply":"2024-06-07T09:20:48.497131Z"},"trusted":true},"execution_count":1,"outputs":[{"name":"stdout","text":"Collecting sentence_transformers\n Downloading sentence_transformers-3.0.0-py3-none-any.whl.metadata (10 kB)\nRequirement already satisfied: transformers<5.0.0,>=4.34.0 in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (4.41.2)\nRequirement already satisfied: tqdm in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (4.66.4)\nRequirement already satisfied: torch>=1.11.0 in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (2.1.2)\nRequirement already satisfied: numpy in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (1.26.4)\nRequirement already satisfied: scikit-learn in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (1.2.2)\nRequirement already satisfied: scipy in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (1.11.4)\nRequirement already satisfied: huggingface-hub>=0.15.1 in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (0.23.2)\nRequirement already satisfied: Pillow in /opt/conda/lib/python3.10/site-packages (from sentence_transformers) (9.5.0)\nRequirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (3.13.1)\nRequirement already satisfied: fsspec>=2023.5.0 in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (2024.3.1)\nRequirement already satisfied: packaging>=20.9 in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (21.3)\nRequirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (6.0.1)\nRequirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (2.32.3)\nRequirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.15.1->sentence_transformers) (4.9.0)\nRequirement already satisfied: sympy in /opt/conda/lib/python3.10/site-packages (from torch>=1.11.0->sentence_transformers) (1.12.1)\nRequirement already satisfied: networkx in /opt/conda/lib/python3.10/site-packages (from torch>=1.11.0->sentence_transformers) (3.2.1)\nRequirement already satisfied: jinja2 in /opt/conda/lib/python3.10/site-packages (from torch>=1.11.0->sentence_transformers) (3.1.2)\nRequirement already satisfied: regex!=2019.12.17 in /opt/conda/lib/python3.10/site-packages (from transformers<5.0.0,>=4.34.0->sentence_transformers) (2023.12.25)\nRequirement already satisfied: tokenizers<0.20,>=0.19 in /opt/conda/lib/python3.10/site-packages (from transformers<5.0.0,>=4.34.0->sentence_transformers) (0.19.1)\nRequirement already satisfied: safetensors>=0.4.1 in /opt/conda/lib/python3.10/site-packages (from transformers<5.0.0,>=4.34.0->sentence_transformers) (0.4.3)\nRequirement already satisfied: joblib>=1.1.1 in /opt/conda/lib/python3.10/site-packages (from scikit-learn->sentence_transformers) (1.4.2)\nRequirement already satisfied: threadpoolctl>=2.0.0 in /opt/conda/lib/python3.10/site-packages (from scikit-learn->sentence_transformers) (3.2.0)\nRequirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/lib/python3.10/site-packages (from packaging>=20.9->huggingface-hub>=0.15.1->sentence_transformers) (3.1.1)\nRequirement already satisfied: MarkupSafe>=2.0 in /opt/conda/lib/python3.10/site-packages (from jinja2->torch>=1.11.0->sentence_transformers) (2.1.3)\nRequirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface-hub>=0.15.1->sentence_transformers) (3.3.2)\nRequirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface-hub>=0.15.1->sentence_transformers) (3.6)\nRequirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface-hub>=0.15.1->sentence_transformers) (1.26.18)\nRequirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface-hub>=0.15.1->sentence_transformers) (2024.2.2)\nRequirement already satisfied: mpmath<1.4.0,>=1.1.0 in /opt/conda/lib/python3.10/site-packages (from sympy->torch>=1.11.0->sentence_transformers) (1.3.0)\nDownloading sentence_transformers-3.0.0-py3-none-any.whl (224 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m224.7/224.7 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n\u001b[?25hInstalling collected packages: sentence_transformers\nSuccessfully installed sentence_transformers-3.0.0\n","output_type":"stream"}]},{"cell_type":"code","source":"import torch\nfrom torch.utils.data import DataLoader\nimport math\nimport pandas as pd\nfrom sentence_transformers import SentenceTransformer, LoggingHandler, losses, models, util\nfrom sentence_transformers.evaluation import EmbeddingSimilarityEvaluator\nfrom sentence_transformers.readers import InputExample\nimport logging\nfrom datetime import datetime","metadata":{"execution":{"iopub.status.busy":"2024-06-07T09:20:57.783272Z","iopub.execute_input":"2024-06-07T09:20:57.784034Z","iopub.status.idle":"2024-06-07T09:21:17.821099Z","shell.execute_reply.started":"2024-06-07T09:20:57.783987Z","shell.execute_reply":"2024-06-07T09:21:17.820337Z"},"trusted":true},"execution_count":2,"outputs":[{"name":"stderr","text":"/opt/conda/lib/python3.10/site-packages/sentence_transformers/cross_encoder/CrossEncoder.py:11: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n from tqdm.autonotebook import tqdm, trange\n2024-06-07 09:21:07.744572: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n2024-06-07 09:21:07.744669: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n2024-06-07 09:21:07.920594: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n","output_type":"stream"}]},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/sentence-similarity-nepali-dataset/stsb_multi_mt_nepali_cleaned.csv')\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2024-06-07T09:21:35.985210Z","iopub.execute_input":"2024-06-07T09:21:35.985876Z","iopub.status.idle":"2024-06-07T09:21:36.088420Z","shell.execute_reply.started":"2024-06-07T09:21:35.985837Z","shell.execute_reply":"2024-06-07T09:21:36.087324Z"},"trusted":true},"execution_count":3,"outputs":[{"execution_count":3,"output_type":"execute_result","data":{"text/plain":" sentence1 \\\n0 एउटा विमान उडिरहेको छ। \n1 एउटा मान्छे ठूलो बाँसुरी बजाइरहेको छ। \n2 एक व्यक्ति पिज्जामा टुक्रा चिज फैलाउँदै छ। \n3 तीन जना चेस खेल्दै छन्। \n4 एउटा मान्छे सेलो बजाउँदै छ। \n\n sentence2 score \n0 हवाई जहाज उडिरहेको छ। 5.00 \n1 एउटा मान्छे बाँसुरी बजाउँदै छ। 3.80 \n2 एक जना मानिसले न पकाएको पिज्जामा टुक्रा पारेको... 3.80 \n3 दुई जना पुरुष चेस खेलिरहेका छन्। 2.60 \n4 बसेको मान्छे सेलो खेलिरहेको छ। 4.25 ","text/html":"
\n | sentence1 | \nsentence2 | \nscore | \n
---|---|---|---|
0 | \nएउटा विमान उडिरहेको छ। | \nहवाई जहाज उडिरहेको छ। | \n5.00 | \n
1 | \nएउटा मान्छे ठूलो बाँसुरी बजाइरहेको छ। | \nएउटा मान्छे बाँसुरी बजाउँदै छ। | \n3.80 | \n
2 | \nएक व्यक्ति पिज्जामा टुक्रा चिज फैलाउँदै छ। | \nएक जना मानिसले न पकाएको पिज्जामा टुक्रा पारेको... | \n3.80 | \n
3 | \nतीन जना चेस खेल्दै छन्। | \nदुई जना पुरुष चेस खेलिरहेका छन्। | \n2.60 | \n
4 | \nएउटा मान्छे सेलो बजाउँदै छ। | \nबसेको मान्छे सेलो खेलिरहेको छ। | \n4.25 | \n
/kaggle/working/wandb/run-20240607_092546-cihx2tex
"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Step | \nTraining Loss | \nValidation Loss | \nStsb-dev-nepali Pearson Cosine | \nStsb-dev-nepali Spearman Cosine | \nStsb-dev-nepali Pearson Manhattan | \nStsb-dev-nepali Spearman Manhattan | \nStsb-dev-nepali Pearson Euclidean | \nStsb-dev-nepali Spearman Euclidean | \nStsb-dev-nepali Pearson Dot | \nStsb-dev-nepali Spearman Dot | \nStsb-dev-nepali Pearson Max | \nStsb-dev-nepali Spearman Max | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|
288 | \nNo log | \nNo log | \n0.584433 | \n0.529995 | \n0.570037 | \n0.535467 | \n0.570009 | \n0.534883 | \n0.404444 | \n0.411658 | \n0.584433 | \n0.535467 | \n
576 | \n0.072300 | \nNo log | \n0.630269 | \n0.579386 | \n0.590948 | \n0.558463 | \n0.590836 | \n0.557443 | \n0.509211 | \n0.491773 | \n0.630269 | \n0.579386 | \n
864 | \n0.072300 | \nNo log | \n0.658447 | \n0.610811 | \n0.612098 | \n0.578173 | \n0.612644 | \n0.578573 | \n0.547548 | \n0.528451 | \n0.658447 | \n0.610811 | \n
1000 | \n0.047000 | \nNo log | \n0.666375 | \n0.614651 | \n0.626983 | \n0.590599 | \n0.627172 | \n0.590727 | \n0.562621 | \n0.535285 | \n0.666375 | \n0.614651 | \n
1152 | \n0.047000 | \nNo log | \n0.672237 | \n0.625900 | \n0.627099 | \n0.590611 | \n0.628047 | \n0.590636 | \n0.560009 | \n0.540695 | \n0.672237 | \n0.625900 | \n
1440 | \n0.047000 | \nNo log | \n0.680891 | \n0.635564 | \n0.637430 | \n0.598613 | \n0.637586 | \n0.598777 | \n0.557042 | \n0.541733 | \n0.680891 | \n0.635564 | \n
1728 | \n0.034000 | \nNo log | \n0.672592 | \n0.632945 | \n0.637961 | \n0.598947 | \n0.637936 | \n0.598995 | \n0.550762 | \n0.539140 | \n0.672592 | \n0.632945 | \n
2000 | \n0.021700 | \nNo log | \n0.672088 | \n0.637508 | \n0.638572 | \n0.600721 | \n0.638595 | \n0.600175 | \n0.562049 | \n0.553229 | \n0.672088 | \n0.637508 | \n
2016 | \n0.021700 | \nNo log | \n0.675216 | \n0.638240 | \n0.637745 | \n0.599568 | \n0.637940 | \n0.599418 | \n0.567959 | \n0.554272 | \n0.675216 | \n0.638240 | \n
2304 | \n0.021700 | \nNo log | \n0.687561 | \n0.646783 | \n0.645779 | \n0.608069 | \n0.645841 | \n0.607783 | \n0.583634 | \n0.568408 | \n0.687561 | \n0.646783 | \n
2592 | \n0.013700 | \nNo log | \n0.668847 | \n0.634789 | \n0.636318 | \n0.600847 | \n0.637495 | \n0.601395 | \n0.557504 | \n0.548944 | \n0.668847 | \n0.634789 | \n
2880 | \n0.013700 | \nNo log | \n0.662736 | \n0.633178 | \n0.636326 | \n0.602494 | \n0.636993 | \n0.603103 | \n0.553057 | \n0.542469 | \n0.662736 | \n0.633178 | \n
3000 | \n0.010200 | \nNo log | \n0.674300 | \n0.642720 | \n0.637734 | \n0.605677 | \n0.637013 | \n0.605059 | \n0.582309 | \n0.572222 | \n0.674300 | \n0.642720 | \n
3168 | \n0.010200 | \nNo log | \n0.670390 | \n0.637020 | \n0.638372 | \n0.606334 | \n0.638889 | \n0.606744 | \n0.573481 | \n0.563532 | \n0.670390 | \n0.637020 | \n
3456 | \n0.010200 | \nNo log | \n0.683995 | \n0.651526 | \n0.642882 | \n0.611911 | \n0.643475 | \n0.613953 | \n0.595411 | \n0.583784 | \n0.683995 | \n0.651526 | \n
3744 | \n0.008400 | \nNo log | \n0.681659 | \n0.654595 | \n0.642284 | \n0.613565 | \n0.643097 | \n0.613936 | \n0.578661 | \n0.570580 | \n0.681659 | \n0.654595 | \n
4000 | \n0.006900 | \nNo log | \n0.677811 | \n0.639968 | \n0.641335 | \n0.606235 | \n0.641127 | \n0.607464 | \n0.586985 | \n0.572039 | \n0.677811 | \n0.639968 | \n
4032 | \n0.006900 | \nNo log | \n0.687130 | \n0.660984 | \n0.645757 | \n0.614754 | \n0.646508 | \n0.616148 | \n0.591385 | \n0.587501 | \n0.687130 | \n0.660984 | \n
4320 | \n0.006900 | \nNo log | \n0.684831 | \n0.649511 | \n0.639959 | \n0.605676 | \n0.641196 | \n0.608222 | \n0.581764 | \n0.581682 | \n0.684831 | \n0.649511 | \n
4608 | \n0.006000 | \nNo log | \n0.686712 | \n0.657447 | \n0.641772 | \n0.609292 | \n0.642985 | \n0.610901 | \n0.576227 | \n0.573099 | \n0.686712 | \n0.657447 | \n
4896 | \n0.006000 | \nNo log | \n0.682227 | \n0.648598 | \n0.637055 | \n0.603216 | \n0.638023 | \n0.604935 | \n0.579578 | \n0.577300 | \n0.682227 | \n0.648598 | \n
5000 | \n0.005300 | \nNo log | \n0.694098 | \n0.658874 | \n0.645419 | \n0.611588 | \n0.645915 | \n0.612623 | \n0.589180 | \n0.580972 | \n0.694098 | \n0.658874 | \n
5184 | \n0.005300 | \nNo log | \n0.693652 | \n0.659230 | \n0.640168 | \n0.609070 | \n0.640787 | \n0.610852 | \n0.587097 | \n0.587403 | \n0.693652 | \n0.659230 | \n
5472 | \n0.005300 | \nNo log | \n0.682293 | \n0.648801 | \n0.636293 | \n0.605448 | \n0.637196 | \n0.607135 | \n0.569032 | \n0.569749 | \n0.682293 | \n0.648801 | \n
5760 | \n0.004700 | \nNo log | \n0.681732 | \n0.643594 | \n0.645259 | \n0.611073 | \n0.645454 | \n0.612765 | \n0.561682 | \n0.563203 | \n0.681732 | \n0.643594 | \n
6000 | \n0.004400 | \nNo log | \n0.690924 | \n0.657588 | \n0.640870 | \n0.609510 | \n0.640708 | \n0.610011 | \n0.581180 | \n0.585519 | \n0.690924 | \n0.657588 | \n
6048 | \n0.004400 | \nNo log | \n0.683515 | \n0.651511 | \n0.640402 | \n0.611022 | \n0.640222 | \n0.611931 | \n0.568924 | \n0.577244 | \n0.683515 | \n0.651511 | \n
6336 | \n0.004400 | \nNo log | \n0.686248 | \n0.654053 | \n0.637963 | \n0.606188 | \n0.638948 | \n0.608142 | \n0.559310 | \n0.565979 | \n0.686248 | \n0.654053 | \n
6624 | \n0.004100 | \nNo log | \n0.686070 | \n0.654858 | \n0.640249 | \n0.607909 | \n0.640664 | \n0.609844 | \n0.558051 | \n0.569336 | \n0.686070 | \n0.654858 | \n
6912 | \n0.004100 | \nNo log | \n0.685390 | \n0.657148 | \n0.638814 | \n0.609791 | \n0.638455 | \n0.610202 | \n0.563527 | \n0.574954 | \n0.685390 | \n0.657148 | \n
7000 | \n0.003700 | \nNo log | \n0.690594 | \n0.660332 | \n0.644835 | \n0.613544 | \n0.645270 | \n0.614964 | \n0.550843 | \n0.559976 | \n0.690594 | \n0.660332 | \n
7200 | \n0.003700 | \nNo log | \n0.700908 | \n0.669851 | \n0.645415 | \n0.614762 | \n0.645557 | \n0.616799 | \n0.586183 | \n0.590115 | \n0.700908 | \n0.669851 | \n
7488 | \n0.003700 | \nNo log | \n0.701229 | \n0.665315 | \n0.643765 | \n0.613783 | \n0.643522 | \n0.614661 | \n0.578713 | \n0.586350 | \n0.701229 | \n0.665315 | \n
7776 | \n0.003700 | \nNo log | \n0.693888 | \n0.660865 | \n0.634922 | \n0.602748 | \n0.635528 | \n0.605028 | \n0.569599 | \n0.582503 | \n0.693888 | \n0.660865 | \n
8000 | \n0.003300 | \nNo log | \n0.688899 | \n0.657787 | \n0.637239 | \n0.606793 | \n0.637461 | \n0.608048 | \n0.548580 | \n0.569625 | \n0.688899 | \n0.657787 | \n
8064 | \n0.003300 | \nNo log | \n0.693032 | \n0.660623 | \n0.639450 | \n0.608378 | \n0.639657 | \n0.610071 | \n0.546249 | \n0.565557 | \n0.693032 | \n0.660623 | \n
8352 | \n0.003300 | \nNo log | \n0.694075 | \n0.661374 | \n0.641626 | \n0.612388 | \n0.642030 | \n0.614020 | \n0.550719 | \n0.567732 | \n0.694075 | \n0.661374 | \n
8640 | \n0.003100 | \nNo log | \n0.691424 | \n0.657856 | \n0.642259 | \n0.612662 | \n0.642158 | \n0.613645 | \n0.555179 | \n0.566010 | \n0.691424 | \n0.657856 | \n
8928 | \n0.003100 | \nNo log | \n0.701937 | \n0.668785 | \n0.643336 | \n0.616171 | \n0.643102 | \n0.616016 | \n0.556199 | \n0.573776 | \n0.701937 | \n0.668785 | \n
9000 | \n0.002800 | \nNo log | \n0.699238 | \n0.664998 | \n0.641475 | \n0.610812 | \n0.640916 | \n0.610888 | \n0.545261 | \n0.568357 | \n0.699238 | \n0.664998 | \n
9216 | \n0.002800 | \nNo log | \n0.695730 | \n0.663908 | \n0.640203 | \n0.609653 | \n0.640511 | \n0.611674 | \n0.542936 | \n0.563601 | \n0.695730 | \n0.663908 | \n
9504 | \n0.002700 | \nNo log | \n0.694337 | \n0.662436 | \n0.647258 | \n0.619940 | \n0.646689 | \n0.619638 | \n0.554716 | \n0.567028 | \n0.694337 | \n0.662436 | \n
9792 | \n0.002700 | \nNo log | \n0.697266 | \n0.664574 | \n0.645538 | \n0.617708 | \n0.646120 | \n0.617901 | \n0.546000 | \n0.565709 | \n0.697266 | \n0.664574 | \n
10000 | \n0.002500 | \nNo log | \n0.686296 | \n0.652985 | \n0.637337 | \n0.606697 | \n0.637700 | \n0.608043 | \n0.532231 | \n0.552684 | \n0.686296 | \n0.652985 | \n
10080 | \n0.002500 | \nNo log | \n0.694093 | \n0.658690 | \n0.640284 | \n0.609180 | \n0.640459 | \n0.609831 | \n0.545666 | \n0.563524 | \n0.694093 | \n0.658690 | \n
10368 | \n0.002500 | \nNo log | \n0.700033 | \n0.667099 | \n0.640387 | \n0.610497 | \n0.640633 | \n0.611951 | \n0.559141 | \n0.572281 | \n0.700033 | \n0.667099 | \n
10656 | \n0.002500 | \nNo log | \n0.698216 | \n0.661396 | \n0.644144 | \n0.610973 | \n0.644334 | \n0.612198 | \n0.550993 | \n0.567513 | \n0.698216 | \n0.661396 | \n
10944 | \n0.002500 | \nNo log | \n0.694627 | \n0.660239 | \n0.637672 | \n0.607891 | \n0.637426 | \n0.607543 | \n0.540661 | \n0.559624 | \n0.694627 | \n0.660239 | \n
11000 | \n0.002400 | \nNo log | \n0.691183 | \n0.657605 | \n0.638970 | \n0.608852 | \n0.639578 | \n0.609570 | \n0.535268 | \n0.552373 | \n0.691183 | \n0.657605 | \n
11232 | \n0.002400 | \nNo log | \n0.701821 | \n0.666526 | \n0.638133 | \n0.608002 | \n0.638828 | \n0.609521 | \n0.535843 | \n0.563896 | \n0.701821 | \n0.666526 | \n
11520 | \n0.002300 | \nNo log | \n0.699925 | \n0.666259 | \n0.642017 | \n0.612357 | \n0.642566 | \n0.614152 | \n0.527153 | \n0.558587 | \n0.699925 | \n0.666259 | \n
11808 | \n0.002300 | \nNo log | \n0.705875 | \n0.673414 | \n0.643500 | \n0.616473 | \n0.644000 | \n0.618168 | \n0.549704 | \n0.573058 | \n0.705875 | \n0.673414 | \n
12000 | \n0.002100 | \nNo log | \n0.703067 | \n0.663349 | \n0.639785 | \n0.607716 | \n0.640896 | \n0.609784 | \n0.537621 | \n0.565632 | \n0.703067 | \n0.663349 | \n
12096 | \n0.002100 | \nNo log | \n0.701562 | \n0.666655 | \n0.640139 | \n0.611618 | \n0.641406 | \n0.614198 | \n0.542641 | \n0.564282 | \n0.701562 | \n0.666655 | \n
12384 | \n0.002100 | \nNo log | \n0.699528 | \n0.667892 | \n0.644916 | \n0.618258 | \n0.645703 | \n0.619833 | \n0.527984 | \n0.553644 | \n0.699528 | \n0.667892 | \n
12672 | \n0.002000 | \nNo log | \n0.706445 | \n0.670107 | \n0.642894 | \n0.611799 | \n0.643621 | \n0.613753 | \n0.543308 | \n0.573970 | \n0.706445 | \n0.670107 | \n
12960 | \n0.002000 | \nNo log | \n0.699184 | \n0.665048 | \n0.641198 | \n0.611766 | \n0.642321 | \n0.614280 | \n0.530198 | \n0.558834 | \n0.699184 | \n0.665048 | \n
13000 | \n0.001900 | \nNo log | \n0.700913 | \n0.667955 | \n0.644792 | \n0.616601 | \n0.646171 | \n0.618791 | \n0.526705 | \n0.554414 | \n0.700913 | \n0.667955 | \n
13248 | \n0.001900 | \nNo log | \n0.696948 | \n0.663143 | \n0.640371 | \n0.611158 | \n0.641587 | \n0.613115 | \n0.527811 | \n0.559064 | \n0.696948 | \n0.663143 | \n
13536 | \n0.001800 | \nNo log | \n0.696804 | \n0.664285 | \n0.644724 | \n0.620151 | \n0.645584 | \n0.621025 | \n0.526488 | \n0.556075 | \n0.696804 | \n0.664285 | \n
13824 | \n0.001800 | \nNo log | \n0.696185 | \n0.663099 | \n0.638397 | \n0.610793 | \n0.639220 | \n0.612208 | \n0.528035 | \n0.558043 | \n0.696185 | \n0.663099 | \n
14000 | \n0.001700 | \nNo log | \n0.699299 | \n0.664777 | \n0.639417 | \n0.609772 | \n0.640324 | \n0.612126 | \n0.529399 | \n0.560132 | \n0.699299 | \n0.664777 | \n
14112 | \n0.001700 | \nNo log | \n0.696544 | \n0.664766 | \n0.638135 | \n0.611847 | \n0.639116 | \n0.613631 | \n0.529037 | \n0.560623 | \n0.696544 | \n0.664766 | \n
14400 | \n0.001700 | \nNo log | \n0.692360 | \n0.661940 | \n0.636405 | \n0.610894 | \n0.637666 | \n0.613188 | \n0.524517 | \n0.549108 | \n0.692360 | \n0.661940 | \n
14688 | \n0.001700 | \nNo log | \n0.694890 | \n0.663259 | \n0.640162 | \n0.613740 | \n0.641097 | \n0.615108 | \n0.524649 | \n0.549434 | \n0.694890 | \n0.663259 | \n
14976 | \n0.001700 | \nNo log | \n0.693598 | \n0.662199 | \n0.638488 | \n0.614089 | \n0.639539 | \n0.615423 | \n0.520781 | \n0.549906 | \n0.693598 | \n0.662199 | \n
15000 | \n0.001600 | \nNo log | \n0.691893 | \n0.661165 | \n0.639810 | \n0.614635 | \n0.640778 | \n0.616911 | \n0.517936 | \n0.548946 | \n0.691893 | \n0.661165 | \n
15264 | \n0.001600 | \nNo log | \n0.700500 | \n0.666963 | \n0.640325 | \n0.612954 | \n0.641407 | \n0.614921 | \n0.510754 | \n0.549968 | \n0.700500 | \n0.666963 | \n
15552 | \n0.001500 | \nNo log | \n0.694156 | \n0.661767 | \n0.635403 | \n0.611578 | \n0.636208 | \n0.612906 | \n0.517335 | \n0.552012 | \n0.694156 | \n0.661767 | \n
15840 | \n0.001500 | \nNo log | \n0.696841 | \n0.664102 | \n0.636851 | \n0.609727 | \n0.638167 | \n0.612651 | \n0.505800 | \n0.545446 | \n0.696841 | \n0.664102 | \n
16000 | \n0.001500 | \nNo log | \n0.695172 | \n0.661716 | \n0.632575 | \n0.605140 | \n0.633279 | \n0.607190 | \n0.496667 | \n0.540893 | \n0.695172 | \n0.661716 | \n
16128 | \n0.001500 | \nNo log | \n0.701233 | \n0.666915 | \n0.637775 | \n0.611842 | \n0.638584 | \n0.614164 | \n0.518395 | \n0.555788 | \n0.701233 | \n0.666915 | \n
16416 | \n0.001500 | \nNo log | \n0.697525 | \n0.664506 | \n0.637059 | \n0.611533 | \n0.637550 | \n0.611751 | \n0.522522 | \n0.553738 | \n0.697525 | \n0.664506 | \n
16704 | \n0.001400 | \nNo log | \n0.697525 | \n0.664207 | \n0.636721 | \n0.612602 | \n0.637637 | \n0.614218 | \n0.516872 | \n0.551454 | \n0.697525 | \n0.664207 | \n
16992 | \n0.001400 | \nNo log | \n0.691597 | \n0.657882 | \n0.628236 | \n0.602854 | \n0.629437 | \n0.604377 | \n0.502297 | \n0.537032 | \n0.691597 | \n0.657882 | \n
17000 | \n0.001300 | \nNo log | \n0.693170 | \n0.659165 | \n0.628587 | \n0.603227 | \n0.629753 | \n0.605348 | \n0.508305 | \n0.541441 | \n0.693170 | \n0.659165 | \n
17280 | \n0.001300 | \nNo log | \n0.693021 | \n0.658939 | \n0.635450 | \n0.610874 | \n0.636532 | \n0.611814 | \n0.506399 | \n0.539073 | \n0.693021 | \n0.658939 | \n
17568 | \n0.001400 | \nNo log | \n0.702463 | \n0.668463 | \n0.638932 | \n0.612535 | \n0.640258 | \n0.614420 | \n0.519697 | \n0.556460 | \n0.702463 | \n0.668463 | \n
17856 | \n0.001400 | \nNo log | \n0.701762 | \n0.667284 | \n0.639309 | \n0.612110 | \n0.640013 | \n0.613701 | \n0.514160 | \n0.550262 | \n0.701762 | \n0.667284 | \n
18000 | \n0.001200 | \nNo log | \n0.700318 | \n0.666910 | \n0.639170 | \n0.612258 | \n0.640277 | \n0.614358 | \n0.511612 | \n0.551935 | \n0.700318 | \n0.666910 | \n
18144 | \n0.001200 | \nNo log | \n0.697852 | \n0.666509 | \n0.639821 | \n0.614021 | \n0.640760 | \n0.615690 | \n0.504519 | \n0.546302 | \n0.697852 | \n0.666509 | \n
18432 | \n0.001200 | \nNo log | \n0.695399 | \n0.662616 | \n0.637791 | \n0.611909 | \n0.638708 | \n0.613529 | \n0.502626 | \n0.543055 | \n0.695399 | \n0.662616 | \n
18720 | \n0.001200 | \nNo log | \n0.693878 | \n0.661851 | \n0.633939 | \n0.608435 | \n0.634824 | \n0.610406 | \n0.499822 | \n0.538955 | \n0.693878 | \n0.661851 | \n
19000 | \n0.001200 | \nNo log | \n0.697158 | \n0.664268 | \n0.635439 | \n0.611213 | \n0.636044 | \n0.613028 | \n0.502740 | \n0.541154 | \n0.697158 | \n0.664268 | \n
19008 | \n0.001200 | \nNo log | \n0.697428 | \n0.665064 | \n0.635962 | \n0.611796 | \n0.636509 | \n0.613282 | \n0.503311 | \n0.542375 | \n0.697428 | \n0.665064 | \n
19296 | \n0.001200 | \nNo log | \n0.697176 | \n0.662807 | \n0.634620 | \n0.610642 | \n0.635436 | \n0.612396 | \n0.507281 | \n0.545775 | \n0.697176 | \n0.662807 | \n
19584 | \n0.001100 | \nNo log | \n0.700167 | \n0.665758 | \n0.636019 | \n0.611913 | \n0.636500 | \n0.613749 | \n0.502768 | \n0.546323 | \n0.700167 | \n0.665758 | \n
19872 | \n0.001100 | \nNo log | \n0.695928 | \n0.661454 | \n0.636767 | \n0.612295 | \n0.637414 | \n0.613619 | \n0.501059 | \n0.539088 | \n0.695928 | \n0.661454 | \n
20000 | \n0.001100 | \nNo log | \n0.696916 | \n0.662697 | \n0.637556 | \n0.612374 | \n0.638139 | \n0.613138 | \n0.503864 | \n0.543854 | \n0.696916 | \n0.662697 | \n
20160 | \n0.001100 | \nNo log | \n0.700221 | \n0.665708 | \n0.635403 | \n0.609941 | \n0.636264 | \n0.611345 | \n0.501990 | \n0.546020 | \n0.700221 | \n0.665708 | \n
20448 | \n0.001100 | \nNo log | \n0.698481 | \n0.666258 | \n0.634571 | \n0.607655 | \n0.635681 | \n0.610116 | \n0.495325 | \n0.537692 | \n0.698481 | \n0.666258 | \n
20736 | \n0.001100 | \nNo log | \n0.697830 | \n0.663391 | \n0.633312 | \n0.607312 | \n0.634243 | \n0.609150 | \n0.491470 | \n0.536988 | \n0.697830 | \n0.663391 | \n
21000 | \n0.001000 | \nNo log | \n0.698677 | \n0.664852 | \n0.635090 | \n0.609831 | \n0.635868 | \n0.611365 | \n0.503538 | \n0.544461 | \n0.698677 | \n0.664852 | \n
21024 | \n0.001000 | \nNo log | \n0.697158 | \n0.663156 | \n0.634728 | \n0.609400 | \n0.635568 | \n0.611041 | \n0.502429 | \n0.541993 | \n0.697158 | \n0.663156 | \n
21312 | \n0.001000 | \nNo log | \n0.700810 | \n0.665789 | \n0.637208 | \n0.610709 | \n0.638003 | \n0.612283 | \n0.505921 | \n0.547819 | \n0.700810 | \n0.665789 | \n
21600 | \n0.001000 | \nNo log | \n0.698299 | \n0.663937 | \n0.634429 | \n0.609591 | \n0.635617 | \n0.611294 | \n0.497863 | \n0.540984 | \n0.698299 | \n0.663937 | \n
21888 | \n0.001000 | \nNo log | \n0.695640 | \n0.660052 | \n0.634649 | \n0.609289 | \n0.635875 | \n0.611374 | \n0.493414 | \n0.536364 | \n0.695640 | \n0.660052 | \n
22000 | \n0.001000 | \nNo log | \n0.697823 | \n0.662337 | \n0.633751 | \n0.609387 | \n0.634871 | \n0.611306 | \n0.488881 | \n0.533959 | \n0.697823 | \n0.662337 | \n
22176 | \n0.001000 | \nNo log | \n0.696422 | \n0.660698 | \n0.633896 | \n0.607908 | \n0.634693 | \n0.609479 | \n0.490298 | \n0.535108 | \n0.696422 | \n0.660698 | \n
22464 | \n0.001000 | \nNo log | \n0.695336 | \n0.661315 | \n0.636168 | \n0.608516 | \n0.636791 | \n0.610398 | \n0.491898 | \n0.533048 | \n0.695336 | \n0.661315 | \n
22752 | \n0.000900 | \nNo log | \n0.695877 | \n0.661310 | \n0.635495 | \n0.609534 | \n0.636222 | \n0.611456 | \n0.494876 | \n0.534655 | \n0.695877 | \n0.661310 | \n
23000 | \n0.000900 | \nNo log | \n0.696311 | \n0.661536 | \n0.635614 | \n0.608143 | \n0.636253 | \n0.610884 | \n0.494101 | \n0.535650 | \n0.696311 | \n0.661536 | \n
23040 | \n0.000900 | \nNo log | \n0.695721 | \n0.661460 | \n0.634550 | \n0.607742 | \n0.635248 | \n0.609118 | \n0.492812 | \n0.534552 | \n0.695721 | \n0.661460 | \n
23328 | \n0.000900 | \nNo log | \n0.696000 | \n0.661746 | \n0.633617 | \n0.607251 | \n0.634539 | \n0.608974 | \n0.491768 | \n0.534966 | \n0.696000 | \n0.661746 | \n
23616 | \n0.000800 | \nNo log | \n0.696309 | \n0.660439 | \n0.632456 | \n0.606115 | \n0.633431 | \n0.607778 | \n0.491442 | \n0.534334 | \n0.696309 | \n0.660439 | \n
23904 | \n0.000800 | \nNo log | \n0.696122 | \n0.660471 | \n0.633164 | \n0.606515 | \n0.634185 | \n0.609381 | \n0.493944 | \n0.535865 | \n0.696122 | \n0.660471 | \n
24000 | \n0.000800 | \nNo log | \n0.694968 | \n0.660186 | \n0.633762 | \n0.606180 | \n0.634699 | \n0.609069 | \n0.490992 | \n0.534285 | \n0.694968 | \n0.660186 | \n
24192 | \n0.000800 | \nNo log | \n0.697113 | \n0.662760 | \n0.633843 | \n0.607576 | \n0.634814 | \n0.609551 | \n0.494144 | \n0.537603 | \n0.697113 | \n0.662760 | \n
24480 | \n0.000800 | \nNo log | \n0.696518 | \n0.660308 | \n0.632504 | \n0.605448 | \n0.633231 | \n0.606642 | \n0.487430 | \n0.530240 | \n0.696518 | \n0.660308 | \n
24768 | \n0.000800 | \nNo log | \n0.695009 | \n0.660203 | \n0.633429 | \n0.606513 | \n0.634460 | \n0.607849 | \n0.486963 | \n0.529326 | \n0.695009 | \n0.660203 | \n
25000 | \n0.000800 | \nNo log | \n0.694040 | \n0.659240 | \n0.631979 | \n0.605494 | \n0.633088 | \n0.607534 | \n0.484892 | \n0.528277 | \n0.694040 | \n0.659240 | \n
25056 | \n0.000800 | \nNo log | \n0.695839 | \n0.661073 | \n0.632343 | \n0.606568 | \n0.633372 | \n0.608044 | \n0.485997 | \n0.528843 | \n0.695839 | \n0.661073 | \n
25344 | \n0.000800 | \nNo log | \n0.694964 | \n0.661164 | \n0.632196 | \n0.606852 | \n0.633076 | \n0.607756 | \n0.488733 | \n0.531925 | \n0.694964 | \n0.661164 | \n
25632 | \n0.000800 | \nNo log | \n0.696130 | \n0.660749 | \n0.631619 | \n0.606428 | \n0.632457 | \n0.607495 | \n0.485730 | \n0.530426 | \n0.696130 | \n0.660749 | \n
25920 | \n0.000800 | \nNo log | \n0.695486 | \n0.659777 | \n0.634014 | \n0.607698 | \n0.634861 | \n0.608839 | \n0.486753 | \n0.528370 | \n0.695486 | \n0.659777 | \n
26000 | \n0.000800 | \nNo log | \n0.696782 | \n0.660680 | \n0.632971 | \n0.606514 | \n0.633933 | \n0.608338 | \n0.486386 | \n0.530307 | \n0.696782 | \n0.660680 | \n
26208 | \n0.000800 | \nNo log | \n0.696690 | \n0.661505 | \n0.633463 | \n0.607776 | \n0.634347 | \n0.609542 | \n0.484071 | \n0.529305 | \n0.696690 | \n0.661505 | \n
26496 | \n0.000800 | \nNo log | \n0.696562 | \n0.661518 | \n0.633505 | \n0.607406 | \n0.634429 | \n0.609406 | \n0.486048 | \n0.530594 | \n0.696562 | \n0.661518 | \n
26784 | \n0.000700 | \nNo log | \n0.696105 | \n0.660929 | \n0.633743 | \n0.607990 | \n0.634660 | \n0.609025 | \n0.485589 | \n0.528959 | \n0.696105 | \n0.660929 | \n
27000 | \n0.000700 | \nNo log | \n0.695539 | \n0.660727 | \n0.632420 | \n0.606721 | \n0.633319 | \n0.607857 | \n0.483661 | \n0.528919 | \n0.695539 | \n0.660727 | \n
27072 | \n0.000700 | \nNo log | \n0.696344 | \n0.661197 | \n0.632600 | \n0.607151 | \n0.633424 | \n0.608239 | \n0.485957 | \n0.531246 | \n0.696344 | \n0.661197 | \n
27360 | \n0.000700 | \nNo log | \n0.697089 | \n0.662385 | \n0.632868 | \n0.607601 | \n0.633640 | \n0.608581 | \n0.484710 | \n0.530977 | \n0.697089 | \n0.662385 | \n
27648 | \n0.000700 | \nNo log | \n0.697272 | \n0.662738 | \n0.632975 | \n0.607800 | \n0.633694 | \n0.608744 | \n0.483656 | \n0.529242 | \n0.697272 | \n0.662738 | \n
27936 | \n0.000700 | \nNo log | \n0.696611 | \n0.661761 | \n0.632881 | \n0.607570 | \n0.633632 | \n0.608894 | \n0.481992 | \n0.528166 | \n0.696611 | \n0.661761 | \n
28000 | \n0.000700 | \nNo log | \n0.697068 | \n0.661860 | \n0.633173 | \n0.608027 | \n0.633932 | \n0.609035 | \n0.482986 | \n0.529354 | \n0.697068 | \n0.661860 | \n
28224 | \n0.000700 | \nNo log | \n0.696944 | \n0.662103 | \n0.633136 | \n0.607639 | \n0.633896 | \n0.608923 | \n0.483817 | \n0.529488 | \n0.696944 | \n0.662103 | \n
28512 | \n0.000700 | \nNo log | \n0.697145 | \n0.662290 | \n0.633202 | \n0.607846 | \n0.633976 | \n0.609022 | \n0.484831 | \n0.530640 | \n0.697145 | \n0.662290 | \n
28800 | \n0.000700 | \nNo log | \n0.697139 | \n0.662315 | \n0.633208 | \n0.607865 | \n0.633982 | \n0.609007 | \n0.484827 | \n0.530643 | \n0.697139 | \n0.662315 | \n
"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}}]},{"cell_type":"code","source":"sentences_2 = [\n \"सरकारले कपास विकास समिति खारेज गर्ने निर्णय गरेको सुनेर मलाई दुःख लाग्यो। नेपालमा कपास खेतीको राम्रो सम्भावना र बजार दुवै छ। यसको उत्पादन त हामीले बाउ-बाजेका पालादेखि नै गर्दै आएका हौं। र अहिले पनि धेरै किसानले आफ्नो प्रयोगका लागि पनि कपास खेती गर्दै आएका छन्।व्यावसायिक रूपमा सुरु गरिएको कपास खेती सरकारको गलत नीतिका कारण आज बन्द हुने अवस्थामा पुगेको हो। समिति खारेज भएपछि कपास उत्पादनका लागि २०३३ सालदेखि गरिएका सबै प्रयास खेर गए। मैले कृषि प्राविधिकको रूपमा आफ्नो जागिरे जीवन सुरु गरेर १५-१६ वर्ष कपास खेतीकै क्षेत्रमा बिताए। पछि कृषि सचिव भएर पनि एक वर्षभन्दा बढी काम गरें।\",\n \"पार्टीको जिल्ला नेतृत्वले पार्टी सुधारको मागलाई बेवास्ता गरेको भन्दै नेकपा (एमाले) सिद्धार्थनगर नगर कमिटीका सचिवसहित ७४ जनाले सामूहिक राजीनामा दिएका छन् । सोमबार भैरहवामा पत्रकार सम्मेलन गरी नगर सचिव नारायणप्रसाद भण्डारीसहित नगर कमिटी र विभिन्न जनवर्गीय संगठनका पदाधिकारीले राजीनामा दिएको घोषणा गरेका हुन् । पत्रकार सम्मेलनमा बोल्दै भण्डारीले एक महिनाअघि पार्टीमा गर्नुपर्ने सुधारको माग राख्दै नेतृत्वलाई १० बुँदे मागसहित सुझाव पत्र पेस गरिएको तर जिल्ला नेतृत्वले त्यसलाई बेवास्ता गरी उल्टै व्यक्तिगत लाञ्छना र कारबाहीको धम्की दिंदै गुटगत सोचले अघि बढेपछि राजीनामा दिनुपरेको बताए ।\"\n]\n\nembeddings_2 =model.encode(sentences_2)","metadata":{"execution":{"iopub.status.busy":"2024-06-07T11:25:35.767823Z","iopub.execute_input":"2024-06-07T11:25:35.768471Z","iopub.status.idle":"2024-06-07T11:25:35.821147Z","shell.execute_reply.started":"2024-06-07T11:25:35.768437Z","shell.execute_reply":"2024-06-07T11:25:35.820146Z"},"trusted":true},"execution_count":16,"outputs":[{"output_type":"display_data","data":{"text/plain":"Batches: 0%| | 0/1 [00:00, ?it/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"5d89fa50506e43c18fbc9d751acb399b"}},"metadata":{}}]},{"cell_type":"code","source":"from sklearn.metrics.pairwise import cosine_similarity\n\ncos_sim_2 = cosine_similarity(\n [embeddings_2[1]],\n [embeddings_2[1]]\n)\n\ncos_sim_2","metadata":{"execution":{"iopub.status.busy":"2024-06-07T11:25:39.597619Z","iopub.execute_input":"2024-06-07T11:25:39.598357Z","iopub.status.idle":"2024-06-07T11:25:39.607759Z","shell.execute_reply.started":"2024-06-07T11:25:39.598324Z","shell.execute_reply":"2024-06-07T11:25:39.606801Z"},"trusted":true},"execution_count":17,"outputs":[{"execution_count":17,"output_type":"execute_result","data":{"text/plain":"array([[1.]], dtype=float32)"},"metadata":{}}]},{"cell_type":"code","source":"!pip install huggingface_hub","metadata":{"execution":{"iopub.status.busy":"2024-06-07T11:26:49.060418Z","iopub.execute_input":"2024-06-07T11:26:49.061297Z","iopub.status.idle":"2024-06-07T11:27:01.222925Z","shell.execute_reply.started":"2024-06-07T11:26:49.061265Z","shell.execute_reply":"2024-06-07T11:27:01.221473Z"},"trusted":true},"execution_count":18,"outputs":[{"name":"stderr","text":"/opt/conda/lib/python3.10/pty.py:89: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.\n pid, fd = os.forkpty()\nhuggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\nTo disable this warning, you can either:\n\t- Avoid using `tokenizers` before the fork if possible\n\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n","output_type":"stream"},{"name":"stdout","text":"Requirement already satisfied: huggingface_hub in /opt/conda/lib/python3.10/site-packages (0.23.2)\nRequirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (3.13.1)\nRequirement already satisfied: fsspec>=2023.5.0 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2024.3.1)\nRequirement already satisfied: packaging>=20.9 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (21.3)\nRequirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (6.0.1)\nRequirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2.32.3)\nRequirement already satisfied: tqdm>=4.42.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.66.4)\nRequirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.9.0)\nRequirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/lib/python3.10/site-packages (from packaging>=20.9->huggingface_hub) (3.1.1)\nRequirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (3.3.2)\nRequirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (3.6)\nRequirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (1.26.18)\nRequirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2024.2.2)\n","output_type":"stream"}]},{"cell_type":"code","source":"from huggingface_hub import login\naccess_token_write = \"your_access_token\"\nlogin(token = access_token_write)","metadata":{"execution":{"iopub.status.busy":"2024-06-07T11:44:14.319201Z","iopub.execute_input":"2024-06-07T11:44:14.320104Z","iopub.status.idle":"2024-06-07T11:44:14.452357Z","shell.execute_reply.started":"2024-06-07T11:44:14.320068Z","shell.execute_reply":"2024-06-07T11:44:14.451221Z"},"trusted":true},"execution_count":23,"outputs":[{"name":"stdout","text":"The token has not been saved to the git credentials helper. Pass `add_to_git_credential=True` in this function directly or `--add-to-git-credential` if using via `huggingface-cli` if you want to set the git credential as well.\nToken is valid (permission: write).\nYour token has been saved to /root/.cache/huggingface/token\nLogin successful\n","output_type":"stream"}]},{"cell_type":"code","source":"model.push_to_hub('syubraj/sentenceTransformer_nepali_new')","metadata":{"execution":{"iopub.status.busy":"2024-06-07T11:46:05.763911Z","iopub.execute_input":"2024-06-07T11:46:05.764314Z","iopub.status.idle":"2024-06-07T11:46:20.686005Z","shell.execute_reply.started":"2024-06-07T11:46:05.764284Z","shell.execute_reply":"2024-06-07T11:46:20.684999Z"},"trusted":true},"execution_count":25,"outputs":[{"output_type":"display_data","data":{"text/plain":"Computing widget examples: 0%| | 0/5 [00:00, ?example/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":""}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"model.safetensors: 0%| | 0.00/328M [00:00, ?B/s]","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"8be57079d7ff44ca9593c3a71fcef992"}},"metadata":{}},{"execution_count":25,"output_type":"execute_result","data":{"text/plain":"'https://huggingface.co/syubraj/sentenceTransformer_nepali_new/commit/70099c0437a80b82a5644295e3a327e1558fbeca'"},"metadata":{}}]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}