Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from model import GPTConfig, GPT
|
|
3 |
import torch
|
4 |
from contextlib import nullcontext
|
5 |
import os
|
|
|
6 |
import pickle
|
7 |
|
8 |
def remove_caseifer(text):
|
@@ -90,6 +91,7 @@ def get_model_list():
|
|
90 |
return model_files
|
91 |
|
92 |
def gen(input):
|
|
|
93 |
generated_text = ''
|
94 |
start_ids = encode(add_caseifer(input))
|
95 |
x = (torch.tensor(start_ids, dtype=torch.long, device=device)[None, ...])
|
|
|
3 |
import torch
|
4 |
from contextlib import nullcontext
|
5 |
import os
|
6 |
+
import time
|
7 |
import pickle
|
8 |
|
9 |
def remove_caseifer(text):
|
|
|
91 |
return model_files
|
92 |
|
93 |
def gen(input):
|
94 |
+
print(input)
|
95 |
generated_text = ''
|
96 |
start_ids = encode(add_caseifer(input))
|
97 |
x = (torch.tensor(start_ids, dtype=torch.long, device=device)[None, ...])
|