Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,11 +49,10 @@ class GPTDriveIntegration:
|
|
| 49 |
|
| 50 |
return results.get('files', [])
|
| 51 |
|
| 52 |
-
|
| 53 |
"""Download and extract text content from file"""
|
| 54 |
try:
|
| 55 |
if 'text' in mime_type or 'document' in mime_type:
|
| 56 |
-
# For Google Docs, export as plain text
|
| 57 |
if 'document' in mime_type:
|
| 58 |
request = self.drive_service.files().export_media(
|
| 59 |
fileId=file_id, mimeType='text/plain'
|
|
|
|
| 49 |
|
| 50 |
return results.get('files', [])
|
| 51 |
|
| 52 |
+
def get_file_content(self, file_id, mime_type):
|
| 53 |
"""Download and extract text content from file"""
|
| 54 |
try:
|
| 55 |
if 'text' in mime_type or 'document' in mime_type:
|
|
|
|
| 56 |
if 'document' in mime_type:
|
| 57 |
request = self.drive_service.files().export_media(
|
| 58 |
fileId=file_id, mimeType='text/plain'
|