fixed bug in test.py
Browse files- .env.example +1 -1
- data/questions.txt +4 -3
- test.py +1 -1
.env.example
CHANGED
@@ -19,7 +19,7 @@ HF_PIPELINE_DEVICE_TYPE=
|
|
19 |
# LOAD_QUANTIZED_MODEL=4bit
|
20 |
# LOAD_QUANTIZED_MODEL=8bit
|
21 |
|
22 |
-
DISABLE_MODEL_PRELOADING=
|
23 |
CHAT_HISTORY_ENABLED=true
|
24 |
SHOW_PARAM_SETTINGS=false
|
25 |
SHARE_GRADIO_APP=false
|
|
|
19 |
# LOAD_QUANTIZED_MODEL=4bit
|
20 |
# LOAD_QUANTIZED_MODEL=8bit
|
21 |
|
22 |
+
DISABLE_MODEL_PRELOADING=true
|
23 |
CHAT_HISTORY_ENABLED=true
|
24 |
SHOW_PARAM_SETTINGS=false
|
25 |
SHARE_GRADIO_APP=false
|
data/questions.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
1 |
+
What's AI?
|
2 |
+
life in AI era
|
3 |
+
machine learning
|
4 |
+
generative model
|
test.py
CHANGED
@@ -128,7 +128,7 @@ while True:
|
|
128 |
custom_handler.reset()
|
129 |
|
130 |
start = timer()
|
131 |
-
result = qa_chain.call({"question": query, "chat_history": chat_history})
|
132 |
end = timer()
|
133 |
print(f"Completed in {end - start:.3f}s")
|
134 |
|
|
|
128 |
custom_handler.reset()
|
129 |
|
130 |
start = timer()
|
131 |
+
result = qa_chain.call({"question": query, "chat_history": chat_history}, None)
|
132 |
end = timer()
|
133 |
print(f"Completed in {end - start:.3f}s")
|
134 |
|