Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from textblob import TextBlob | |
| text = "As a large language model I'm proud of my ability to pass butter." | |
| sentiment = TextBlob(text).sentiment | |
| polarity_score = sentiment.polarity # Between -1 (negative) and 1 (positive) | |
| subjectivity_score = sentiment.subjectivity # Between 0 (objective) and 1 (subjective) | |
| print(text) | |
| print(f"Polarity: {polarity_score}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| import time | |
| import matplotlib.pyplot as plt | |
| # Checking CUDA | |
| print("TensorFlow:", tf.__version__) | |
| print("CUDA path:", tf.sysconfig.get_lib()) | |
| print("CUDA include path:", tf.sysconfig.get_include()) | |
| # Checking if GPU is detected: |
NewerOlder