ivona221 commited on
Commit
445a348
·
1 Parent(s): ca6fdff

ÃAdd a notebook

Browse files
Files changed (2) hide show
  1. .gitignore +137 -0
  2. Untitled.ipynb → textgeneration.ipynb +18 -1
.gitignore ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.egg-info/
5
+ .ipynb_checkpoints
6
+ *.tsbuildinfo
7
+
8
+ # Created by https://www.gitignore.io/api/python
9
+ # Edit at https://www.gitignore.io/?templates=python
10
+
11
+ ### Python ###
12
+ # Byte-compiled / optimized / DLL files
13
+ __pycache__/
14
+ *.py[cod]
15
+ *$py.class
16
+
17
+ # C extensions
18
+ *.so
19
+
20
+ # Distribution / packaging
21
+ .Python
22
+ build/
23
+ develop-eggs/
24
+ dist/
25
+ downloads/
26
+ eggs/
27
+ .eggs/
28
+ lib/
29
+ lib64/
30
+ parts/
31
+ sdist/
32
+ var/
33
+ wheels/
34
+ pip-wheel-metadata/
35
+ share/python-wheels/
36
+ .installed.cfg
37
+ *.egg
38
+ MANIFEST
39
+
40
+ # PyInstaller
41
+ # Usually these files are written by a python script from a template
42
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
43
+ *.manifest
44
+ *.spec
45
+
46
+ # Installer logs
47
+ pip-log.txt
48
+ pip-delete-this-directory.txt
49
+
50
+ # Unit test / coverage reports
51
+ htmlcov/
52
+ .tox/
53
+ .nox/
54
+ .coverage
55
+ .coverage.*
56
+ .cache
57
+ nosetests.xml
58
+ coverage.xml
59
+ *.cover
60
+ .hypothesis/
61
+ .pytest_cache/
62
+
63
+ # Translations
64
+ *.mo
65
+ *.pot
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # pyenv
77
+ .python-version
78
+
79
+ # celery beat schedule file
80
+ celerybeat-schedule
81
+
82
+ # SageMath parsed files
83
+ *.sage.py
84
+
85
+ # Spyder project settings
86
+ .spyderproject
87
+ .spyproject
88
+
89
+ # Rope project settings
90
+ .ropeproject
91
+
92
+ # Mr Developer
93
+ .mr.developer.cfg
94
+ .project
95
+ .pydevproject
96
+
97
+ # mkdocs documentation
98
+ /site
99
+
100
+ # mypy
101
+ .mypy_cache/
102
+ .dmypy.json
103
+ dmypy.json
104
+
105
+ # Pyre type checker
106
+ .pyre/
107
+
108
+ # OS X stuff
109
+ *.DS_Store
110
+
111
+ # End of https://www.gitignore.io/api/python
112
+
113
+ _temp_extension
114
+ junit.xml
115
+ [uU]ntitled*
116
+ notebook/static/*
117
+ !notebook/static/favicons
118
+ notebook/labextension
119
+ notebook/schemas
120
+ docs/source/changelog.md
121
+ docs/source/contributing.md
122
+
123
+ # playwright
124
+ ui-tests/test-results
125
+ ui-tests/playwright-report
126
+
127
+ # VSCode
128
+ .vscode
129
+
130
+ # RTC
131
+ .jupyter_ystore.db
132
+
133
+ # yarn >=2.x local files
134
+ .yarn/*
135
+ .pnp.*
136
+ ui-tests/.yarn/*
137
+ ui-tests/.pnp.*
Untitled.ipynb → textgeneration.ipynb RENAMED
@@ -1,5 +1,22 @@
1
  {
2
  "cells": [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  {
4
  "cell_type": "code",
5
  "execution_count": 2,
@@ -30,7 +47,7 @@
30
  "tokenizer = AutoTokenizer.from_pretrained('macedonizer/blaze-koneski') \n",
31
  "model = AutoModelWithLMHead.from_pretrained('macedonizer/blaze-koneski')\n",
32
  "\n",
33
- "input_text = 'Москва'\n",
34
  "\n",
35
  "if len(input_text) == 0:\n",
36
  " encoded_input = tokenizer(input_text, return_tensors=\"pt\")\n",
 
1
  {
2
  "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "2b76317d-8fdc-42d9-be38-2195f686e4ae",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "---\n",
11
+ "title: Text generation\n",
12
+ "description: Text generation notebook\n",
13
+ "show-code: False\n",
14
+ "params:\n",
15
+ " text:\n",
16
+ " input: text\n",
17
+ "---"
18
+ ]
19
+ },
20
  {
21
  "cell_type": "code",
22
  "execution_count": 2,
 
47
  "tokenizer = AutoTokenizer.from_pretrained('macedonizer/blaze-koneski') \n",
48
  "model = AutoModelWithLMHead.from_pretrained('macedonizer/blaze-koneski')\n",
49
  "\n",
50
+ "input_text = text\n",
51
  "\n",
52
  "if len(input_text) == 0:\n",
53
  " encoded_input = tokenizer(input_text, return_tensors=\"pt\")\n",