Spaces:
Sleeping
Sleeping
EbubeJohnEnyi
commited on
Commit
•
280e02c
1
Parent(s):
0e2d485
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def generate_gpt2_response(question):
|
|
25 |
top_k=10,
|
26 |
top_p=1,
|
27 |
temperature=0.9,
|
28 |
-
pad_token_id=model.config.
|
29 |
generated_response = tokenizer.decode(generated_output[0], skip_special_tokens=True)
|
30 |
return generated_response
|
31 |
|
@@ -64,7 +64,7 @@ if __name__ == '__main__':
|
|
64 |
if user_input.lower() == 'exit':
|
65 |
break
|
66 |
response = find_question_and_answer(json_file_path, user_input)
|
67 |
-
|
68 |
|
69 |
|
70 |
|
|
|
25 |
top_k=10,
|
26 |
top_p=1,
|
27 |
temperature=0.9,
|
28 |
+
pad_token_id=model.config.eos_token_id)
|
29 |
generated_response = tokenizer.decode(generated_output[0], skip_special_tokens=True)
|
30 |
return generated_response
|
31 |
|
|
|
64 |
if user_input.lower() == 'exit':
|
65 |
break
|
66 |
response = find_question_and_answer(json_file_path, user_input)
|
67 |
+
st.write(response)
|
68 |
|
69 |
|
70 |
|