RashiAgarwal commited on
Commit
145a816
1 Parent(s): db19198

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -112,7 +112,7 @@ def tsaigpt(start:str , max_new_tokens = 300, num_samples =2, tokeniser= token):
112
  model = GPT(config)
113
 
114
  load_checkpoint(fabric, model, checkpoint_path)
115
- print(model)
116
  model.eval()
117
  model.to(device)
118
  if compile:
@@ -132,10 +132,9 @@ def tsaigpt(start:str , max_new_tokens = 300, num_samples =2, tokeniser= token):
132
  output = tokeniser.decode(y[0])
133
  return output
134
 
135
- INTERFACE = gr.Interface(fn=tsaigpt, inputs=[gr.Textbox(label= "Prompt", value= 'All that glisters is not gold.'),
136
  gr.Slider(minimum = 300, maximum = 500, value= 300, label= "Maximum number of tokens to be generated")] ,
137
  outputs=gr.Text(label= "Generated Text"), title="TSAI_GPT",
138
  description="TSAIGPT is a transformer-based language model with only 0.16 billion parameters, trained on RedPajama 1T Sample.",
139
- examples = [['We know what we are, but know not what we may be',300],
140
- ['Sweet are the uses of adversity which, like the toad, ugly and venomous, wears yet a precious jewel in his head',300],]
141
  ).launch(debug=True)
 
112
  model = GPT(config)
113
 
114
  load_checkpoint(fabric, model, checkpoint_path)
115
+ #print(model)
116
  model.eval()
117
  model.to(device)
118
  if compile:
 
132
  output = tokeniser.decode(y[0])
133
  return output
134
 
135
+ INTERFACE = gr.Interface(fn=tsaigpt, inputs=[gr.Textbox(label= "Prompt", value= 'We know what we are, but know not what we may be'),
136
  gr.Slider(minimum = 300, maximum = 500, value= 300, label= "Maximum number of tokens to be generated")] ,
137
  outputs=gr.Text(label= "Generated Text"), title="TSAI_GPT",
138
  description="TSAIGPT is a transformer-based language model with only 0.16 billion parameters, trained on RedPajama 1T Sample.",
139
+ examples = [['We know what we are, but know not what we may be',300],]
 
140
  ).launch(debug=True)