Todd Deshane commited on
Commit
c8c1946
·
1 Parent(s): d0e30fa

Update notebooks/app.py

Browse files
Files changed (1) hide show
  1. notebooks/app.py +4 -4
notebooks/app.py CHANGED
@@ -32,7 +32,7 @@ from llama_index import SimpleDirectoryReader
32
  required_exts = [".txt"]
33
 
34
  reader = SimpleDirectoryReader(
35
- input_dir="../data",
36
  required_exts=required_exts,
37
  recursive=True,
38
  filename_as_id=True
@@ -54,7 +54,7 @@ doc_summary_index = DocumentSummaryIndex.from_documents(
54
  response_synthesizer=response_synthesizer,
55
  )
56
 
57
- #print(doc_summary_index.get_document_summary('../data/final-hh.txt'))
58
 
59
  @cl.on_chat_start
60
  async def factory():
@@ -76,7 +76,7 @@ async def factory():
76
 
77
  twitter_expert_prompt = "You are a twitter expert. Create a twitter thread based on this: "
78
 
79
- summary_text = doc_summary_index.get_document_summary('../data/final-hh.txt')
80
  summary_text_without_newlines = summary_text.strip()
81
  prompt = twitter_expert_prompt + summary_text
82
 
@@ -122,7 +122,7 @@ async def factory():
122
 
123
 
124
 
125
- #await cl.Message(content=f"generating {doc_summary_index.get_document_summary('../data/final-hh.txt')}").send()
126
 
127
 
128
 
 
32
  required_exts = [".txt"]
33
 
34
  reader = SimpleDirectoryReader(
35
+ input_dir="data",
36
  required_exts=required_exts,
37
  recursive=True,
38
  filename_as_id=True
 
54
  response_synthesizer=response_synthesizer,
55
  )
56
 
57
+ #print(doc_summary_index.get_document_summary('data/final-hh.txt'))
58
 
59
  @cl.on_chat_start
60
  async def factory():
 
76
 
77
  twitter_expert_prompt = "You are a twitter expert. Create a twitter thread based on this: "
78
 
79
+ summary_text = doc_summary_index.get_document_summary('data/final-hh.txt')
80
  summary_text_without_newlines = summary_text.strip()
81
  prompt = twitter_expert_prompt + summary_text
82
 
 
122
 
123
 
124
 
125
+ #await cl.Message(content=f"generating {doc_summary_index.get_document_summary('data/final-hh.txt')}").send()
126
 
127
 
128