mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	
							parent
							
								
									55e5f8ede3
								
							
						
					
					
						commit
						a834b03216
					
				|  | @ -324,7 +324,8 @@ cdef class TrainablePipe(Pipe): | ||||||
| 
 | 
 | ||||||
|         def load_model(p): |         def load_model(p): | ||||||
|             try: |             try: | ||||||
|                 self.model.from_bytes(p.open("rb").read()) |                 with open(p, "rb") as mfile: | ||||||
|  |                     self.model.from_bytes(mfile.read()) | ||||||
|             except AttributeError: |             except AttributeError: | ||||||
|                 raise ValueError(Errors.E149) from None |                 raise ValueError(Errors.E149) from None | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user