Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -144,8 +144,10 @@ def PDFChunkerWithSeparator(filepath, separator): | |
| 144 | 
             
                        content += page.extract_text()
         | 
| 145 | 
             
                elif filepath.endswith(".txt"):
         | 
| 146 | 
             
                    with open(filepath) as f:
         | 
| 147 | 
            -
                         | 
| 148 | 
             
                        f.close()
         | 
|  | |
|  | |
| 149 | 
             
                splitted_content_list = content.split(separator)
         | 
| 150 |  | 
| 151 | 
             
                doclist = []
         | 
|  | |
| 144 | 
             
                        content += page.extract_text()
         | 
| 145 | 
             
                elif filepath.endswith(".txt"):
         | 
| 146 | 
             
                    with open(filepath) as f:
         | 
| 147 | 
            +
                        lines = f.readlines()
         | 
| 148 | 
             
                        f.close()
         | 
| 149 | 
            +
                        for line in lines:
         | 
| 150 | 
            +
                            content+=line
         | 
| 151 | 
             
                splitted_content_list = content.split(separator)
         | 
| 152 |  | 
| 153 | 
             
                doclist = []
         | 
