
# Model Description

This model was finetuned on the Dataset[A-Roucher/english_historical_quotes](https://huggingface.co/datasets/A-Roucher/english_historical_quotes)
using the model [gpt2-large](https://huggingface.co/gpt2-large])


# Example Use cases 
<pre>
<code>
<span style="color:#4CAF50">from</span> transformers <span style="color:#4CAF50">import</span> pipeline
pipe = pipeline("text-generation", model="damerajee/gpt2-large-hist-quotes-2")</span>
prompt = "write a quote based on business"
generated_quote = pipe(prompt,top_k=2, temperature=2.0,repetition_penalty=2.0)[0]['generated_text']
print('\n\n', generated_quote)
</code>
</pre>

# Streaming option

<pre>
<code>
<span style="color:#4CAF50">from</span> transformers <span style="color:#4CAF50">import</span> import AutoModelForCausalLM, AutoTokenizer, TextStreamer, pipeline
streamer = TextStreamer(tokenzier, skip_prompt=True)
pipe = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenzier,
    max_length=40,
    temperature=0.6,
    pad_token_id=tokenzier.eos_token_id,
    top_p=0.95,
    repetition_penalty=1.2,
    streamer=streamer
)
pipe("write a quote based on war and business")

</code>
</pre>
{"language": ["en"], "license": "openrail", "library_name": "transformers", "tags": ["history", "quotes", "gpt2"], "datasets": ["A-Roucher/english_historical_quotes"], "pipeline_tag": "text-generation"}
transformers safetensors gpt2 text-generation history quotes en dataset:A-Roucher/english_historical_quotes license:openrail autotrain_compatible endpoints_compatible text-generation-inference region:us