Spaces:
Runtime error
Runtime error
Delete ii.ipynb
Browse files
ii.ipynb
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"cells": [
|
3 |
-
{
|
4 |
-
"cell_type": "code",
|
5 |
-
"execution_count": 7,
|
6 |
-
"metadata": {},
|
7 |
-
"outputs": [],
|
8 |
-
"source": [
|
9 |
-
"from transformers import pipeline"
|
10 |
-
]
|
11 |
-
},
|
12 |
-
{
|
13 |
-
"cell_type": "code",
|
14 |
-
"execution_count": 8,
|
15 |
-
"metadata": {},
|
16 |
-
"outputs": [
|
17 |
-
{
|
18 |
-
"name": "stderr",
|
19 |
-
"output_type": "stream",
|
20 |
-
"text": [
|
21 |
-
"Downloading config.json: 100%|██████████| 827/827 [00:00<00:00, 276kB/s]\n",
|
22 |
-
"Downloading model.safetensors: 23%|██▎ | 231M/990M [01:04<03:30, 3.61MB/s] "
|
23 |
-
]
|
24 |
-
}
|
25 |
-
],
|
26 |
-
"source": [
|
27 |
-
"pipe = pipeline(\"text2text-generation\", model=\"samanjoy2/bnpunct_banglat5_seq2seq_finetuned\", device='cpu')"
|
28 |
-
]
|
29 |
-
},
|
30 |
-
{
|
31 |
-
"cell_type": "code",
|
32 |
-
"execution_count": 6,
|
33 |
-
"metadata": {},
|
34 |
-
"outputs": [
|
35 |
-
{
|
36 |
-
"data": {
|
37 |
-
"text/plain": [
|
38 |
-
"'বুঝলাম নাহ। তুমার সম্যা কি?'"
|
39 |
-
]
|
40 |
-
},
|
41 |
-
"execution_count": 6,
|
42 |
-
"metadata": {},
|
43 |
-
"output_type": "execute_result"
|
44 |
-
}
|
45 |
-
],
|
46 |
-
"source": [
|
47 |
-
"texts = \"বুঝলাম নাহ তুমার সম্যা কি\"\n",
|
48 |
-
"ipas = pipe(texts, max_length=512, batch_size=1)[0]['generated_text']\n",
|
49 |
-
"ipas"
|
50 |
-
]
|
51 |
-
},
|
52 |
-
{
|
53 |
-
"cell_type": "code",
|
54 |
-
"execution_count": null,
|
55 |
-
"metadata": {},
|
56 |
-
"outputs": [],
|
57 |
-
"source": []
|
58 |
-
}
|
59 |
-
],
|
60 |
-
"metadata": {
|
61 |
-
"kernelspec": {
|
62 |
-
"display_name": "gputorch_1",
|
63 |
-
"language": "python",
|
64 |
-
"name": "python3"
|
65 |
-
},
|
66 |
-
"language_info": {
|
67 |
-
"codemirror_mode": {
|
68 |
-
"name": "ipython",
|
69 |
-
"version": 3
|
70 |
-
},
|
71 |
-
"file_extension": ".py",
|
72 |
-
"mimetype": "text/x-python",
|
73 |
-
"name": "python",
|
74 |
-
"nbconvert_exporter": "python",
|
75 |
-
"pygments_lexer": "ipython3",
|
76 |
-
"version": "3.9.18"
|
77 |
-
}
|
78 |
-
},
|
79 |
-
"nbformat": 4,
|
80 |
-
"nbformat_minor": 2
|
81 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|