[Bugfix] fix chat pdf streamlit example (#1108)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2024-01-03 13:46:44 +05:30
committed by GitHub
parent f5e3410e9a
commit 1976d38b25
3 changed files with 2 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ if prompt := st.chat_input("Ask me anything!"):
full_response += "\n\n**Sources**:\n"
sources = []
for i, citation in enumerate(citations):
source = citation[1]
source = citation[1]["url"]
pattern = re.compile(r"([^/]+)\.[^\.]+\.pdf$")
match = pattern.search(source)
if match:

View File

@@ -7,7 +7,7 @@ while True:
user_input = input("Enter your question (type 'exit' to quit): ")
# Break the loop if the user types 'exit'
if user_input.lower() == 'exit':
if user_input.lower() == "exit":
break
# Process the input and provide a response