ibrahimmkhalid commited on
Commit
660dfb8
·
1 Parent(s): 39eea7e
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -169,19 +169,10 @@ decode = lambda x: ''.join([int_to_string[i] for i in x])
169
 
170
  model_pickle_path = './model.pkl'
171
 
172
- #print the current path
173
- st.write(os.getcwd())
174
- #print contents of current path
175
- st.write(os.listdir(os.getcwd()))
176
-
177
- try:
178
- st.write('loading model parameters...')
179
- with open(model_pickle_path, 'rb') as f:
180
- model = pickle.load(f)
181
- st.write('model loaded successfully!')
182
- except:
183
- st.error('ERROR: model loading failed/model not found. Please run ./train_gpt_openwebtext.py first.')
184
- exit()
185
 
186
  prompt = ''
187
  prompt = st.text_area('Prompt:', value=prompt, height=100, max_chars=block_size - 1, key='prompt')
 
169
 
170
  model_pickle_path = './model.pkl'
171
 
172
+ st.write('loading model parameters...')
173
+ with open(model_pickle_path, 'rb') as f:
174
+ model = pickle.load(f)
175
+ st.write('model loaded successfully!')
 
 
 
 
 
 
 
 
 
176
 
177
  prompt = ''
178
  prompt = st.text_area('Prompt:', value=prompt, height=100, max_chars=block_size - 1, key='prompt')