Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ with open('ai_chatbot_data.json', 'r') as file:
|
|
36 |
json_data = json.load(file)
|
37 |
|
38 |
|
39 |
-
template = "Message: {message}\n\nSentiment Analysis: {sentiment}\n\nConversation
|
40 |
prompt = PromptTemplate(template=template, input_variables=["message", "sentiment", "history", "date_time", "bitcoin_price", "database_tag", "json_data"])
|
41 |
conversation_history = []
|
42 |
|
@@ -139,9 +139,9 @@ if __name__ == "__main__":
|
|
139 |
llm = HuggingFaceHub(huggingfacehub_api_token=huggingfacehub_api_token,
|
140 |
repo_id=repo_id,
|
141 |
model_kwargs={
|
142 |
-
"temperature": 0.
|
143 |
-
"max_new_tokens":
|
144 |
-
"top_p": 0.
|
145 |
"repetition_penalty": 1.2,
|
146 |
"num_beams": 3,
|
147 |
"length_penalty": 1.2,
|
|
|
36 |
json_data = json.load(file)
|
37 |
|
38 |
|
39 |
+
template = "Message: {message}\n\nSentiment Analysis: {sentiment}\n\nConversation Now Between you and user: {history}\n\nDate and Time: {date_time}\n\nBitcoin Price: ${bitcoin_price}\n\nBitcoin history from 1-jan-2024 to today the tidy is date-open-high-low-close-adj close-volum: {database_tag}\n\nYour system: {json_data}.\n\nResponse:"
|
40 |
prompt = PromptTemplate(template=template, input_variables=["message", "sentiment", "history", "date_time", "bitcoin_price", "database_tag", "json_data"])
|
41 |
conversation_history = []
|
42 |
|
|
|
139 |
llm = HuggingFaceHub(huggingfacehub_api_token=huggingfacehub_api_token,
|
140 |
repo_id=repo_id,
|
141 |
model_kwargs={
|
142 |
+
"temperature": 0.1,
|
143 |
+
"max_new_tokens": 1024,
|
144 |
+
"top_p": 0.5,
|
145 |
"repetition_penalty": 1.2,
|
146 |
"num_beams": 3,
|
147 |
"length_penalty": 1.2,
|