prath commited on
Commit
31271f0
Β·
1 Parent(s): 6f6d64b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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'])