Update app.py
Browse files
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 = "
|
9 |
-
tokenizer = GPT2Tokenizer.from_pretrained("
|
10 |
-
model = GPT2LMHeadModel.from_pretrained("
|
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
|