[Bugfix] fix chat pdf streamlit example (#1108)
Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user