Faylni yuklashda fayl turini aniqlash va faqat ma'lum fayl turlarini yuklashga ruxsat berish uchun, men oldin taqdim etgan kodni faylni yuklashdan oldin fayl turini tekshirishni o'z ichiga olish uchun o'zgartirishingiz mumkin. Bu erda python-magic kutubxonasi yordamida buni qanday qilishni ko'rsatadigan yangilangan kod parchasi: ```python import os import magic import so'rovlarini google.oauth2.credentials import Credentials # Google Drive API uchun ishonchnomalarni o'rnating = Credentials.from_authorized_user_file_(os.path.expanduser'path/to/credentials.json')) # Yuklamoqchi bo'lgan faylning fayl yo'lini o'rnating = 'path/to/your/large_file' # Ruxsat
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence