SeemG commited on
Commit
dba5c21
·
verified ·
1 Parent(s): 639e778

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import torch
2
- from model import GPT, decode
3
  import gradio as gr
4
 
5
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
6
 
7
- model = GPT()
8
  model.load_state_dict(torch.load("./neo_gpt.pth", map_location=device))
9
  def generate_text(max_new_tokens):
10
  context = torch.zeros((1, 1), dtype=torch.long)
 
1
  import torch
2
+ from model import BigramLanguageModel, decode
3
  import gradio as gr
4
 
5
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
6
 
7
+ model = BigramLanguageModel()
8
  model.load_state_dict(torch.load("./neo_gpt.pth", map_location=device))
9
  def generate_text(max_new_tokens):
10
  context = torch.zeros((1, 1), dtype=torch.long)