Spaces:
Sleeping
Sleeping
- main.ipynb +0 -100
- train.ipynb +0 -0
main.ipynb
DELETED
@@ -1,100 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"cells": [
|
3 |
-
{
|
4 |
-
"cell_type": "code",
|
5 |
-
"execution_count": 1,
|
6 |
-
"metadata": {},
|
7 |
-
"outputs": [
|
8 |
-
{
|
9 |
-
"name": "stderr",
|
10 |
-
"output_type": "stream",
|
11 |
-
"text": [
|
12 |
-
"/home/shaenazar/anaconda3/envs/dsenv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
13 |
-
" from .autonotebook import tqdm as notebook_tqdm\n"
|
14 |
-
]
|
15 |
-
}
|
16 |
-
],
|
17 |
-
"source": [
|
18 |
-
"import torch\n",
|
19 |
-
"from transformers import T5Tokenizer, T5ForConditionalGeneration\n",
|
20 |
-
"\n",
|
21 |
-
"model_name = \"sarahai/ruT5-base-summarizer\"\n",
|
22 |
-
"model_path = \"data/checkpoint\"\n",
|
23 |
-
"\n",
|
24 |
-
"model = T5ForConditionalGeneration.from_pretrained(model_path)"
|
25 |
-
]
|
26 |
-
},
|
27 |
-
{
|
28 |
-
"cell_type": "code",
|
29 |
-
"execution_count": 5,
|
30 |
-
"metadata": {},
|
31 |
-
"outputs": [
|
32 |
-
{
|
33 |
-
"name": "stderr",
|
34 |
-
"output_type": "stream",
|
35 |
-
"text": [
|
36 |
-
"model.safetensors: 100%|ββββββββββ| 892M/892M [01:13<00:00, 12.2MB/s] \n"
|
37 |
-
]
|
38 |
-
},
|
39 |
-
{
|
40 |
-
"data": {
|
41 |
-
"text/plain": [
|
42 |
-
"CommitInfo(commit_url='https://huggingface.co/ShaeNaZar/YsdaSummarizer/commit/fbd9cbe753c47653b6418165c948f69dc160954e', commit_message='Upload T5ForConditionalGeneration', commit_description='', oid='fbd9cbe753c47653b6418165c948f69dc160954e', pr_url=None, repo_url=RepoUrl('https://huggingface.co/ShaeNaZar/YsdaSummarizer', endpoint='https://huggingface.co', repo_type='model', repo_id='ShaeNaZar/YsdaSummarizer'), pr_revision=None, pr_num=None)"
|
43 |
-
]
|
44 |
-
},
|
45 |
-
"execution_count": 5,
|
46 |
-
"metadata": {},
|
47 |
-
"output_type": "execute_result"
|
48 |
-
}
|
49 |
-
],
|
50 |
-
"source": [
|
51 |
-
"model.push_to_hub(\"ShaeNaZar/YsdaSummarizer\")"
|
52 |
-
]
|
53 |
-
},
|
54 |
-
{
|
55 |
-
"cell_type": "code",
|
56 |
-
"execution_count": 1,
|
57 |
-
"metadata": {},
|
58 |
-
"outputs": [
|
59 |
-
{
|
60 |
-
"name": "stdout",
|
61 |
-
"output_type": "stream",
|
62 |
-
"text": [
|
63 |
-
"/home/shaenazar/anaconda3/envs/dsenv/bin/python\n"
|
64 |
-
]
|
65 |
-
}
|
66 |
-
],
|
67 |
-
"source": [
|
68 |
-
"!which python"
|
69 |
-
]
|
70 |
-
},
|
71 |
-
{
|
72 |
-
"cell_type": "code",
|
73 |
-
"execution_count": null,
|
74 |
-
"metadata": {},
|
75 |
-
"outputs": [],
|
76 |
-
"source": []
|
77 |
-
}
|
78 |
-
],
|
79 |
-
"metadata": {
|
80 |
-
"kernelspec": {
|
81 |
-
"display_name": "dsenv",
|
82 |
-
"language": "python",
|
83 |
-
"name": "python3"
|
84 |
-
},
|
85 |
-
"language_info": {
|
86 |
-
"codemirror_mode": {
|
87 |
-
"name": "ipython",
|
88 |
-
"version": 3
|
89 |
-
},
|
90 |
-
"file_extension": ".py",
|
91 |
-
"mimetype": "text/x-python",
|
92 |
-
"name": "python",
|
93 |
-
"nbconvert_exporter": "python",
|
94 |
-
"pygments_lexer": "ipython3",
|
95 |
-
"version": "3.12.3"
|
96 |
-
}
|
97 |
-
},
|
98 |
-
"nbformat": 4,
|
99 |
-
"nbformat_minor": 2
|
100 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
train.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|