Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Euryeth
/
LLM_Ariphes
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
461845f
LLM_Ariphes
/
app.py
Euryeth
api.py
461845f
verified
3 months ago
raw
Copy download link
history
blame
Safe
217 Bytes
from
transformers
import
pipeline
model = pipeline(
"text-generation"
, model=
"gpt2"
)
def
generate_text
(
prompt, max_length=
100
):
output = model(prompt, max_length=max_length)
return
output[
0
][
"generated_text"
]