Spaces:
Runtime error
Runtime error
Commit
·
36754dc
1
Parent(s):
d03241e
Update app.py
Browse files
app.py
CHANGED
@@ -210,9 +210,11 @@ class GradioInference:
|
|
210 |
from langchain.chains.llm import LLMChain
|
211 |
from langchain.prompts import PromptTemplate
|
212 |
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
|
|
|
213 |
|
214 |
OPENAI_API_KEY = os.environ['OPENAI_API_KEY']
|
215 |
-
|
|
|
216 |
text = results["text"]
|
217 |
# Define prompt
|
218 |
prompt_template = """Write a concise summary of the following:
|
|
|
210 |
from langchain.chains.llm import LLMChain
|
211 |
from langchain.prompts import PromptTemplate
|
212 |
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
|
213 |
+
from langchain.document_loaders import WebBaseLoader
|
214 |
|
215 |
OPENAI_API_KEY = os.environ['OPENAI_API_KEY']
|
216 |
+
loader = WebBaseLoader("https://lilianweng.github.io/posts/2023-06-23-agent/")
|
217 |
+
|
218 |
text = results["text"]
|
219 |
# Define prompt
|
220 |
prompt_template = """Write a concise summary of the following:
|