Jezia commited on
Commit
e4dd2b9
·
1 Parent(s): 940e355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,8 +21,9 @@ def tokenize_data(text):
21
 
22
  def generate_answers(text):
23
  inputs = tokenize_data(text)
24
- x = tf.dtypes.cast(inputs['input_ids'], tf.int64)
25
- predictions, _ = model.predict(x)
 
26
  results = np.argmax(predictions, axis=1)
27
  print(results)
28
  answer = tokenizer.decode(results[0].flatten(), skip_special_tokens=True)
 
21
 
22
  def generate_answers(text):
23
  inputs = tokenize_data(text)
24
+ #x = tf.dtypes.cast(inputs['input_ids'], tf.int64)
25
+ #predictions, _ = model.predict(x)
26
+ predictions, _ = model.predict(inputs['input_ids'])
27
  results = np.argmax(predictions, axis=1)
28
  print(results)
29
  answer = tokenizer.decode(results[0].flatten(), skip_special_tokens=True)