Spaces:
Runtime error
Runtime error
Commit ·
c95667e
1
Parent(s): 9f75b50
adding app
Browse files
app.py
CHANGED
|
@@ -79,7 +79,8 @@ def summarize_data(docs,llm_model,chain_type='refine'):
|
|
| 79 |
for groupNum in range(0, len(match.groups())):
|
| 80 |
groupNum = groupNum + 1
|
| 81 |
lines = match.group(groupNum).strip().split("\n")
|
| 82 |
-
|
|
|
|
| 83 |
|
| 84 |
|
| 85 |
def process_documents(texts,data_chunk=1000,chunk_overlap=10):
|
|
@@ -117,6 +118,7 @@ def document_loader(temperature,max_tokens,api_key,model_name,file_path):
|
|
| 117 |
print("Document Processed ..")
|
| 118 |
texts = process_documents(texts=converted_txt)
|
| 119 |
lines = summarize_data(docs=texts,llm_model=model)
|
|
|
|
| 120 |
return lines
|
| 121 |
else:
|
| 122 |
return "Error in Processsing document "
|
|
|
|
| 79 |
for groupNum in range(0, len(match.groups())):
|
| 80 |
groupNum = groupNum + 1
|
| 81 |
lines = match.group(groupNum).strip().split("\n")
|
| 82 |
+
|
| 83 |
+
return " ".join(lines)
|
| 84 |
|
| 85 |
|
| 86 |
def process_documents(texts,data_chunk=1000,chunk_overlap=10):
|
|
|
|
| 118 |
print("Document Processed ..")
|
| 119 |
texts = process_documents(texts=converted_txt)
|
| 120 |
lines = summarize_data(docs=texts,llm_model=model)
|
| 121 |
+
|
| 122 |
return lines
|
| 123 |
else:
|
| 124 |
return "Error in Processsing document "
|