devve1 commited on
Commit
269c1ea
1 Parent(s): 767daea

Update ppt_chunker.py

Browse files
Files changed (1) hide show
  1. ppt_chunker.py +10 -1
ppt_chunker.py CHANGED
@@ -183,7 +183,16 @@ def ppt_chunker(file_like, llm):
183
  continue
184
 
185
  if elem.category == 'Table':
186
-
 
 
 
 
 
 
 
 
 
187
 
188
  if current_chunk == '':
189
  current_chunk = clean(elem.text, extra_whitespace=True, dashes=True, bullets=True, lowercase=True, trailing_punctuation=True)
 
183
  continue
184
 
185
  if elem.category == 'Table':
186
+ output = llm.chat(
187
+ build_prompt_conv(),
188
+ SamplingParams(temperature=0.6,top_p=0.9, max_tokens=10, top_k=10)
189
+ )
190
+ print(f'OUTPUT : {output[0].outputs[0].text}')
191
+
192
+ if current_chunk == '':
193
+ current_chunk = output[0].outputs[0].text.replace('"', '')
194
+ else:
195
+ current_chunk += '\n' + output[0].outputs[0].text.replace('"', '')
196
 
197
  if current_chunk == '':
198
  current_chunk = clean(elem.text, extra_whitespace=True, dashes=True, bullets=True, lowercase=True, trailing_punctuation=True)