Mehrdad Esmaeili commited on
Commit
05bcb80
1 Parent(s): f20a992

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -73,10 +73,10 @@ def predict(message, history):
73
  # '\n\n',result['result'],f'|| {result["source_documents"][0].metadata}','\n*****\n')
74
  if result['result'] not in ["I don't know","I don't know."]:
75
  bookNamePath=result["source_documents"][0].metadata["source"]
76
- return result['result']+f'\n---\n*Ignore the description below if the chatbot was unsure about its response \
77
- or if the response is not about the book shown below*\nAmazon Kindle ebook description is:\n {result["source_documents"][0].page_content}'+\
78
  f'\n**from this file:** {bookNamePath}\n'+\
79
- f'**link==> {bookTitleUrlDict[bookNamePath.split("/")[-1][:-4]]}'
80
  else:
81
  return result['result']
82
 
 
73
  # '\n\n',result['result'],f'|| {result["source_documents"][0].metadata}','\n*****\n')
74
  if result['result'] not in ["I don't know","I don't know."]:
75
  bookNamePath=result["source_documents"][0].metadata["source"]
76
+ return result['result']+f'\n---\n***Ignore the description below if the chatbot was unsure about its response \
77
+ or if the response is not about the book shown below***\nAmazon Kindle ebook description is:\n {result["source_documents"][0].page_content}'+\
78
  f'\n**from this file:** {bookNamePath}\n'+\
79
+ f'**link==>** {bookTitleUrlDict[bookNamePath.split("/")[-1][:-4]]}'
80
  else:
81
  return result['result']
82