|
Reddit Sentiment Analysis Y4 v3.0.0
|
Classes | |
| class | SearchHistory |
Functions | |
| get_utc_plus_one () | |
| fetch_comments_from_posts (search_term, subreddit='all', sort_order='default', time_filter='all', comment_sort_order='top', max_comments=1000, max_comments_per_post=75) | |
| preprocess_text (text) | |
| predict_sentiment (text) | |
| interpret_sentiment (positive_percentage) | |
| convert_to_html_list (text) | |
| prepare_comments_for_gpt (comments, max_tokens=16385, prompt_type='default') | |
| chatgpt_sentiment_analysis (comments, prompt_type) | |
| save_sentiment_pie_chart (positive_percentage, image_path) | |
| save_word_cloud (comments, image_path) | |
| fetch_comments (search_term, subreddit='all', limit=5) | |
| home () | |
| generate_prompt () | |
| validate_search_term () | |
| landing () | |
| history () | |
Variables | |
| app = Flask(__name__) | |
| secret_key | |
| db = SQLAlchemy(app) | |
| model = DistilBertForSequenceClassification.from_pretrained('C:\\Users\\35387\\Desktop\\app1\\distilbert_sentiment_analysis') | |
| tokenizer = DistilBertTokenizerFast.from_pretrained('C:\\Users\\35387\\Desktop\\app1\\distilbert_sentiment_analysis_tokenizer') | |
| debug | |
| app.fetch_comments | ( | search_term, | |
| subreddit = 'all', | |||
| limit = 5 ) |
| app.fetch_comments_from_posts | ( | search_term, | |
| subreddit = 'all', | |||
| sort_order = 'default', | |||
| time_filter = 'all', | |||
| comment_sort_order = 'top', | |||
| max_comments = 1000, | |||
| max_comments_per_post = 75 ) |
| app.prepare_comments_for_gpt | ( | comments, | |
| max_tokens = 16385, | |||
| prompt_type = 'default' ) |
| app.save_sentiment_pie_chart | ( | positive_percentage, | |
| image_path ) |
| app.model = DistilBertForSequenceClassification.from_pretrained('C:\\Users\\35387\\Desktop\\app1\\distilbert_sentiment_analysis') |
| app.reddit |