Spaces:
Runtime error
Runtime error
update model inputs
Browse files
app.py
CHANGED
|
@@ -34,10 +34,7 @@ def predict(text) -> Tuple[Dict, float]:
|
|
| 34 |
model.eval()
|
| 35 |
|
| 36 |
# Set up the inputs
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
# Transform the input image for use with the model
|
| 40 |
-
X = tokenizer(**inputs).unsqueeze(0) # unsqueeze = add batch dimension on 0th index
|
| 41 |
|
| 42 |
# Put model into eval mode, make prediction
|
| 43 |
model.eval()
|
|
|
|
| 34 |
model.eval()
|
| 35 |
|
| 36 |
# Set up the inputs
|
| 37 |
+
X = tokenizer(text, padding="max_length", truncation=True, return_tensors='pt')
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Put model into eval mode, make prediction
|
| 40 |
model.eval()
|