Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kann KI mit offenen Daten kreative sein
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Niels Becker
Kann KI mit offenen Daten kreative sein
Commits
4e7c2a4f
Commit
4e7c2a4f
authored
3 years ago
by
Niels Becker
Browse files
Options
Downloads
Patches
Plain Diff
Aitextgen
parent
4b5294ba
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Update Neural Style Transfer.py
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aitextgen.py
+14
-0
14 additions, 0 deletions
aitextgen.py
with
14 additions
and
0 deletions
aitextgen.py
0 → 100644
+
14
−
0
View file @
4e7c2a4f
#This Code is based on a library from minimaxir.
#https://github.com/minimaxir/aitextgen
from
aitextgen
import
aitextgen
# Without any parameters, aitextgen() will download, cache, and load the 124M GPT-2 "small" model
ai
=
aitextgen
()
ai
.
generate
()
ai
.
generate
(
n
=
3
,
max_length
=
100
)
ai
.
generate
(
n
=
3
,
prompt
=
"
I believe in unicorns because
"
,
max_length
=
100
)
ai
.
generate_to_file
(
n
=
3
,
prompt
=
"""
I believe in unicorns because
"""
,
max_length
=
300
,
temperature
=
1.5
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment