Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ config = GPT2Config.from_pretrained("distilgpt2")
|
|
| 16 |
model = GPT2LMHeadModel(config)
|
| 17 |
|
| 18 |
# Load the weights from the pytorch_model.bin file
|
| 19 |
-
model_path = "./
|
| 20 |
state_dict = torch.load(model_path, map_location=device) # Load the state_dict
|
| 21 |
model.load_state_dict(state_dict) # Load the state dict into the model
|
| 22 |
|
|
|
|
| 16 |
model = GPT2LMHeadModel(config)
|
| 17 |
|
| 18 |
# Load the weights from the pytorch_model.bin file
|
| 19 |
+
model_path = "./pytorch_model_20.bin" # Path to local model file
|
| 20 |
state_dict = torch.load(model_path, map_location=device) # Load the state_dict
|
| 21 |
model.load_state_dict(state_dict) # Load the state dict into the model
|
| 22 |
|