Spaces:
Runtime error
Runtime error
Commit
·
e25f3f3
1
Parent(s):
587fdfe
add docx
Browse files
app.py
CHANGED
|
@@ -233,15 +233,16 @@ def SummarizeDoc():
|
|
| 233 |
split_docs = process_documents_2()
|
| 234 |
tt = len(split_docs)
|
| 235 |
print(split_docs[tt-1])
|
| 236 |
-
|
| 237 |
try:
|
| 238 |
sum_chain = load_summarize_chain(llm, chain_type='refine', verbose=True)
|
| 239 |
sum_text = sum_chain.run(split_docs)
|
|
|
|
| 240 |
except Exception as e:
|
| 241 |
print("SummarizeDoc error:", e)
|
| 242 |
|
| 243 |
# sum_text = "test sum"
|
| 244 |
-
|
| 245 |
|
| 246 |
|
| 247 |
|
|
|
|
| 233 |
split_docs = process_documents_2()
|
| 234 |
tt = len(split_docs)
|
| 235 |
print(split_docs[tt-1])
|
| 236 |
+
sum_text=""
|
| 237 |
try:
|
| 238 |
sum_chain = load_summarize_chain(llm, chain_type='refine', verbose=True)
|
| 239 |
sum_text = sum_chain.run(split_docs)
|
| 240 |
+
return sum_text
|
| 241 |
except Exception as e:
|
| 242 |
print("SummarizeDoc error:", e)
|
| 243 |
|
| 244 |
# sum_text = "test sum"
|
| 245 |
+
|
| 246 |
|
| 247 |
|
| 248 |
|