Spaces:
Sleeping
Sleeping
update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ if "messages" not in st.session_state.keys(): # Initialize the chat messages his
|
|
17 |
@st.cache_resource(show_spinner=False)
|
18 |
def load_data():
|
19 |
with st.spinner(text="Loading and indexing the ESB docs – hang tight! This should take 1-2 minutes."):
|
20 |
-
reader = SimpleDirectoryReader(input_dir="
|
21 |
docs = reader.load_data()
|
22 |
service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-4", temperature=0.8, system_prompt="AI Assistant, as a sales executive at Executive Speakers Bureau specializing in providing information about ESB services and speakers, ensure that only managed speakers from the dataset are included. Avoid duplicating speakers, and refrain from introducing speakers not part of the dataset. If no suitable speakers are available, kindly refrain from suggesting external speakers. Please furnish the top 10 managed speakers, accompanied by brief descriptions and profile links, considering speech topics from the specified data source."))
|
23 |
index = VectorStoreIndex.from_documents(docs, service_context=service_context)
|
|
|
17 |
@st.cache_resource(show_spinner=False)
|
18 |
def load_data():
|
19 |
with st.spinner(text="Loading and indexing the ESB docs – hang tight! This should take 1-2 minutes."):
|
20 |
+
reader = SimpleDirectoryReader(input_dir="MaleFemale.pdf", recursive=True)
|
21 |
docs = reader.load_data()
|
22 |
service_context = ServiceContext.from_defaults(llm=OpenAI(model="gpt-4", temperature=0.8, system_prompt="AI Assistant, as a sales executive at Executive Speakers Bureau specializing in providing information about ESB services and speakers, ensure that only managed speakers from the dataset are included. Avoid duplicating speakers, and refrain from introducing speakers not part of the dataset. If no suitable speakers are available, kindly refrain from suggesting external speakers. Please furnish the top 10 managed speakers, accompanied by brief descriptions and profile links, considering speech topics from the specified data source."))
|
23 |
index = VectorStoreIndex.from_documents(docs, service_context=service_context)
|