Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ model.eval()
|
|
| 10 |
def predict(input_text):
|
| 11 |
# Your preprocessing and prediction code
|
| 12 |
# output = model(input_text)
|
| 13 |
-
|
| 14 |
input_tensor = torch.tensor(tokens).unsqueeze(0) # Add batch dimension
|
| 15 |
|
| 16 |
with torch.no_grad():
|
|
|
|
| 10 |
def predict(input_text):
|
| 11 |
# Your preprocessing and prediction code
|
| 12 |
# output = model(input_text)
|
| 13 |
+
tokens = tokenize(input_text) # Define this function based on your tokenizer
|
| 14 |
input_tensor = torch.tensor(tokens).unsqueeze(0) # Add batch dimension
|
| 15 |
|
| 16 |
with torch.no_grad():
|