Jezia commited on
Commit
a9a1fd2
·
1 Parent(s): dd99e8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -21,9 +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
- predictions, _ = model.predict(inputs['input_ids'])
27
  results = np.argmax(predictions, axis=1)
28
  answer = tokenizer.decode(results[0].flatten(), skip_special_tokens=True)
29
  return answer
 
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
  answer = tokenizer.decode(results[0].flatten(), skip_special_tokens=True)
29
  return answer