Hello. here is a script i wrote. please enhance the script. please Incorporate more sophisticated NLP techniques or use machine learning models like VADER or BERT for better sentiment analysis.
        Consider analyzing the body/content of articles if available for more context. also, Create a graphical user interface (GUI) using libraries like Tkinter or PyQt for better interaction.
        Display results in a more user-friendly format. and then also, Incorporate data visualization libraries like matplotlib or seaborn to plot sentiment over time.
        Visual graphs can help in quickly assessing trends. And then send me the full complete updated code. Here is the code for enhancement.. import requests
import pandas as pd
from textblob import TextBlob
from datetime import datetime
import time

# Replace 'YOUR_TRADIER_ACCESS_TOKEN' with your actual Tradier API access token
TRADIER_ACCESS_TOKEN = 'YOUR_TRADIER_ACCESS_TOKEN'

# Base URL for Tradier API (use the sandbox URL if you're using sandbox access)
TRADIER_API_URL = 'https://api.tradier.com/v1'

# List of stock symbols to monitor
stock_symbols = ['AAPL', 'GOOGL', 'AMZN', 'MSFT', 'TSLA']  # You can add more symbols as needed

# Function to fetch news articles for a given stock symbol from Tradier API
def fetch_news(symbol):
    url = f"{TRADIER_API_URL}/markets/news"
    params = {
        'symbols': symbol
    }
    headers = {
        'Authorization': f'Bearer {TRADIER_ACCESS_TOKEN}',
        'Accept': 'application/json'
    }
    response = requests.get(url, params=params, headers=headers)
    data = response.json()
    # Tradier's news endpoint returns a 'null' response if no news is found
    if data.get('news') is None:
        return []
    articles = data['news']['story']
    # Ensure articles are in a list
    if isinstance(articles, dict):
        articles = [articles]
    return articles

# Function to analyze the sentiment of an article's text
def analyze_sentiment(text):
    analysis = TextBlob(text)
    return analysis.sentiment.polarity  # Returns a value between -1.0 (negative) and 1.0 (positive)

# Main function to process news and evaluate significance
def process_news():
    results = []
    for symbol in stock_symbols:
        print(f"\nFetching news for {symbol}...")
        articles = fetch_news(symbol)
        if not articles:
            print(f"No news articles found for {symbol}.")
            continue
        for article in articles:
            headline = article.get('title', '')
            description = article.get('description', '')
            source = article.get('source', '')
            published_at = article.get('published', '')
            link = article.get('url', '')
            combined_text = ' '.join([headline, description])

            if not combined_text.strip():
                continue

            # Perform sentiment analysis
            sentiment_score = analyze_sentiment(combined_text)

            # Determine the significance based on sentiment_score magnitude
            significance = abs(sentiment_score)  # Higher absolute value indicates more significant news

            # Estimate the percent chance of affecting the stock (simple scaling)
            percent_chance = min(100, significance * 100)

            # Timestamp (use published time or current time if not available)
            timestamp = published_at if published_at else datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')

            # Save the result
            result = {
                'Timestamp': timestamp,
                'Stock Symbol': symbol,
                'News Title': headline,
                'Sentiment Score': sentiment_score,
                'Percent Chance of Impact': percent_chance,
                'News URL': link
            }
            results.append(result)

            # Print to console
            print(f"[{timestamp}] {symbol} - Sentiment: {sentiment_score:.2f}, "
                  f"Impact Chance: {percent_chance:.2f}%\nTitle: {headline}\n")

            # Pause briefly to comply with any API rate limits
            time.sleep(0.1)

    if results:
        # Save results to CSV
        df = pd.DataFrame(results)
        output_filename = f"stock_news_analysis_{datetime.utcnow().strftime('%Y%m%d')}.csv"
        df.to_csv(output_filename, index=False)
        print(f"\nResults saved to {output_filename}")
    else:
        print("\nNo results to save.")

if __name__ == "__main__":
    process_news()