cleanup notebook and make usable
This commit is contained in:
@@ -2,6 +2,23 @@ import pandas as pd
|
||||
|
||||
from ollama import Client
|
||||
import json
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import random
|
||||
import matplotlib.colors as mcolors
|
||||
|
||||
def blue_color_func( word, font_size, position, orientation, random_state=None, **kwargs):
|
||||
# Use the provided random_state for reproducibility if available, else use random module
|
||||
r = random_state if random_state else random
|
||||
|
||||
# Sample from the darker end of the 'Blues' colormap (e.g., 0.4 to 1.0)
|
||||
# 0.0 is white/light, 1.0 is dark blue
|
||||
min_val, max_val = 0.4, 1.0
|
||||
color_val = r.uniform(min_val, max_val)
|
||||
|
||||
# Get color from matplotlib colormap
|
||||
rgba = plt.cm.Blues(color_val)
|
||||
return mcolors.to_hex(rgba)
|
||||
|
||||
|
||||
def worker_extraction(row, host, model):
|
||||
|
||||
Reference in New Issue
Block a user