Spaces:
Sleeping
Sleeping
| # upload_ingest.py | |
| def extract_text_from_files(files): | |
| chunks=[] | |
| for f in files: | |
| if f.endswith(".txt"): | |
| with open(f,"r") as fh: | |
| chunks.append(fh.read()) | |
| return {"chunks":chunks} | |