Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def model_generate(text):
|
|
41 |
# generate some output based on the context
|
42 |
#context = torch.tensor(np.array(encode("Hello! My name is ", tokenizer)))
|
43 |
#context = torch.zeros((1, 1), dtype=torch.long, device=DEVICE)
|
44 |
-
text_input = str(
|
45 |
context_np = np.array(encode(text_input, tokenizer))
|
46 |
context_np = np.array([context_np])
|
47 |
context = torch.from_numpy(context_np)
|
|
|
41 |
# generate some output based on the context
|
42 |
#context = torch.tensor(np.array(encode("Hello! My name is ", tokenizer)))
|
43 |
#context = torch.zeros((1, 1), dtype=torch.long, device=DEVICE)
|
44 |
+
text_input = str(text)
|
45 |
context_np = np.array(encode(text_input, tokenizer))
|
46 |
context_np = np.array([context_np])
|
47 |
context = torch.from_numpy(context_np)
|