Update README.md
Browse files
README.md
CHANGED
|
@@ -11,60 +11,7 @@ tags:
|
|
| 11 |
- text2gpt
|
| 12 |
- openai
|
| 13 |
---
|
| 14 |
-
<
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
line-height: 1.6;
|
| 19 |
-
background-color: #f9f9f9;
|
| 20 |
-
color: #333;
|
| 21 |
-
}
|
| 22 |
-
h1 {
|
| 23 |
-
color: #2c3e50;
|
| 24 |
-
}
|
| 25 |
-
h2 {
|
| 26 |
-
color: #34495e;
|
| 27 |
-
}
|
| 28 |
-
ul {
|
| 29 |
-
margin-left: 20px;
|
| 30 |
-
}
|
| 31 |
-
a {
|
| 32 |
-
color: #2980b9;
|
| 33 |
-
text-decoration: none;
|
| 34 |
-
}
|
| 35 |
-
a:hover {
|
| 36 |
-
text-decoration: underline;
|
| 37 |
-
}
|
| 38 |
-
.code {
|
| 39 |
-
background-color: #eef;
|
| 40 |
-
border-radius: 4px;
|
| 41 |
-
padding: 10px;
|
| 42 |
-
display: inline-block;
|
| 43 |
-
font-family: 'Courier New', Courier, monospace;
|
| 44 |
-
}
|
| 45 |
-
</style>
|
| 46 |
-
<main>
|
| 47 |
-
<h1>Hugging Face Text2GPT-like GPT-2</h1>
|
| 48 |
-
<h2>Overview</h2>
|
| 49 |
-
<p>This project focuses on implementing a variant of GPT-2 influenced by the Hugging Face Transformers library.</p>
|
| 50 |
-
<h2>Installation</h2>
|
| 51 |
-
<p>To install the necessary packages, use:</p>
|
| 52 |
-
<pre class="code">pip install transformers torch</pre>
|
| 53 |
-
<h2>Usage</h2>
|
| 54 |
-
<p>To generate text using the model:</p>
|
| 55 |
-
<pre class="code">
|
| 56 |
-
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
| 57 |
-
|
| 58 |
-
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
| 59 |
-
model = GPT2LMHeadModel.from_pretrained('gpt2')
|
| 60 |
-
|
| 61 |
-
input_text = "Your prompt here"
|
| 62 |
-
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
| 63 |
-
output = model.generate(input_ids, max_length=50)
|
| 64 |
-
print(tokenizer.decode(output[0], skip_special_tokens=True)
|
| 65 |
-
</pre>
|
| 66 |
-
<h2>Contributing</h2>
|
| 67 |
-
<p>Feel free to fork the repository and submit pull requests for enhancements!</p>
|
| 68 |
-
<h2>License</h2>
|
| 69 |
-
<p>This project is licensed under the MIT License. See the <a href="LICENSE">LICENSE</a> file for details.</p>
|
| 70 |
-
</main>
|
|
|
|
| 11 |
- text2gpt
|
| 12 |
- openai
|
| 13 |
---
|
| 14 |
+
<figure class="inline-block size-full items-center justify-center rounded-r-xl bg-gradient-to-br from-amber-500/10 to-transparent text-4xl max-md:py-6">
|
| 15 |
+
Text2GPT
|
| 16 |
+
</figure>
|
| 17 |
+
<h1>Thank you for using Text2GPT</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|