Spaces:
Sleeping
Sleeping
Add import hmac
Browse files
app.py
CHANGED
@@ -11,6 +11,8 @@ from langchain.prompts import PromptTemplate
|
|
11 |
from langchain.prompts.few_shot import FewShotPromptTemplate
|
12 |
import os
|
13 |
|
|
|
|
|
14 |
import streamlit as st
|
15 |
from streamlit_chat import message
|
16 |
from PIL import Image
|
@@ -175,7 +177,7 @@ if prompt := st.chat_input("What is up?"):
|
|
175 |
if src.page_content.startswith('Paragraph:'):
|
176 |
sources.add(src.metadata['source'])
|
177 |
sources = list(sources)
|
178 |
-
|
179 |
if len(sources)==0:
|
180 |
full_response = full_response + "\n\n[No sources]"
|
181 |
else:
|
|
|
11 |
from langchain.prompts.few_shot import FewShotPromptTemplate
|
12 |
import os
|
13 |
|
14 |
+
# Web App
|
15 |
+
import hmac
|
16 |
import streamlit as st
|
17 |
from streamlit_chat import message
|
18 |
from PIL import Image
|
|
|
177 |
if src.page_content.startswith('Paragraph:'):
|
178 |
sources.add(src.metadata['source'])
|
179 |
sources = list(sources)
|
180 |
+
|
181 |
if len(sources)==0:
|
182 |
full_response = full_response + "\n\n[No sources]"
|
183 |
else:
|