(types=["pdf", "txt", "mp3", "mp4", 'mpeg', 'doc', 'docx'], **kwargs)
| 133 | |
| 134 | # Upload files and cache them |
| 135 | def upload_files(types=["pdf", "txt", "mp3", "mp4", 'mpeg', 'doc', 'docx'], **kwargs): |
| 136 | files = st.file_uploader( |
| 137 | label=f"Upload files", type=types, **kwargs |
| 138 | ) |
| 139 | if not files: |
| 140 | st.info(f"Please add documents, Note: Scanned documents are not supported yet!") |
| 141 | st.stop() |
| 142 | return cache_files(files, types=types) |
| 143 | |
| 144 | # Cache uploaded files |
| 145 | def cache_files(files, types=["pdf", "txt", "mp3", "mp4", 'mpeg', 'doc', 'docx']) -> list[str]: |
no test coverage detected