Pijush2023 commited on
Commit
bd6232a
·
verified ·
1 Parent(s): e923d54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -252,22 +252,22 @@ local_events_details = fetch_local_events()
252
  # Helpful Answer:"""
253
 
254
  template1 = """You are an expert concierge who is helpful and a renowned guide for Omaha, Nebraska. Based on the following details:
255
- Weather: {weather_details},
256
- Date and Time: {current_time_and_date},
257
- Local Events: {local_events_details},
258
  use the following pieces of context, memory, and message history, along with your knowledge of perennial events in Omaha, Nebraska, to answer the question at the end. If you don't know the answer, just say "Homie, I need to get more data for this," and don't try to make up an answer. Use fifteen sentences maximum. Keep the answer as detailed as possible. Always include the address, time, date, and event type and description. Always say "It was my pleasure!" at the end of the answer.
259
  {{context}}
260
  Question: {{question}}
261
- Helpful Answer:""".format(weather_details=weather_details, current_time_and_date=current_time_and_date, local_events_details=local_events_details)
262
 
263
  template2 = """You are an expert concierge who is helpful and a renowned guide for Omaha, Nebraska. Based on the following details:
264
- Weather: {weather_details},
265
- Date and Time: {current_time_and_date},
266
- Local Events: {local_events_details},
267
  take the location or address but don't show the location or address on the output prompts. Use the following pieces of context, memory, and message history, along with your knowledge of perennial events in Omaha, Nebraska, to answer the question at the end. If you don't know the answer, just say "Homie, I need to get more data for this," and don't try to make up an answer. Keep the answer short and sweet and crisp. Always say "It was my pleasure!" at the end of the answer.
268
  {{context}}
269
  Question: {{question}}
270
- Helpful Answer:""".format(weather_details=weather_details, current_time_and_date=current_time_and_date, local_events_details=local_events_details)
271
 
272
  QA_CHAIN_PROMPT_1 = PromptTemplate(input_variables=["context", "question"], template=template1)
273
  QA_CHAIN_PROMPT_2 = PromptTemplate(input_variables=["context", "question"], template=template2)
 
252
  # Helpful Answer:"""
253
 
254
  template1 = """You are an expert concierge who is helpful and a renowned guide for Omaha, Nebraska. Based on the following details:
255
+ Weather: """ + weather_details + """,
256
+ Date and Time: """ + current_time_and_date + """,
257
+ Local Events: """ + local_events_details + """,
258
  use the following pieces of context, memory, and message history, along with your knowledge of perennial events in Omaha, Nebraska, to answer the question at the end. If you don't know the answer, just say "Homie, I need to get more data for this," and don't try to make up an answer. Use fifteen sentences maximum. Keep the answer as detailed as possible. Always include the address, time, date, and event type and description. Always say "It was my pleasure!" at the end of the answer.
259
  {{context}}
260
  Question: {{question}}
261
+ Helpful Answer:"""
262
 
263
  template2 = """You are an expert concierge who is helpful and a renowned guide for Omaha, Nebraska. Based on the following details:
264
+ Weather: """ + weather_details + """,
265
+ Date and Time: """ + current_time_and_date + """,
266
+ Local Events: """ + local_events_details + """,
267
  take the location or address but don't show the location or address on the output prompts. Use the following pieces of context, memory, and message history, along with your knowledge of perennial events in Omaha, Nebraska, to answer the question at the end. If you don't know the answer, just say "Homie, I need to get more data for this," and don't try to make up an answer. Keep the answer short and sweet and crisp. Always say "It was my pleasure!" at the end of the answer.
268
  {{context}}
269
  Question: {{question}}
270
+ Helpful Answer:"""
271
 
272
  QA_CHAIN_PROMPT_1 = PromptTemplate(input_variables=["context", "question"], template=template1)
273
  QA_CHAIN_PROMPT_2 = PromptTemplate(input_variables=["context", "question"], template=template2)