Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,8 @@ from transformers import pipeline
|
|
| 4 |
from gpt import model
|
| 5 |
|
| 6 |
# Character mappings from the training script
|
|
|
|
|
|
|
| 7 |
chars = sorted(list(set(text)))
|
| 8 |
vocab_size = len(chars)
|
| 9 |
stoi = { ch:i for i,ch in enumerate(chars) }
|
|
|
|
| 4 |
from gpt import model
|
| 5 |
|
| 6 |
# Character mappings from the training script
|
| 7 |
+
with open('input.txt', 'r', encoding='utf-8') as f:
|
| 8 |
+
text = f.read()
|
| 9 |
chars = sorted(list(set(text)))
|
| 10 |
vocab_size = len(chars)
|
| 11 |
stoi = { ch:i for i,ch in enumerate(chars) }
|