Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ from langchain.vectorstores import Chroma
|
|
18 |
from langchain.embeddings import HuggingFaceEmbeddings
|
19 |
import spacy
|
20 |
# Load the English model from SpaCy
|
21 |
-
nlp = spacy.load("
|
22 |
|
23 |
def util_upload_file_and_return_list_docs(uploaded_files):
|
24 |
#util_del_cwd()
|
@@ -88,7 +88,7 @@ def get_summary_single_doc(text):
|
|
88 |
#Define the LLM
|
89 |
# here we are using OpenAI's ChatGPT
|
90 |
from langchain.chat_models import ChatOpenAI
|
91 |
-
model_name = "gpt-4o"
|
92 |
llm=ChatOpenAI(temperature=0, openai_api_key=LLM_KEY, model_name=model_name)
|
93 |
|
94 |
refine_chain = load_summarize_chain(
|
|
|
18 |
from langchain.embeddings import HuggingFaceEmbeddings
|
19 |
import spacy
|
20 |
# Load the English model from SpaCy
|
21 |
+
nlp = spacy.load("en_core_web_sm")
|
22 |
|
23 |
def util_upload_file_and_return_list_docs(uploaded_files):
|
24 |
#util_del_cwd()
|
|
|
88 |
#Define the LLM
|
89 |
# here we are using OpenAI's ChatGPT
|
90 |
from langchain.chat_models import ChatOpenAI
|
91 |
+
model_name = "gpt-4o-mini"
|
92 |
llm=ChatOpenAI(temperature=0, openai_api_key=LLM_KEY, model_name=model_name)
|
93 |
|
94 |
refine_chain = load_summarize_chain(
|