aamos commited on
Commit
8af4ec4
·
verified ·
1 Parent(s): b5f417a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,9 +5,9 @@ from transformers import GPT2LMHeadModel, GPT2Tokenizer
5
  app = Flask(__name__)
6
 
7
  # Load the LSTM-based language model
8
- model_path = "your_model.pth" # Replace with your model path
9
- tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
10
- model = GPT2LMHeadModel.from_pretrained("gpt2")
11
  model.load_state_dict(torch.load(model_path))
12
 
13
  # Set the model to evaluation mode
 
5
  app = Flask(__name__)
6
 
7
  # Load the LSTM-based language model
8
+ model_path = "gpt3_mini_quantized_2x_16bits.pth"
9
+ tokenizer = GPT2Tokenizer.from_pretrained("Deniskin/gpt3_medium")
10
+ model = GPT2LMHeadModel.from_pretrained("Deniskin/gpt3_medium")
11
  model.load_state_dict(torch.load(model_path))
12
 
13
  # Set the model to evaluation mode