Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,12 +29,13 @@ import flask
|
|
29 |
import os
|
30 |
from dotenv import load_dotenv
|
31 |
load_dotenv()
|
|
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
loader = UnstructuredFileLoader('Jio.txt', mode='elements')
|
37 |
-
|
38 |
|
39 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1500, chunk_overlap=150)
|
40 |
texts = text_splitter.split_documents(documents)
|
|
|
29 |
import os
|
30 |
from dotenv import load_dotenv
|
31 |
load_dotenv()
|
32 |
+
global documents
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
loader = UnstructuredFileLoader('Jio.txt', mode='elements')
|
38 |
+
documents= loader.load()
|
39 |
|
40 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1500, chunk_overlap=150)
|
41 |
texts = text_splitter.split_documents(documents)
|