Iskabore commited on
Commit
5f53c31
·
1 Parent(s): 0bd391b

add files and start exploration

Browse files
Files changed (3) hide show
  1. .gitignore +4 -0
  2. SmartSummarizer.ipynb +278 -0
  3. requirements.txt +4 -0
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ .DS_Store
4
+ Sandbox_Text_Summarization.ipynb
SmartSummarizer.ipynb ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "e26838fe",
6
+ "metadata": {},
7
+ "source": [
8
+ "# 📝 Multilingual Text Summarization (French + English)\n",
9
+ "\n",
10
+ "## 📘 Context\n",
11
+ "\n",
12
+ "Text summarization is a crucial NLP task used to extract key insights from long documents. With the advancement of transformer-based architectures like BART and T5, we can now generate high-quality summaries in different languages.\n",
13
+ "\n",
14
+ "This notebook demonstrates how to perform automatic summarization in:\n",
15
+ "- 🇬🇧 **English**, using `facebook/bart-large-cnn`\n",
16
+ "- 🇫🇷 **French**, using `plguillou/t5-base-fr-sum-cnndm`\n",
17
+ "\n",
18
+ "## 🎯 Objectives\n",
19
+ "\n",
20
+ "- Load and compare language-specific summarization models\n",
21
+ "- Generate and display summaries for both English and French input texts\n",
22
+ "- Test edge cases and observe model behavior"
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "markdown",
27
+ "id": "32637c47",
28
+ "metadata": {},
29
+ "source": [
30
+ "## Packages"
31
+ ]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": 1,
36
+ "id": "682e051c",
37
+ "metadata": {},
38
+ "outputs": [
39
+ {
40
+ "name": "stdout",
41
+ "output_type": "stream",
42
+ "text": [
43
+ "Requirement already satisfied: transformers in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 1)) (4.51.3)\n",
44
+ "Collecting torch\n",
45
+ " Downloading torch-2.7.0-cp39-cp39-win_amd64.whl (212.4 MB)\n",
46
+ " -------------------------------------- 212.4/212.4 MB 1.5 MB/s eta 0:00:00\n",
47
+ "Collecting langdetect\n",
48
+ " Downloading langdetect-1.0.9.tar.gz (981 kB)\n",
49
+ " ------------------------------------- 981.5/981.5 kB 12.5 MB/s eta 0:00:00\n",
50
+ " Preparing metadata (setup.py): started\n",
51
+ " Preparing metadata (setup.py): finished with status 'done'\n",
52
+ "Collecting gradio\n",
53
+ " Downloading gradio-4.44.1-py3-none-any.whl (18.1 MB)\n",
54
+ " --------------------------------------- 18.1/18.1 MB 13.1 MB/s eta 0:00:00\n",
55
+ "Requirement already satisfied: numpy>=1.17 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (1.21.5)\n",
56
+ "Requirement already satisfied: safetensors>=0.4.3 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (0.5.3)\n",
57
+ "Requirement already satisfied: tqdm>=4.27 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (4.64.1)\n",
58
+ "Requirement already satisfied: packaging>=20.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (21.3)\n",
59
+ "Requirement already satisfied: filelock in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (3.6.0)\n",
60
+ "Requirement already satisfied: requests in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (2.28.1)\n",
61
+ "Requirement already satisfied: pyyaml>=5.1 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (6.0)\n",
62
+ "Requirement already satisfied: huggingface-hub<1.0,>=0.30.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (0.30.2)\n",
63
+ "Requirement already satisfied: tokenizers<0.22,>=0.21 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (0.21.1)\n",
64
+ "Requirement already satisfied: regex!=2019.12.17 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from transformers->-r requirements.txt (line 1)) (2022.7.9)\n",
65
+ "Requirement already satisfied: jinja2 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from torch->-r requirements.txt (line 2)) (2.11.3)\n",
66
+ "Requirement already satisfied: networkx in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from torch->-r requirements.txt (line 2)) (2.8.4)\n",
67
+ "Requirement already satisfied: fsspec in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from torch->-r requirements.txt (line 2)) (2025.3.2)\n",
68
+ "Collecting typing-extensions>=4.10.0\n",
69
+ " Downloading typing_extensions-4.13.2-py3-none-any.whl (45 kB)\n",
70
+ " ---------------------------------------- 45.8/45.8 kB ? eta 0:00:00\n",
71
+ "Collecting sympy>=1.13.3\n",
72
+ " Downloading sympy-1.14.0-py3-none-any.whl (6.3 MB)\n",
73
+ " ---------------------------------------- 6.3/6.3 MB 14.9 MB/s eta 0:00:00\n",
74
+ "Requirement already satisfied: six in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from langdetect->-r requirements.txt (line 3)) (1.16.0)\n",
75
+ "Collecting tomlkit==0.12.0\n",
76
+ " Downloading tomlkit-0.12.0-py3-none-any.whl (37 kB)\n",
77
+ "Collecting aiofiles<24.0,>=22.0\n",
78
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
79
+ "Requirement already satisfied: matplotlib~=3.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from gradio->-r requirements.txt (line 4)) (3.5.2)\n",
80
+ "Collecting pydantic>=2.0\n",
81
+ " Downloading pydantic-2.11.4-py3-none-any.whl (443 kB)\n",
82
+ " -------------------------------------- 443.9/443.9 kB 6.9 MB/s eta 0:00:00\n",
83
+ "Collecting semantic-version~=2.0\n",
84
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
85
+ "Requirement already satisfied: anyio<5.0,>=3.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from gradio->-r requirements.txt (line 4)) (3.5.0)\n",
86
+ "Collecting ffmpy\n",
87
+ " Downloading ffmpy-0.5.0-py3-none-any.whl (6.0 kB)\n",
88
+ "Requirement already satisfied: pandas<3.0,>=1.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from gradio->-r requirements.txt (line 4)) (1.4.4)\n",
89
+ "Collecting ruff>=0.2.2\n",
90
+ " Downloading ruff-0.11.8-py3-none-win_amd64.whl (11.6 MB)\n",
91
+ " --------------------------------------- 11.6/11.6 MB 13.1 MB/s eta 0:00:00\n",
92
+ "Collecting typer<1.0,>=0.12\n",
93
+ " Downloading typer-0.15.3-py3-none-any.whl (45 kB)\n",
94
+ " ---------------------------------------- 45.3/45.3 kB ? eta 0:00:00\n",
95
+ "Collecting pydub\n",
96
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
97
+ "Collecting python-multipart>=0.0.9\n",
98
+ " Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)\n",
99
+ "Collecting fastapi<1.0\n",
100
+ " Downloading fastapi-0.115.12-py3-none-any.whl (95 kB)\n",
101
+ " ---------------------------------------- 95.2/95.2 kB 5.3 MB/s eta 0:00:00\n",
102
+ "Requirement already satisfied: pillow<11.0,>=8.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from gradio->-r requirements.txt (line 4)) (9.2.0)\n",
103
+ "Requirement already satisfied: markupsafe~=2.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from gradio->-r requirements.txt (line 4)) (2.0.1)\n",
104
+ "Collecting orjson~=3.0\n",
105
+ " Downloading orjson-3.10.18-cp39-cp39-win_amd64.whl (134 kB)\n",
106
+ " -------------------------------------- 134.5/134.5 kB 4.0 MB/s eta 0:00:00\n",
107
+ "Collecting httpx>=0.24.1\n",
108
+ " Downloading httpx-0.28.1-py3-none-any.whl (73 kB)\n",
109
+ " ---------------------------------------- 73.5/73.5 kB ? eta 0:00:00\n",
110
+ "Collecting importlib-resources<7.0,>=1.3\n",
111
+ " Downloading importlib_resources-6.5.2-py3-none-any.whl (37 kB)\n",
112
+ "Collecting uvicorn>=0.14.0\n",
113
+ " Downloading uvicorn-0.34.2-py3-none-any.whl (62 kB)\n",
114
+ " ---------------------------------------- 62.5/62.5 kB 3.5 MB/s eta 0:00:00\n",
115
+ "Collecting gradio-client==1.3.0\n",
116
+ " Downloading gradio_client-1.3.0-py3-none-any.whl (318 kB)\n",
117
+ " ------------------------------------- 318.7/318.7 kB 19.3 MB/s eta 0:00:00\n",
118
+ "Collecting urllib3~=2.0\n",
119
+ " Downloading urllib3-2.4.0-py3-none-any.whl (128 kB)\n",
120
+ " ---------------------------------------- 128.7/128.7 kB ? eta 0:00:00\n",
121
+ "Collecting websockets<13.0,>=10.0\n",
122
+ " Downloading websockets-12.0-cp39-cp39-win_amd64.whl (124 kB)\n",
123
+ " ---------------------------------------- 125.0/125.0 kB ? eta 0:00:00\n",
124
+ "Requirement already satisfied: idna>=2.8 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from anyio<5.0,>=3.0->gradio->-r requirements.txt (line 4)) (3.3)\n",
125
+ "Requirement already satisfied: sniffio>=1.1 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from anyio<5.0,>=3.0->gradio->-r requirements.txt (line 4)) (1.2.0)\n",
126
+ "Collecting starlette<0.47.0,>=0.40.0\n",
127
+ " Downloading starlette-0.46.2-py3-none-any.whl (72 kB)\n",
128
+ " ---------------------------------------- 72.0/72.0 kB 3.9 MB/s eta 0:00:00\n",
129
+ "Collecting httpcore==1.*\n",
130
+ " Downloading httpcore-1.0.9-py3-none-any.whl (78 kB)\n",
131
+ " ---------------------------------------- 78.8/78.8 kB ? eta 0:00:00\n",
132
+ "Requirement already satisfied: certifi in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from httpx>=0.24.1->gradio->-r requirements.txt (line 4)) (2022.9.14)\n",
133
+ "Collecting h11>=0.16\n",
134
+ " Downloading h11-0.16.0-py3-none-any.whl (37 kB)\n",
135
+ "Requirement already satisfied: zipp>=3.1.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from importlib-resources<7.0,>=1.3->gradio->-r requirements.txt (line 4)) (3.8.0)\n",
136
+ "Requirement already satisfied: pyparsing>=2.2.1 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (3.0.9)\n",
137
+ "Requirement already satisfied: fonttools>=4.22.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (4.25.0)\n",
138
+ "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (1.4.2)\n",
139
+ "Requirement already satisfied: python-dateutil>=2.7 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (2.8.2)\n",
140
+ "Requirement already satisfied: cycler>=0.10 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (0.11.0)\n",
141
+ "Requirement already satisfied: pytz>=2020.1 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from pandas<3.0,>=1.0->gradio->-r requirements.txt (line 4)) (2022.1)\n",
142
+ "Collecting pydantic-core==2.33.2\n",
143
+ " Downloading pydantic_core-2.33.2-cp39-cp39-win_amd64.whl (2.0 MB)\n",
144
+ " ---------------------------------------- 2.0/2.0 MB 41.4 MB/s eta 0:00:00\n",
145
+ "Collecting annotated-types>=0.6.0\n",
146
+ " Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)\n",
147
+ "Collecting typing-inspection>=0.4.0\n",
148
+ " Downloading typing_inspection-0.4.0-py3-none-any.whl (14 kB)\n",
149
+ "Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from sympy>=1.13.3->torch->-r requirements.txt (line 2)) (1.2.1)\n",
150
+ "Requirement already satisfied: colorama in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from tqdm>=4.27->transformers->-r requirements.txt (line 1)) (0.4.5)\n",
151
+ "Requirement already satisfied: click>=8.0.0 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from typer<1.0,>=0.12->gradio->-r requirements.txt (line 4)) (8.0.4)\n",
152
+ "Collecting shellingham>=1.3.0\n",
153
+ " Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)\n",
154
+ "Collecting rich>=10.11.0\n",
155
+ " Downloading rich-14.0.0-py3-none-any.whl (243 kB)\n",
156
+ " ------------------------------------- 243.2/243.2 kB 14.6 MB/s eta 0:00:00\n",
157
+ "Requirement already satisfied: charset-normalizer<3,>=2 in c:\\users\\issa kabore\\anaconda3\\lib\\site-packages (from requests->transformers->-r requirements.txt (line 1)) (2.0.4)\n",
158
+ "Collecting requests\n",
159
+ " Downloading requests-2.32.3-py3-none-any.whl (64 kB)\n",
160
+ " ---------------------------------------- 64.9/64.9 kB ? eta 0:00:00\n",
161
+ "Collecting pygments<3.0.0,>=2.13.0\n",
162
+ " Downloading pygments-2.19.1-py3-none-any.whl (1.2 MB)\n",
163
+ " ---------------------------------------- 1.2/1.2 MB 38.0 MB/s eta 0:00:00\n",
164
+ "Collecting markdown-it-py>=2.2.0\n",
165
+ " Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)\n",
166
+ " ---------------------------------------- 87.5/87.5 kB ? eta 0:00:00\n",
167
+ "Collecting anyio<5.0,>=3.0\n",
168
+ " Downloading anyio-4.9.0-py3-none-any.whl (100 kB)\n",
169
+ " ---------------------------------------- 100.9/100.9 kB ? eta 0:00:00\n",
170
+ "Collecting exceptiongroup>=1.0.2\n",
171
+ " Downloading exceptiongroup-1.2.2-py3-none-any.whl (16 kB)\n",
172
+ "Collecting mdurl~=0.1\n",
173
+ " Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
174
+ "Building wheels for collected packages: langdetect\n",
175
+ " Building wheel for langdetect (setup.py): started\n",
176
+ " Building wheel for langdetect (setup.py): finished with status 'done'\n",
177
+ " Created wheel for langdetect: filename=langdetect-1.0.9-py3-none-any.whl size=993225 sha256=b37ed7c002d96ce87bc295fafe28e5a92854509e09bf0d18175aae952cdcd3ea\n",
178
+ " Stored in directory: c:\\users\\issa kabore\\appdata\\local\\pip\\cache\\wheels\\d1\\c1\\d9\\7e068de779d863bc8f8fc9467d85e25cfe47fa5051fff1a1bb\n",
179
+ "Successfully built langdetect\n",
180
+ "Installing collected packages: pydub, websockets, urllib3, typing-extensions, tomlkit, sympy, shellingham, semantic-version, ruff, python-multipart, pygments, orjson, mdurl, langdetect, importlib-resources, h11, ffmpy, exceptiongroup, annotated-types, aiofiles, uvicorn, typing-inspection, torch, requests, pydantic-core, markdown-it-py, httpcore, anyio, starlette, rich, pydantic, httpx, typer, gradio-client, fastapi, gradio\n",
181
+ " Attempting uninstall: urllib3\n",
182
+ " Found existing installation: urllib3 1.26.11\n",
183
+ " Uninstalling urllib3-1.26.11:\n",
184
+ " Successfully uninstalled urllib3-1.26.11\n",
185
+ " Attempting uninstall: typing-extensions\n",
186
+ " Found existing installation: typing_extensions 4.3.0\n",
187
+ " Uninstalling typing_extensions-4.3.0:\n",
188
+ " Successfully uninstalled typing_extensions-4.3.0\n",
189
+ " Attempting uninstall: tomlkit\n",
190
+ " Found existing installation: tomlkit 0.11.1\n",
191
+ " Uninstalling tomlkit-0.11.1:\n",
192
+ " Successfully uninstalled tomlkit-0.11.1\n",
193
+ " Attempting uninstall: sympy\n",
194
+ " Found existing installation: sympy 1.10.1\n",
195
+ " Uninstalling sympy-1.10.1:\n",
196
+ " Successfully uninstalled sympy-1.10.1\n",
197
+ " Attempting uninstall: pygments\n",
198
+ " Found existing installation: Pygments 2.11.2\n",
199
+ " Uninstalling Pygments-2.11.2:\n",
200
+ " Successfully uninstalled Pygments-2.11.2\n",
201
+ " Attempting uninstall: requests\n",
202
+ " Found existing installation: requests 2.28.1\n",
203
+ " Uninstalling requests-2.28.1:\n",
204
+ " Successfully uninstalled requests-2.28.1\n",
205
+ " Attempting uninstall: anyio\n",
206
+ " Found existing installation: anyio 3.5.0\n",
207
+ " Uninstalling anyio-3.5.0:\n",
208
+ " Successfully uninstalled anyio-3.5.0\n",
209
+ "Successfully installed aiofiles-23.2.1 annotated-types-0.7.0 anyio-4.9.0 exceptiongroup-1.2.2 fastapi-0.115.12 ffmpy-0.5.0 gradio-4.44.1 gradio-client-1.3.0 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 importlib-resources-6.5.2 langdetect-1.0.9 markdown-it-py-3.0.0 mdurl-0.1.2 orjson-3.10.18 pydantic-2.11.4 pydantic-core-2.33.2 pydub-0.25.1 pygments-2.19.1 python-multipart-0.0.20 requests-2.32.3 rich-14.0.0 ruff-0.11.8 semantic-version-2.10.0 shellingham-1.5.4 starlette-0.46.2 sympy-1.14.0 tomlkit-0.12.0 torch-2.7.0 typer-0.15.3 typing-extensions-4.13.2 typing-inspection-0.4.0 urllib3-2.4.0 uvicorn-0.34.2 websockets-12.0\n"
210
+ ]
211
+ },
212
+ {
213
+ "name": "stderr",
214
+ "output_type": "stream",
215
+ "text": [
216
+ "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
217
+ "spyder 5.2.2 requires pyqt5<5.13, which is not installed.\n",
218
+ "spyder 5.2.2 requires pyqtwebengine<5.13, which is not installed.\n",
219
+ "jupyter-server 1.18.1 requires anyio<4,>=3.1.0, but you have anyio 4.9.0 which is incompatible.\n",
220
+ "conda-repo-cli 1.0.24 requires clyent==1.2.1, but you have clyent 1.2.2 which is incompatible.\n",
221
+ "conda-repo-cli 1.0.24 requires nbformat==5.4.0, but you have nbformat 5.5.0 which is incompatible.\n",
222
+ "conda-repo-cli 1.0.24 requires requests==2.28.1, but you have requests 2.32.3 which is incompatible.\n",
223
+ "botocore 1.27.28 requires urllib3<1.27,>=1.25.4, but you have urllib3 2.4.0 which is incompatible.\n"
224
+ ]
225
+ }
226
+ ],
227
+ "source": [
228
+ "# !pip install transformers sentencepiece\n",
229
+ "!pip install -r requirements.txt"
230
+ ]
231
+ },
232
+ {
233
+ "cell_type": "code",
234
+ "execution_count": 2,
235
+ "id": "b7763e5e",
236
+ "metadata": {},
237
+ "outputs": [],
238
+ "source": [
239
+ "# import loguru\n",
240
+ "\n",
241
+ "from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM\n",
242
+ "import textwrap # Text wrapping and filling\n",
243
+ "\n",
244
+ "import gradio as gr\n",
245
+ "from langdetect import detect"
246
+ ]
247
+ },
248
+ {
249
+ "cell_type": "code",
250
+ "execution_count": null,
251
+ "id": "80f389cd",
252
+ "metadata": {},
253
+ "outputs": [],
254
+ "source": []
255
+ }
256
+ ],
257
+ "metadata": {
258
+ "kernelspec": {
259
+ "display_name": "base",
260
+ "language": "python",
261
+ "name": "python3"
262
+ },
263
+ "language_info": {
264
+ "codemirror_mode": {
265
+ "name": "ipython",
266
+ "version": 3
267
+ },
268
+ "file_extension": ".py",
269
+ "mimetype": "text/x-python",
270
+ "name": "python",
271
+ "nbconvert_exporter": "python",
272
+ "pygments_lexer": "ipython3",
273
+ "version": "3.9.13"
274
+ }
275
+ },
276
+ "nbformat": 4,
277
+ "nbformat_minor": 5
278
+ }
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ transformers
2
+ torch
3
+ langdetect
4
+ gradio # or streamlit