Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,9 @@ def tokenize_data(text):
|
|
21 |
|
22 |
def generate_answers(text):
|
23 |
inputs = tokenize_data(text)
|
24 |
-
|
25 |
-
|
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
|