Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,7 @@ def preprocess(text):
|
|
16 |
truncation=True, max_length=512, return_tensors='pt')
|
17 |
return inputs
|
18 |
# Define a function to use the model to make predictions
|
19 |
-
def predict():
|
20 |
-
review = request.form['review']
|
21 |
inputs = preprocess(review)
|
22 |
with torch.no_grad():
|
23 |
outputs = model(inputs['input_ids'], inputs['attention_mask'])
|
|
|
16 |
truncation=True, max_length=512, return_tensors='pt')
|
17 |
return inputs
|
18 |
# Define a function to use the model to make predictions
|
19 |
+
def predict(review):
|
|
|
20 |
inputs = preprocess(review)
|
21 |
with torch.no_grad():
|
22 |
outputs = model(inputs['input_ids'], inputs['attention_mask'])
|