Kartheekb7 commited on
Commit
204eaac
·
verified ·
1 Parent(s): 660cf6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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) }