tchans123 commited on
Commit
f5cb146
·
1 Parent(s): 93e6c3e

Initial commit

Browse files
Files changed (2) hide show
  1. app.py +15 -0
  2. requirements.txt +266 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import GPT2LMHeadModel, GPT2Tokenizer
3
+
4
+ # Load pre-trained model and tokenizer
5
+ model = GPT2LMHeadModel.from_pretrained("gpt2")
6
+ tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
7
+
8
+ def generate_text(input_text):
9
+ input_ids = tokenizer.encode(input_text, return_tensors="pt")
10
+ output = model.generate(input_ids, max_length=50, num_return_sequences=1)
11
+ generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
12
+ return generated_text
13
+
14
+ iface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
15
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==2.1.0
2
+ aiofiles==23.2.1
3
+ aiohttp==3.9.5
4
+ aiosignal==1.3.1
5
+ altair==5.4.0
6
+ annotated-types==0.7.0
7
+ anyio==4.3.0
8
+ argon2-cffi==23.1.0
9
+ argon2-cffi-bindings==21.2.0
10
+ arrow==1.3.0
11
+ asgiref==3.8.1
12
+ asttokens==2.4.1
13
+ astunparse==1.6.3
14
+ async-lru==2.0.4
15
+ attrs==23.2.0
16
+ azure-core==1.30.1
17
+ azure-identity==1.16.0
18
+ Babel==2.14.0
19
+ beautifulsoup4==4.12.3
20
+ bleach==6.1.0
21
+ blinker==1.8.2
22
+ bokeh==3.4.1
23
+ branca==0.7.2
24
+ bs4==0.0.2
25
+ Cartopy==0.23.0
26
+ census==0.8.22
27
+ certifi==2024.2.2
28
+ cffi==1.16.0
29
+ charset-normalizer==3.3.2
30
+ chromedriver==2.24.1
31
+ citipy==0.0.6
32
+ click==8.1.7
33
+ colorama==0.4.6
34
+ colorcet==3.1.0
35
+ comm==0.2.2
36
+ contourpy==1.2.1
37
+ cors==1.0.1
38
+ Counter==1.0.0
39
+ cryptography==42.0.7
40
+ cycler==0.12.1
41
+ debugpy==1.8.1
42
+ decorator==5.1.1
43
+ defusedxml==0.7.1
44
+ Deprecated==1.2.14
45
+ Django==5.0.6
46
+ dnspython==2.6.1
47
+ et-xmlfile==1.1.0
48
+ executing==2.0.1
49
+ fastapi==0.112.0
50
+ fastjsonschema==2.19.1
51
+ ffmpy==0.4.0
52
+ filelock==3.15.4
53
+ Flask==3.0.3
54
+ Flask-Cors==4.0.1
55
+ flatbuffers==24.3.25
56
+ folium==0.17.0
57
+ fonttools==4.51.0
58
+ fqdn==1.5.1
59
+ frozenlist==1.4.1
60
+ fsspec==2024.6.1
61
+ future==1.0.0
62
+ gast==0.6.0
63
+ geoviews==1.12.0
64
+ gevent==24.2.1
65
+ google-pasta==0.2.0
66
+ gradio==4.40.0
67
+ gradio_client==1.2.0
68
+ greenlet==3.0.3
69
+ grpcio==1.66.1
70
+ gunicorn==23.0.0
71
+ h11==0.14.0
72
+ h2==4.1.0
73
+ h5py==3.11.0
74
+ holoviews==1.18.3
75
+ hpack==4.0.0
76
+ html5lib==1.1
77
+ httpcore==1.0.5
78
+ httpx==0.27.0
79
+ huggingface-hub==0.24.5
80
+ hvplot==0.10.0
81
+ hyperframe==6.0.1
82
+ idna==3.6
83
+ importlib-metadata==7.0.0
84
+ importlib_resources==6.4.0
85
+ ipykernel==6.29.4
86
+ ipython==8.23.0
87
+ ipywidgets==8.1.2
88
+ isoduration==20.11.0
89
+ itsdangerous==2.2.0
90
+ jedi==0.19.1
91
+ Jinja2==3.1.3
92
+ joblib==1.4.2
93
+ json5==0.9.24
94
+ jsonpointer==2.4
95
+ jsonschema==4.21.1
96
+ jsonschema-specifications==2023.12.1
97
+ jupyter==1.0.0
98
+ jupyter-console==6.6.3
99
+ jupyter-events==0.10.0
100
+ jupyter-lsp==2.2.4
101
+ jupyter_client==8.6.1
102
+ jupyter_core==5.7.2
103
+ jupyter_server==2.13.0
104
+ jupyter_server_terminals==0.5.3
105
+ jupyterlab==4.1.5
106
+ jupyterlab_pygments==0.3.0
107
+ jupyterlab_server==2.25.4
108
+ jupyterlab_widgets==3.0.10
109
+ kaggle==1.6.14
110
+ kdtree==0.16
111
+ keras==3.5.0
112
+ kiwisolver==1.4.5
113
+ libclang==18.1.1
114
+ linkify-it-py==2.0.3
115
+ lxml==5.2.2
116
+ Markdown==3.6
117
+ markdown-it-py==3.0.0
118
+ MarkupSafe==2.1.5
119
+ matplotlib==3.9.0
120
+ matplotlib-inline==0.1.6
121
+ mdit-py-plugins==0.4.1
122
+ mdurl==0.1.2
123
+ microsoft-kiota-abstractions==1.3.2
124
+ microsoft-kiota-authentication-azure==1.0.0
125
+ microsoft-kiota-http==1.3.1
126
+ microsoft-kiota-serialization-form==0.1.0
127
+ microsoft-kiota-serialization-json==1.2.0
128
+ microsoft-kiota-serialization-multipart==0.1.0
129
+ microsoft-kiota-serialization-text==1.0.0
130
+ mistune==3.0.2
131
+ ml-dtypes==0.4.1
132
+ msal==1.28.0
133
+ msal-extensions==1.1.0
134
+ msgraph-core==1.0.0
135
+ multidict==6.0.5
136
+ namex==0.0.8
137
+ narwhals==1.5.5
138
+ nbclient==0.10.0
139
+ nbconvert==7.16.3
140
+ nbformat==5.10.3
141
+ nest-asyncio==1.6.0
142
+ nltk==3.9.1
143
+ notebook==7.1.2
144
+ notebook_shim==0.2.4
145
+ numpy==1.26.4
146
+ openpyxl==3.1.4
147
+ opentelemetry-api==1.24.0
148
+ opentelemetry-sdk==1.24.0
149
+ opentelemetry-semantic-conventions==0.45b0
150
+ opt-einsum==3.3.0
151
+ optree==0.12.1
152
+ orjson==3.10.6
153
+ outcome==1.3.0.post0
154
+ overrides==7.7.0
155
+ packaging==24.0
156
+ pandas==2.2.2
157
+ pandocfilters==1.5.1
158
+ panel==1.4.4
159
+ param==2.1.0
160
+ parse==1.20.1
161
+ parso==0.8.3
162
+ pendulum==3.0.0
163
+ pillow==10.3.0
164
+ platformdirs==4.2.0
165
+ plotly==5.22.0
166
+ portalocker==2.8.2
167
+ prometheus_client==0.20.0
168
+ prompt-toolkit==3.0.43
169
+ protobuf==4.25.5
170
+ psutil==5.9.8
171
+ pure-eval==0.2.2
172
+ pycparser==2.22
173
+ pydantic==2.8.2
174
+ pydantic_core==2.20.1
175
+ pydub==0.25.1
176
+ Pygments==2.17.2
177
+ PyJWT==2.8.0
178
+ pymongo==4.8.0
179
+ pyparsing==3.1.2
180
+ pyproj==3.6.1
181
+ pyscript-bootstrap-templates @ git+https://github.com/antielektron/pyscript_bootstrap_templates.git@75efac61b94889faad7905772eb26c6c11463876
182
+ pyshp==2.3.1
183
+ PySocks==1.7.1
184
+ python-dateutil==2.9.0.post0
185
+ python-dotenv==1.0.1
186
+ python-json-logger==2.0.7
187
+ python-multipart==0.0.9
188
+ python-slugify==8.0.4
189
+ pytz==2024.1
190
+ pyviz_comms==3.0.2
191
+ pywin32==306
192
+ pywinpty==2.0.13
193
+ PyYAML==6.0.1
194
+ pyzmq==25.1.2
195
+ qtconsole==5.5.2
196
+ QtPy==2.4.1
197
+ referencing==0.34.0
198
+ regex==2024.7.24
199
+ requests==2.31.0
200
+ requests-file==2.1.0
201
+ rfc3339-validator==0.1.4
202
+ rfc3986-validator==0.1.1
203
+ rich==13.7.1
204
+ rpds-py==0.18.0
205
+ ruff==0.5.6
206
+ scikit-learn==1.5.1
207
+ scipy==1.13.1
208
+ seaborn==0.13.2
209
+ selenium==4.22.0
210
+ semantic-version==2.10.0
211
+ Send2Trash==1.8.2
212
+ setuptools==70.0.0
213
+ shapely==2.0.4
214
+ shellingham==1.5.4
215
+ six==1.16.0
216
+ sniffio==1.3.1
217
+ sortedcontainers==2.4.0
218
+ soupsieve==2.5
219
+ splinter==0.21.0
220
+ SQLAlchemy==2.0.31
221
+ sqlparse==0.5.0
222
+ stack-data==0.6.3
223
+ starlette==0.37.2
224
+ std-uritemplate==0.0.57
225
+ tabulate==0.9.0
226
+ tenacity==8.4.1
227
+ tensorboard==2.17.1
228
+ tensorboard-data-server==0.7.2
229
+ termcolor==2.4.0
230
+ terminado==0.18.1
231
+ text-unidecode==1.3
232
+ textblob==0.18.0.post0
233
+ threadpoolctl==3.5.0
234
+ time-machine==2.14.1
235
+ tinycss2==1.2.1
236
+ tldextract==5.1.2
237
+ tomlkit==0.12.0
238
+ tornado==6.4
239
+ tqdm==4.66.4
240
+ traitlets==5.14.2
241
+ trio==0.26.0
242
+ trio-websocket==0.11.1
243
+ typer==0.12.3
244
+ types-python-dateutil==2.9.0.20240316
245
+ typing_extensions==4.11.0
246
+ tzdata==2024.1
247
+ uc-micro-py==1.0.3
248
+ uri-template==1.3.0
249
+ urllib3==2.2.1
250
+ uvicorn==0.30.5
251
+ wcwidth==0.2.13
252
+ webcolors==1.13
253
+ webencodings==0.5.1
254
+ websocket-client==1.8.0
255
+ websockets==12.0
256
+ Werkzeug==3.0.3
257
+ wheel==0.44.0
258
+ widgetsnbextension==4.0.10
259
+ wordcloud==1.9.3
260
+ wrapt==1.16.0
261
+ wsproto==1.2.0
262
+ xyzservices==2024.4.0
263
+ yarl==1.9.4
264
+ zipp==3.18.2
265
+ zope.event==5.0
266
+ zope.interface==7.0.1