Spaces:
Running
Running
Commit
·
c769c97
1
Parent(s):
ef6e6ca
Update app.py
Browse files
app.py
CHANGED
@@ -100,8 +100,8 @@ model = nn.Sequential(
|
|
100 |
nn.Dropout(0.05) # Dropout
|
101 |
)
|
102 |
|
|
|
103 |
model.eval()
|
104 |
-
torch.save(model.state_dict(), 'large.pth')
|
105 |
|
106 |
@app.route('/infer', methods=['POST'])
|
107 |
def translate():
|
|
|
100 |
nn.Dropout(0.05) # Dropout
|
101 |
)
|
102 |
|
103 |
+
model.load_state_dict(torch.load("large.pth"))
|
104 |
model.eval()
|
|
|
105 |
|
106 |
@app.route('/infer', methods=['POST'])
|
107 |
def translate():
|