Spaces:
Runtime error
Runtime error
Chris Finlayson
commited on
Commit
•
67500b9
1
Parent(s):
903e65c
Working application, pre adding URL input
Browse files- .DS_Store +0 -0
- app.py +192 -0
- docs/chunks.csv +1018 -0
- docs/graph.csv +288 -0
- docs/index.html +0 -0
- helpers/__init__ +0 -0
- helpers/__pycache__/df_helpers.cpython-311.pyc +0 -0
- helpers/__pycache__/prompts.cpython-311.pyc +0 -0
- helpers/df_helpers.py +71 -0
- helpers/prompts.py +73 -0
- lib/bindings/utils.js +189 -0
- lib/tom-select/tom-select.complete.min.js +356 -0
- lib/tom-select/tom-select.css +334 -0
- lib/vis-9.0.4/vis-network.css +0 -0
- lib/vis-9.0.4/vis-network.min.js +0 -0
- lib/vis-9.1.2/vis-network.css +0 -0
- lib/vis-9.1.2/vis-network.min.js +0 -0
- ollama/__init__.py +0 -0
- ollama/__pycache__/__init__.cpython-311.pyc +0 -0
- ollama/__pycache__/client.cpython-311.pyc +0 -0
- ollama/client.py +236 -0
- requirements.txt +9 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
app.py
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr # Importing gradio for creating web interface
|
2 |
+
import os # Importing os for operating system related tasks
|
3 |
+
import pandas as pd
|
4 |
+
import numpy as np
|
5 |
+
import os
|
6 |
+
from langchain.document_loaders import PyPDFLoader, UnstructuredPDFLoader, PyPDFium2Loader
|
7 |
+
from langchain.document_loaders import PyPDFDirectoryLoader, DirectoryLoader
|
8 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
9 |
+
from pathlib import Path
|
10 |
+
import random
|
11 |
+
|
12 |
+
outputdirectory = Path(f"./docs/")
|
13 |
+
|
14 |
+
def read_pdf(file): # Define a function to read a PDF file
|
15 |
+
loader = PyPDFLoader(file)
|
16 |
+
# loader = DirectoryLoader(inputdirectory, show_progress=True)
|
17 |
+
documents = loader.load()
|
18 |
+
|
19 |
+
splitter = RecursiveCharacterTextSplitter(
|
20 |
+
chunk_size=1500,
|
21 |
+
chunk_overlap=150,
|
22 |
+
length_function=len,
|
23 |
+
is_separator_regex=False,
|
24 |
+
)
|
25 |
+
|
26 |
+
pages = splitter.split_documents(documents)
|
27 |
+
from helpers.df_helpers import documents2Dataframe
|
28 |
+
return documents2Dataframe(pages)
|
29 |
+
|
30 |
+
|
31 |
+
def extract_concepts(df, regenerate): # Define a function to get entities from a sentence
|
32 |
+
from helpers.df_helpers import df2Graph
|
33 |
+
from helpers.df_helpers import graph2Df
|
34 |
+
## To regenerate the graph with LLM, set this to True
|
35 |
+
|
36 |
+
if regenerate:
|
37 |
+
concepts_list = df2Graph(df, model='zephyr:latest')
|
38 |
+
dfg1 = graph2Df(concepts_list)
|
39 |
+
if not os.path.exists(outputdirectory):
|
40 |
+
os.makedirs(outputdirectory)
|
41 |
+
|
42 |
+
dfg1.to_csv(outputdirectory/"graph.csv", sep="|", index=False)
|
43 |
+
df.to_csv(outputdirectory/"chunks.csv", sep="|", index=False)
|
44 |
+
else:
|
45 |
+
dfg1 = pd.read_csv(outputdirectory/"graph.csv", sep="|")
|
46 |
+
|
47 |
+
dfg1.replace("", np.nan, inplace=True)
|
48 |
+
dfg1.dropna(subset=["node_1", "node_2", 'edge'], inplace=True)
|
49 |
+
dfg1['count'] = 4
|
50 |
+
return dfg1
|
51 |
+
|
52 |
+
def contextual_proximity(df: pd.DataFrame) -> pd.DataFrame:
|
53 |
+
## Melt the dataframe into a list of nodes
|
54 |
+
dfg_long = pd.melt(
|
55 |
+
df, id_vars=["chunk_id"], value_vars=["node_1", "node_2"], value_name="node"
|
56 |
+
)
|
57 |
+
dfg_long.drop(columns=["variable"], inplace=True)
|
58 |
+
# Self join with chunk id as the key will create a link between terms occuring in the same text chunk.
|
59 |
+
dfg_wide = pd.merge(dfg_long, dfg_long, on="chunk_id", suffixes=("_1", "_2"))
|
60 |
+
# drop self loops
|
61 |
+
self_loops_drop = dfg_wide[dfg_wide["node_1"] == dfg_wide["node_2"]].index
|
62 |
+
dfg2 = dfg_wide.drop(index=self_loops_drop).reset_index(drop=True)
|
63 |
+
## Group and count edges.
|
64 |
+
dfg2 = (
|
65 |
+
dfg2.groupby(["node_1", "node_2"])
|
66 |
+
.agg({"chunk_id": [",".join, "count"]})
|
67 |
+
.reset_index()
|
68 |
+
)
|
69 |
+
dfg2.columns = ["node_1", "node_2", "chunk_id", "count"]
|
70 |
+
dfg2.replace("", np.nan, inplace=True)
|
71 |
+
dfg2.dropna(subset=["node_1", "node_2"], inplace=True)
|
72 |
+
# Drop edges with 1 count
|
73 |
+
dfg2 = dfg2[dfg2["count"] != 1]
|
74 |
+
dfg2["edge"] = "contextual proximity"
|
75 |
+
return dfg2
|
76 |
+
|
77 |
+
|
78 |
+
## Now add these colors to communities and make another dataframe
|
79 |
+
def colors2Community(communities) -> pd.DataFrame:
|
80 |
+
import seaborn as sns
|
81 |
+
palette = "hls"
|
82 |
+
## Define a color palette
|
83 |
+
p = sns.color_palette(palette, len(communities)).as_hex()
|
84 |
+
random.shuffle(p)
|
85 |
+
rows = []
|
86 |
+
group = 0
|
87 |
+
for community in communities:
|
88 |
+
color = p.pop()
|
89 |
+
group += 1
|
90 |
+
for node in community:
|
91 |
+
rows += [{"node": node, "color": color, "group": group}]
|
92 |
+
df_colors = pd.DataFrame(rows)
|
93 |
+
return df_colors
|
94 |
+
|
95 |
+
|
96 |
+
def render_graph(G):
|
97 |
+
from pyvis.network import Network
|
98 |
+
graph_output_directory = "./docs/index.html"
|
99 |
+
net = Network(
|
100 |
+
notebook=False,
|
101 |
+
# bgcolor="#1a1a1a",
|
102 |
+
cdn_resources="remote",
|
103 |
+
height="900px",
|
104 |
+
width="100%",
|
105 |
+
select_menu=True,
|
106 |
+
# font_color="#cccccc",
|
107 |
+
filter_menu=False,
|
108 |
+
)
|
109 |
+
|
110 |
+
net.from_nx(G)
|
111 |
+
# net.repulsion(node_distance=150, spring_length=400)
|
112 |
+
net.force_atlas_2based(central_gravity=0.015, gravity=-31)
|
113 |
+
# net.barnes_hut(gravity=-18100, central_gravity=5.05, spring_length=380)
|
114 |
+
net.show_buttons(filter_=["physics"])
|
115 |
+
|
116 |
+
net.show(graph_output_directory)
|
117 |
+
|
118 |
+
with open(graph_output_directory, 'r') as file:
|
119 |
+
html_content = file.read()
|
120 |
+
|
121 |
+
html_content = html_content.replace("'", "\"")
|
122 |
+
|
123 |
+
iframe = f"""<iframe style="width: 100%; height: 480px" name="result" allow="midi; geolocation; microphone; camera;
|
124 |
+
display-capture; encrypted-media;" sandbox="allow-modals allow-forms
|
125 |
+
allow-scripts allow-same-origin allow-popups
|
126 |
+
allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
|
127 |
+
allowpaymentrequest="" frameborder="0" srcdoc='{html_content}'></iframe>"""
|
128 |
+
|
129 |
+
return iframe
|
130 |
+
|
131 |
+
def execute_process(file, regenerate): # Define a function to execute the process
|
132 |
+
df = read_pdf(file.name) # Read the PDF file
|
133 |
+
dfg1 = extract_concepts(df, regenerate)
|
134 |
+
dfg2 = contextual_proximity(dfg1)
|
135 |
+
dfg = pd.concat([dfg1, dfg2], axis=0)
|
136 |
+
dfg = (
|
137 |
+
dfg.groupby(["node_1", "node_2"])
|
138 |
+
.agg({"chunk_id": ",".join, "edge": ','.join, 'count': 'sum'})
|
139 |
+
.reset_index()
|
140 |
+
)
|
141 |
+
nodes = pd.concat([dfg['node_1'], dfg['node_2']], axis=0).unique()
|
142 |
+
import networkx as nx
|
143 |
+
G = nx.Graph()
|
144 |
+
|
145 |
+
## Add nodes to the graph
|
146 |
+
for node in nodes:
|
147 |
+
G.add_node(
|
148 |
+
str(node)
|
149 |
+
)
|
150 |
+
|
151 |
+
## Add edges to the graph
|
152 |
+
for index, row in dfg.iterrows():
|
153 |
+
G.add_edge(
|
154 |
+
str(row["node_1"]),
|
155 |
+
str(row["node_2"]),
|
156 |
+
title=row["edge"],
|
157 |
+
weight=row['count']/4
|
158 |
+
)
|
159 |
+
unique_edges = dfg['edge'].unique() if dfg['edge'].nunique() != 0 else None # Get the unique edges
|
160 |
+
edge_counts = dfg['edge'].value_counts() # Get the counts of the edges
|
161 |
+
unique_edges_df = pd.DataFrame({'edge': edge_counts.index, 'count': edge_counts.values}) # Create a DataFrame of the unique edges and their counts
|
162 |
+
|
163 |
+
communities_generator = nx.community.girvan_newman(G)
|
164 |
+
top_level_communities = next(communities_generator)
|
165 |
+
next_level_communities = next(communities_generator)
|
166 |
+
communities = sorted(map(sorted, next_level_communities))
|
167 |
+
colors = colors2Community(communities)
|
168 |
+
|
169 |
+
for index, row in colors.iterrows():
|
170 |
+
G.nodes[row['node']]['group'] = row['group']
|
171 |
+
G.nodes[row['node']]['color'] = row['color']
|
172 |
+
G.nodes[row['node']]['size'] = G.degree[row['node']]
|
173 |
+
|
174 |
+
|
175 |
+
iframe = render_graph(G)
|
176 |
+
return iframe
|
177 |
+
# return iframe, unique_edges_df
|
178 |
+
|
179 |
+
|
180 |
+
inputs = [
|
181 |
+
gr.File(label="Upload PDF"), # Create a file input for uploading a PDF
|
182 |
+
gr.Checkbox(label="Regenerate graph using LLM") # Create a checkbox input for specifying an edge
|
183 |
+
]
|
184 |
+
|
185 |
+
outputs = [
|
186 |
+
gr.HTML(label="Generated graph"), # Create an image output for the generated graph
|
187 |
+
# gr.Dataframe(label="Unique edges", type="pandas") # Create a DataFrame output for the unique edges
|
188 |
+
]
|
189 |
+
|
190 |
+
description = 'This Python script generates a knowledge graph from a PDF document. It uses several libraries including gradio for the web interface, langchain for natural language processing and PDF parsing, networkx and pyvis for graph generation'
|
191 |
+
iface = gr.Interface(fn=execute_process, inputs=inputs, outputs=outputs, title="PDF - NLP Knowledge graph - mistral4b", description=description) # Create an interface
|
192 |
+
iface.launch() # Launch the interface
|
docs/chunks.csv
ADDED
@@ -0,0 +1,1018 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
text|source|page|chunk_id
|
2 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
3 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 1/31Project details
|
4 |
+
Subsidy basis
|
5 |
+
Partner Funding rules
|
6 |
+
City University of
|
7 |
+
LondonNot determined View answers
|
8 |
+
BIGSPARK LIMITED
|
9 |
+
(Lead)Subsidy control View answers
|
10 |
+
Application team
|
11 |
+
BIGSP ARK LIMITED (Lead)
|
12 |
+
Organisation details
|
13 |
+
Type Business
|
14 |
+
Team members
|
15 |
+
Full name Email EDI survey
|
16 |
+
Hamza Niazi hamza.niazi@bigspark.d
|
17 |
+
evComplete
|
18 |
+
Andrea Crook andrea.crook@bigspark.
|
19 |
+
devComplete
|
20 |
+
Chris Finlayson chris.finlayson@bigspar
|
21 |
+
k.devComplete
|
22 |
+
Rayane Houhou rayane.houhou@bigspar
|
23 |
+
k.devComplete
|
24 |
+
City University of London
|
25 |
+
Organisation details
|
26 |
+
Type Research"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|0|19deb20365ed494a8d42a46dd31fe585
|
27 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
28 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 2/31Competition name
|
29 |
+
Innovation in Professional & Financial
|
30 |
+
Services R2 Collaborations
|
31 |
+
Application name
|
32 |
+
An AI Framework for De-risking Large
|
33 |
+
Language Models in the Financial
|
34 |
+
Industry
|
35 |
+
When do you wish to start your
|
36 |
+
project?
|
37 |
+
15 January 2024
|
38 |
+
Project duration in months
|
39 |
+
18 months
|
40 |
+
Has this application been previously
|
41 |
+
submitted to Innovate UK?
|
42 |
+
No
|
43 |
+
Selected research category
|
44 |
+
Industrial research
|
45 |
+
No feedback providedTeam members
|
46 |
+
Full name Email EDI survey
|
47 |
+
Tillman Weyde t.e.weyde@city.ac.uk Complete
|
48 |
+
Christopher Child c.child@city.ac.uk Complete
|
49 |
+
Danny Tyler danny.tyler@city.ac.uk Complete
|
50 |
+
Application details
|
51 |
+
Research category
|
52 |
+
Project summary
|
53 |
+
Project summary
|
54 |
+
This project will de-risk the adoption of AI and specifically Large Language Models
|
55 |
+
(LLMs) in the financial industry by creating a framework that will enable the rapid
|
56 |
+
exploitation of new AI technologies by developing a modularised approach,
|
57 |
+
modules for explainability and knowledge integration, and the necessary interfaces
|
58 |
+
for ensuring rapid integration, compliance and safe operation. The current"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|1|1bad89215baa459391e738efb94415ef
|
59 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
60 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 3/31No feedback providedexplosion of new AI developments, the multiplicity of new technologies on the
|
61 |
+
market, and the expectation of AI regulation make investment in AI risky for
|
62 |
+
financial institutions, leading to a wait-and-see approach that delays the adoption
|
63 |
+
and benefits for UK companies. This delay risks losing the advantage of the
|
64 |
+
leading position that AI research in the UK currently has.
|
65 |
+
Specifically, privacy, transparency, bias, and toxicity are serious problems
|
66 |
+
associated with current AI and specifically (LLMs). The current UK and EU
|
67 |
+
requirement for explainability of automatic decision-making, combined with the
|
68 |
+
current developments of AI regulation in the EU as well as the planned UK and US
|
69 |
+
regulation make it imperative that any solution has the ability to dynamically
|
70 |
+
integrate and adapt regulation. The current trend to monolithic systems, such as
|
71 |
+
ChatGPT/GPT 4, Bard, Claude and Llama and its open-source derivatives, makes
|
72 |
+
that task difficult.
|
73 |
+
We propose the development of a modular framework that will employ different AI
|
74 |
+
technologies for their strengths but allow the implementation of knowledge-based
|
75 |
+
rules and guardrails by providing interfaces through which generative, predictive
|
76 |
+
and decision-making models can be combined to interact in a controlled manner."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|2|a61faa746c9141d4a73577a1c9cb43c3
|
77 |
+
"and decision-making models can be combined to interact in a controlled manner.
|
78 |
+
The use of neural-symbolic machine learning to integrate logical rules will enable
|
79 |
+
the use of the linguistic capabilities of LLMs without their risks by ensuring and
|
80 |
+
explaining adherence to rules. Similarly, bias and toxicity detection models can
|
81 |
+
enable the power of predictive and generative models without the risk by putting
|
82 |
+
guardrails in place. By offering this framework, we will enable a more cost-effective
|
83 |
+
and less risky engagement with AI that can create a significant benefit for
|
84 |
+
BigSpark'sbusiness, its clients in the UK and for the UK financial industry. This
|
85 |
+
provides a competitive advantage through rapid adoption of AI in the UK and in
|
86 |
+
exports.
|
87 |
+
Public description
|
88 |
+
Public description
|
89 |
+
This project will address the risks of applying modern AI techniques, specifically
|
90 |
+
large language models, in the financial industry in the UK. Modern AI models have
|
91 |
+
become vast in size and very difficult to control, as they show different kinds of
|
92 |
+
undesirable behaviour, such as discriminatory bias, toxic language, and
|
93 |
+
hallucinations, in addition to classical metrics of model quality. In addition, there
|
94 |
+
are currently not reliable methods to understand and explain their output, as is
|
95 |
+
required by UK and EU regulation for customer facing decisions by AI, and new
|
96 |
+
regulation for AI is currently being planned and created. This has created a level of
|
97 |
+
risk that prevents many financial institutions from investing in advanced AI"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|2|5457e85797cc4943a86dafab432168e0
|
98 |
+
"risk that prevents many financial institutions from investing in advanced AI
|
99 |
+
applications.
|
100 |
+
Our solution to this problem is the design, implementation, and evaluation of a
|
101 |
+
modular AI framework. This framework will divide AI systems into different
|
102 |
+
functional modules using different models that combine the benefits of knowledge-"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|2|e7dbc79f7f0b464cb90f095f0b5bcdf8
|
103 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
104 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 4/31In scope 5/5integration and neuro-symbolic learning and reasoning, traditional explainability
|
105 |
+
with feature importance, and guardrail models that detect toxicity and other
|
106 |
+
undesired behaviour of large language models. To combine the functionalities of
|
107 |
+
different models, we will develop interfaces that enable interaction and control of
|
108 |
+
the modules as well as user-friendly tools that will use large language models to
|
109 |
+
enable non-expert workers and users to understand and interrogate AI model
|
110 |
+
behaviour.
|
111 |
+
On the technical level, this will involve the application of research into
|
112 |
+
explainability, knowledge integration and neuro-symbolic learning methods at City,
|
113 |
+
University of London in combination with the proven industrial software framework
|
114 |
+
and domain expertise at BigSpark to create an offering that will enable financial
|
115 |
+
institutions to engage with the latest AI technology in a safe and flexible way,
|
116 |
+
allowing for rapid adaptation to changing regulations. This will help UK financial
|
117 |
+
institutions to take full advantage of the strength of AI research in the UK and stay
|
118 |
+
ahead of their international competitors.
|
119 |
+
Scope
|
120 |
+
How does your project align with the scope of this competition?
|
121 |
+
This project directly fits the scope for the Innovation in Professional and Financial
|
122 |
+
Services competition by advancing fraud detection capabilities in the financial"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|3|28aa8a7b69764416b058ed5ef6f2c1df
|
123 |
+
"Services competition by advancing fraud detection capabilities in the financial
|
124 |
+
sector through new digital services. It focuses on fraud prevention and involves
|
125 |
+
collaboration between a data and engineering consultancy and a university
|
126 |
+
research team. The project will deliver a better product for fraud detection by
|
127 |
+
creating a modular AI framework that allows financial institutions to leverage novel
|
128 |
+
interfaces like large language models safely and effectively. This improves the
|
129 |
+
accuracy and automation of identifying fraudulent activities.
|
130 |
+
It increases access to these new capabilities by providing an integration platform
|
131 |
+
that connects seamlessly to existing bank systems and data. The modular
|
132 |
+
architecture also makes it easier for banks to deploy AI incrementally rather than
|
133 |
+
necessitating invasive changes.
|
134 |
+
The framework enhances effectiveness for financial service providers by boosting
|
135 |
+
fraud detection rates compared to rules-based legacy systems. The integrated
|
136 |
+
explainability and auditability modules ensure model decisions adhere to
|
137 |
+
regulations around transparent decsision. This enables institutions to use AI-
|
138 |
+
supported fraud prevention with confidence.
|
139 |
+
The project considers broader aspects including ethics, interpretability, and
|
140 |
+
emerging regulatory needs. It also provides tools to help non-technical users
|
141 |
+
understand model outputs.
|
142 |
+
In turn, cost savings from preventing fraud enable financial institutions to invest"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|3|e2ed7bdc279048a887ac810839ccb85b
|
143 |
+
"understand model outputs.
|
144 |
+
In turn, cost savings from preventing fraud enable financial institutions to invest
|
145 |
+
more into their products, in turn making them more accessible to customers."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|3|6d2f16e5135844cba12929928bad1dd7
|
146 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
147 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 5/31Assessor 1
|
148 |
+
The project described meets the scope of the competition as per the
|
149 |
+
competition's brief.
|
150 |
+
Assessor 2
|
151 |
+
The proposal is clearly in scope for the competition as it originates from a
|
152 |
+
consortium led by a UK SME and specifically addresses themes from the
|
153 |
+
competition brief.
|
154 |
+
Assessor 3
|
155 |
+
The project is in line with the scope of this competition as the target markets
|
156 |
+
are the professional and financial services sectors. Moreover, the project
|
157 |
+
suggests to improve fraud detection capacities for companies operating in
|
158 |
+
these sectors
|
159 |
+
Assessor 4
|
160 |
+
In scope
|
161 |
+
Assessor 5
|
162 |
+
As the output seems to be a framework it would categorise as an information
|
163 |
+
product and thus industrial research. With its application in fraud detection for
|
164 |
+
financial services, it would be in scope for this funding call.Customers earn the benefit of knowing advanced technology is safeguarding the
|
165 |
+
banking system and their funds without having the potential of being invasive and
|
166 |
+
limit their ability to access banking products or services.
|
167 |
+
Overall, the project unlocks the power of modern AI advancements for the financial
|
168 |
+
sector in a compliant, accountable way that is easy to deploy
|
169 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|4|eceee4e218a847ab9ca18e8990d809d2
|
170 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
171 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 6/31No feedback provided
|
172 |
+
Average score 7.2 / 10Application questions
|
173 |
+
1. Applicant location (not scored)
|
174 |
+
Applicant location (not scored)
|
175 |
+
bigspark Ltd
|
176 |
+
2 Lace Market Square
|
177 |
+
Nottingham
|
178 |
+
NG1 1PB England
|
179 |
+
2. Need or challenge
|
180 |
+
What is the business need, technological challenge, or market opportunity
|
181 |
+
behind your innovation?
|
182 |
+
The main motivation for this project is enabling fast, ethical, and de-risked
|
183 |
+
adoption of Artificial Intelligence and Large Language Models for transparent
|
184 |
+
decision making and fraud prevention in financial institutions. With over £1.2 billion
|
185 |
+
stolen by criminals through fraud in 2022 as per UK Finance's latest annual fraud
|
186 |
+
report, fraud prevention is a key focus for banks due to regulatory changes,
|
187 |
+
impacts to their bottom line, and market competitiveness. While banks utilise AI
|
188 |
+
and ML for fraud prevention, it is often through legacy software not leveraging
|
189 |
+
latest advancements.
|
190 |
+
Challenges in exploring new fraud prevention models stem from complex
|
191 |
+
technology landscapes in banks. If innovations aren't readily integrable into core
|
192 |
+
systems, they cannot be exploited. Regulatory concerns like FCA's Consumer
|
193 |
+
Duty also impede exploring these advancements. Latest AI developments like
|
194 |
+
large language models exacerbate these issues by being deeply end-to-end,
|
195 |
+
raising new problems like hallucinations (where LLMs provide plausible but"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|5|72cf95f9d3e74ae8bda9d198fb75bd57
|
196 |
+
"large language models exacerbate these issues by being deeply end-to-end,
|
197 |
+
raising new problems like hallucinations (where LLMs provide plausible but
|
198 |
+
incorrect answers) and spurring further potential regulation.
|
199 |
+
Financial decisions (such as loan scoring) are heavily regulated making
|
200 |
+
explainability, using the same model executing decisions, a requirement, whereas
|
201 |
+
large language models are black boxes. Frameworks like LangChain and
|
202 |
+
LlamaIndex enable accessing knowledge to augment large language models.
|
203 |
+
Modularizing into learning and knowledge/rule-based components interacting in
|
204 |
+
neuro-symbolic systems also aids decision explainability.
|
205 |
+
The market opportunity is in providing a platform enabling banks to explore
|
206 |
+
modern AI for decision making and fraud prevention that integrates with existing"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|5|0331aa8d239a481182939d9fcb246d25
|
207 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
208 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 7/31Assessor 1
|
209 |
+
The applicant has articulated the problem they are looking to tackle. They
|
210 |
+
have demonstrated a good understanding of the wider influencing factors,
|
211 |
+
however, the points made are highlighting the challenges and difficulties the
|
212 |
+
project will also face, rather than the opportunities. Additional information
|
213 |
+
regarding the current state-of-the-art and solutions used by banks for fraud
|
214 |
+
detection would support the answer provided.
|
215 |
+
Assessor 2
|
216 |
+
The proposal sets out a good underlying business motivation for the project
|
217 |
+
based on exploring the potential of AI for fraud prevention in financial services
|
218 |
+
settings. The applicants show that they have a good understanding of the
|
219 |
+
problem space and wider factors influencing the opportunity. However, further
|
220 |
+
information would have been appreciated about the scale of the opportunity,
|
221 |
+
using authoritative independent market research and statistics help evidence
|
222 |
+
the applicants' assertions. The project would build on the applicants' prior work
|
223 |
+
which has already been commercialised.
|
224 |
+
Assessor 3
|
225 |
+
The motivation for the project is good and it is collaborated by previous work in
|
226 |
+
the area. The gap in the market is identified and similar innovations are
|
227 |
+
described
|
228 |
+
Assessor 4infrastructure without changes. BigSpark has already deployed advanced fraud"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|6|9ea32fd93e384055995e26e67d101ce7
|
229 |
+
"described
|
230 |
+
Assessor 4infrastructure without changes. BigSpark has already deployed advanced fraud
|
231 |
+
models at a Tier 1 UK bank and is exploring a system leveraging standard
|
232 |
+
transactional data like Open Banking that is easy and fast to deploy. This will
|
233 |
+
showcase model performance and actions in an explainable manner, ensuring
|
234 |
+
current and potentially future regulatory compliance.
|
235 |
+
The asset can strengthen banking system safeguarding, reduce customer impact,
|
236 |
+
and address current and upcoming regulations. It gives institutions modular
|
237 |
+
access to BigSpark's models while building new ones tailored to their needs and
|
238 |
+
data. Explainability and regulatory transparency are baked in. This de-risked
|
239 |
+
approach to deploying leading-edge AI and large language models for fraud
|
240 |
+
unlocks major benefits without requiring invasive changes.
|
241 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|6|5b3163a1ca3147f39d0325c7921389d6
|
242 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
243 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 8/31Clear description of market need but lacking in market opportunity
|
244 |
+
Assessor 5
|
245 |
+
Good motivation of the problem, as fraud prevention is a big regulatory issue.
|
246 |
+
Good description of challenges and market opportunity and traction of
|
247 |
+
deploying models within Tier1 banks is promising.
|
248 |
+
Average score 6.2 / 10 3. Approach and innovation
|
249 |
+
What approach will you take and where will the focus of the innovation be?
|
250 |
+
In our efforts to address the challenges and opportunities in the field of AI and
|
251 |
+
Large Language Models, we aim to develop a modular framework that will improve
|
252 |
+
the interpretability and transparency of machine learning models. The main
|
253 |
+
approach is to modularise the system so that different models with suitable
|
254 |
+
explanatory methods can be applied to different tasks. The most recent models
|
255 |
+
are very large neural networks for language or multi-modal information processing.
|
256 |
+
Currently, there are no effective methods to explain the operation of these models
|
257 |
+
and they can generate incorrect answers that sound convincing, because of
|
258 |
+
linguistic quality. These issues can be overcome by separating the decision-
|
259 |
+
making functionalities (e.g. assessing the probability of a transaction being
|
260 |
+
fraudulent or a customer defaulting on a loan), from other functions, e.g. the
|
261 |
+
interaction with the customer via text or speech or creating a market model."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|7|6b7d165847d541d3afa2855eb1f06900
|
262 |
+
"interaction with the customer via text or speech or creating a market model.
|
263 |
+
To achieve this, we will create an innovative modularisation framework with
|
264 |
+
explainability and knowledge-integration methods applied to fraud detections. This
|
265 |
+
will support existing techniques for feature attribution, model visualisation, and
|
266 |
+
decision rule extraction e.g. LIME and SHAP, but also novel methods, specifically
|
267 |
+
neuro-symbolic modelling and knowledge-integration, interfacing and explaining
|
268 |
+
different modules.
|
269 |
+
Secondly, we will work on democratising explainability by designing user-friendly
|
270 |
+
tools and interfaces that will help non-technical stakeholders (customers and
|
271 |
+
workers), increasing transparency, actionability and subsequently trust in AI-based
|
272 |
+
and supported decisions. For consumers to place their trust in AI-based systems,
|
273 |
+
it is essential for them to comprehend the inner workings and decision-making
|
274 |
+
processes of the underlying models. This includes understanding what drives the
|
275 |
+
decisions, how the model functions, and whether or not the organisation trusts the
|
276 |
+
model's decision. Our framework will aim to provide answers to all of these
|
277 |
+
questions, thus promoting greater transparency and understanding of AI-based
|
278 |
+
systems as well as ensuring the capacity to conform with current and future AI
|
279 |
+
regulations. Augmenting explainability with LLMs aids interpretation, explanation,"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|7|d77c3cbed4d045f5aa0c26789eb35f11
|
280 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
281 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 9/31Assessor 1
|
282 |
+
The innovative aspects of the project have been described. While the
|
283 |
+
innovations outlined are interesting, additional details are required to fully
|
284 |
+
understand the approach. It is unclear how the project would significantly
|
285 |
+
improve fraud detection and address the challenges previously highlighted.
|
286 |
+
Assessor 2
|
287 |
+
The proposal provides a high level description of the applicants' envisaged
|
288 |
+
approach to addressing the challenge/opportunity identified in their Q2
|
289 |
+
response. The applicants discuss their R&D innovations and project outputs in
|
290 |
+
general terms, however a more detailed explanation would have been
|
291 |
+
appreciated. Further information would also have been welcome about
|
292 |
+
aspects such as freedom-to-operate and competitor differentiation - preferably
|
293 |
+
via a formal competitor analysis using the Q3 appendix.
|
294 |
+
Assessor 3
|
295 |
+
The main innovations from a methodological point of view of the project are
|
296 |
+
described in detail. The project is innovative and the outputs will make the
|
297 |
+
company competitive in the market
|
298 |
+
Assessor 4
|
299 |
+
Answer delivers insight into the approach but struggling to see where the
|
300 |
+
innovation is - breaking down current models into a modular delivery solution
|
301 |
+
with additional overlay is lacking an innovation element.
|
302 |
+
Assessor 5and AI training. This approach ensures a deeper understanding of AI decisions,"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|8|1efe6111aa3d4ec8987cbf1352ced9ff
|
303 |
+
"with additional overlay is lacking an innovation element.
|
304 |
+
Assessor 5and AI training. This approach ensures a deeper understanding of AI decisions,
|
305 |
+
identifying biases and improving performance. Our emphasis lies in combining and
|
306 |
+
refining these technologies into a unified and comprehensive framework, but with
|
307 |
+
clear module boundaries. This approach will provide a more effective solution for
|
308 |
+
model interpretability, transparency, and compliance with regulation.
|
309 |
+
BigSpark is a leading technology company with extensive experience in machine
|
310 |
+
learning within financial services. We are adapting innovative AI and ML designs
|
311 |
+
from City, University of London to enhance our platform.
|
312 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|8|77b54d7782404b1f9328268ef2a27ebb
|
313 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
314 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 10/31The approach appears like it could address the challenge. However it is
|
315 |
+
unclear if the output of the project is a framework, a tool, a platform or other.
|
316 |
+
Average score 6.6 / 10 4. Team and resources
|
317 |
+
Who is in the project team and what are their roles?
|
318 |
+
Christopher Finlayson [Company founder and CTO]
|
319 |
+
Christopher Finlayson has significant domain expertise in Data Science
|
320 |
+
enablement and productionisation of AI models, having spent 6 years dedicated to
|
321 |
+
the domain within financial services. He has fully delivered multiple projects from
|
322 |
+
ideation into scoping, delivery and successful benefit realisation in multiple roles,
|
323 |
+
including Principal Data Engineer, Technical Lead and Solution Architect.
|
324 |
+
Hamza Niazi [Chief AI engineer]
|
325 |
+
Hamza Niazi is a highly skilled leader with a strong background in Defense,
|
326 |
+
Health, Consultancy, and Drone Applications. He has significant experience in
|
327 |
+
using AI and Computer Vision to deliver innovative solutions and is capable of
|
328 |
+
designing and developing seamless solutions that effectively integrate numerous
|
329 |
+
systems.
|
330 |
+
Rayane Houhou [Senior Financial Crime Management Consultant ]
|
331 |
+
Rayane Houhou is a Senior Management Consultant specialised on bridging the
|
332 |
+
gap between people, processes, regulations, and technology in Financial
|
333 |
+
Institutions. In the past 3 years, he has been providing business and technology"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|9|7502031bdf3645f28d6a3f974c242af5
|
334 |
+
"Institutions. In the past 3 years, he has been providing business and technology
|
335 |
+
advisory services to some of the largest British and multinational financial
|
336 |
+
institutions.
|
337 |
+
City, University of London
|
338 |
+
Dr Tillman Weyde
|
339 |
+
Dr Tillman Weyde is a Reader in Computer Science at City, University of London
|
340 |
+
and has over 25 years of academic experience in AI and machine learning. His
|
341 |
+
research interest is in neural network learning methods and their integration with
|
342 |
+
structured prior knowledge representations. He has developed machine learning
|
343 |
+
solutions to problems in various domains from education, to media and
|
344 |
+
engineering, to finance. He has published over 150 peer-reviewed papers and has
|
345 |
+
been awarded multiple prizes for his work. Tillman is a member of the EPSRC
|
346 |
+
college, IEEE and BCS and a regular reviewer for EPSRC, AHRC, the EU
|
347 |
+
Commission."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|9|3fd9a083b8ca48e7b6a553414749b751
|
348 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
349 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 11/31Assessor 1
|
350 |
+
The teams involved in this collaboration and their individual members'
|
351 |
+
backgrounds have been described. While City University of London has
|
352 |
+
mentioned a new hire to be made, the team composition of the lead partner is
|
353 |
+
not aligned with the financials provided. It is unclear if the other talents
|
354 |
+
included in the financials have already been identified or if new hires need to
|
355 |
+
be made. Additional information on the collaboration between the two teams
|
356 |
+
would help understand the potential for the teams to work well together.
|
357 |
+
Assessor 2
|
358 |
+
The proposal includes brief biographical sketches of the applicants' core
|
359 |
+
project team, showing that they have relevant skills and experience which will
|
360 |
+
be helpful in delivering the project successfully. The project would not involve
|
361 |
+
subcontractor effort, and would result in the creation of one new job role
|
362 |
+
requiring specialist AI skills. Further information would have been appreciated
|
363 |
+
as to whether any potential candidates have been identified, as this role is
|
364 |
+
likely to be crucial to the project. Additionally, more detailed biographical
|
365 |
+
information about the core team's expertise and track record would have been
|
366 |
+
welcome, via the Q4 appendix.
|
367 |
+
Assessor 3Dr Chris Child
|
368 |
+
Dr Chris Child is the Associate Dean for Employability & Corporate Relations at"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|10|b17a10e4dc1d4a1ebb1a3dab35d8d204
|
369 |
+
"welcome, via the Q4 appendix.
|
370 |
+
Assessor 3Dr Chris Child
|
371 |
+
Dr Chris Child is the Associate Dean for Employability & Corporate Relations at
|
372 |
+
City, University of London and has over 25 years of experience in commercial
|
373 |
+
software development and AI research. His research interests include
|
374 |
+
reinforcement learning, probabilistic planning and approximate dynamic
|
375 |
+
programming. Chris's funded research projects include a large language model
|
376 |
+
driven AI system for a law firm. As Associate Dean he has expanded City's
|
377 |
+
industrial links, introduced apprenticeship MSc programmes, and driven growth in
|
378 |
+
KTP projects.
|
379 |
+
ML engineer role
|
380 |
+
City, UoL will recruit a machine learning engineer with a qualification in computer
|
381 |
+
science, software engineering, artificial intelligence, or a related subject. The
|
382 |
+
engineer will implement and test research-based solutions at City and support
|
383 |
+
BigSpark with integration
|
384 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|10|db4453c60eaa4f79aa20b0685fbd69f7
|
385 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
386 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 12/31The project team shows all the necessary skills to deliver the project. The
|
387 |
+
description of resources, equipment and facilities needed is missing.
|
388 |
+
Assessor 4
|
389 |
+
Team is well considered - unsure if/ how they will work well together
|
390 |
+
Assessor 5
|
391 |
+
The project team appears to have a lot of credible AI/ML expertise. However
|
392 |
+
there appears to be no expertise in fraud detection.
|
393 |
+
Average score 7.6 / 10 5. Market awareness
|
394 |
+
What does the market or markets you are targeting look like?
|
395 |
+
The primary target market for this project is the UK banking system, which needs
|
396 |
+
AI financial decision making and fraud prevention capabilities. It consists of over
|
397 |
+
150 banks and building societies with total assets of over £8 trillion (Bank of
|
398 |
+
England, 2020).
|
399 |
+
Fraud losses reached £1.2 billion in 2022 (UK Finance, 2022). With the global
|
400 |
+
fraud prevention market being valued at $25.66 billion in 2021 with a 22.6%
|
401 |
+
estimated annual growth rate (Fraud Business Insights, 2023), and the UK
|
402 |
+
accounting for 4% of global banking assets (Bank for International Settlements),
|
403 |
+
the current potential market for fraud prevention solutions in UK banking can be
|
404 |
+
estimated at around £1 billion annually, potentially reaching £4 billion annually in
|
405 |
+
2030.
|
406 |
+
Within banks, the key stakeholders in this market are fraud detection teams,"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|11|7905cfdef1ea483da918808f40d7c84c
|
407 |
+
"2030.
|
408 |
+
Within banks, the key stakeholders in this market are fraud detection teams,
|
409 |
+
analytics/data science teams, information security leaders, and technology
|
410 |
+
leadership. Our value proposition is increased accuracy and automation in
|
411 |
+
financial decision making and fraud detection versus traditional, only rule-based
|
412 |
+
systems. The main barriers to entry are integration with legacy bank systems and
|
413 |
+
data regulatory/ethical concerns which we are well-positioned to address.
|
414 |
+
The supply chain consists primarily of AI/ML software, service providers and
|
415 |
+
consultancies. Key players include IBM, NICE, and FICO. The dynamics are
|
416 |
+
shifting as new AI/ML technologies emerge that can outperform traditional rules-
|
417 |
+
based approaches. First movers can gain a competitive advantage."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|11|566e15b9131f4af5950ebd4048b38754
|
418 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
419 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 13/31Assessor 1
|
420 |
+
The applicant has well described and quantified the target market. A potential
|
421 |
+
secondary market has also been offered. Key players have been highlighted
|
422 |
+
and some barriers to market entry have been identified, however, the applicant
|
423 |
+
has not explained how they would address these challenges.
|
424 |
+
Assessor 2
|
425 |
+
The proposal sets out the applicants' target market for the envisaged product
|
426 |
+
which would be developed from the project outputs. Market size, drivers and
|
427 |
+
dynamics are quantified and evidenced using authoritative independent
|
428 |
+
market research and statistics. The applicants consider the supply chain and
|
429 |
+
market segmentation aspects including possible secondary markets, and the
|
430 |
+
proposal also includes a discussion of barriers to market entry and how they
|
431 |
+
might be overcome.
|
432 |
+
Assessor 3
|
433 |
+
Detailed statistics on the target market size, dynamics and drivers are
|
434 |
+
provided. The main barriers to entry are analysed . The secondary markets are
|
435 |
+
not considered.
|
436 |
+
Assessor 4The UK lags behind in adopting modern AI advancements for fraud prevention in
|
437 |
+
banking compared to other industries. Most major UK banks still rely primarily on
|
438 |
+
traditional rule-based systems for fraud detection, while technology companies
|
439 |
+
have been quicker to integrate AI and machine learning into their fraud operations"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|12|fc57393422004c29b8f2fe985dfaf561
|
440 |
+
"have been quicker to integrate AI and machine learning into their fraud operations
|
441 |
+
(Wall Street Journal, 2021). Targeted efforts to implement leading-edge AI
|
442 |
+
technologies focused on the unique needs of banks can enable the UK banking
|
443 |
+
industry to make rapid progress in fraud detection and prevention while still
|
444 |
+
upholding privacy, security and ethics (UK Finance, 2020).
|
445 |
+
E-commerce, and financial services firms that are providers for this industry are
|
446 |
+
another key market needing advanced financial decision making and fraud
|
447 |
+
prevention. Global e-commerce fraud losses are estimated at $20 billion annually
|
448 |
+
and increasing over 20% year-over-year as transactions grow (Juniper Research,
|
449 |
+
2021). The main features of this market are massive volumes of payments to
|
450 |
+
screen and real-time response needs. New AI/ML approaches can help firms cut
|
451 |
+
fraud loss rates while maintaining a strong customer experience.
|
452 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|12|f29587466b9547798b8d5031a7a7ee6c
|
453 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
454 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 14/31What are the barriers to entry? Who are the competitors? What does the
|
455 |
+
market segmentation look like? These are the points that would be good to
|
456 |
+
know, to validate any assumptions before creating a solution without targeted
|
457 |
+
customers identified and verified as users
|
458 |
+
Assessor 5
|
459 |
+
Good awareness of the market's dynamics and overall value. Secondary
|
460 |
+
markets have also been identified
|
461 |
+
Average score 6.8 / 10 6. Outcomes and route to market
|
462 |
+
How are you going to grow your business and increase long term
|
463 |
+
productivity as a result of the project?
|
464 |
+
BigSpark's consultancy business has robustly anchored its reputation in the UK's
|
465 |
+
financial services sector, serving banks, asset managers, and insurance firms.
|
466 |
+
Recognized for strategic insights, regulatory compliance knowledge, and
|
467 |
+
operational enhancements, BigSpark stands as a strategic advisor and
|
468 |
+
implementation specialist. Positioned where clients demand both intellectual and
|
469 |
+
actionable solutions, BigSpark plans to enrich its expertise through collaborations
|
470 |
+
with AI specialists from City, UoL, and external governance and legislation experts.
|
471 |
+
To fortify our market standing, we plan bi-annual 'knowledge sharing seminars'
|
472 |
+
with client teams and industry experts. This initiative aims to foster innovation and
|
473 |
+
ensure our solutions stay attuned to the dynamic financial sector needs."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|13|5e31ae5f938045718632dd531299d109
|
474 |
+
"ensure our solutions stay attuned to the dynamic financial sector needs.
|
475 |
+
Additionally, the evolving financial regulatory landscape prompts our expansion
|
476 |
+
into AI regulatory advisory, specifically catering to clients navigating intricate AI
|
477 |
+
compliance prerequisites.
|
478 |
+
Our target market includes FCA regulated financial entities, and other related
|
479 |
+
companies such as e-commerce payment gateways and digital transaction
|
480 |
+
platforms. Our initial route to market is within our existing clients, extending
|
481 |
+
through strategic B2B sales efforts, leveraging events, conferences, and webinars.
|
482 |
+
We also plan to explore partnerships with fintech platforms and software providers
|
483 |
+
to integrate our modules within their existing solutions.
|
484 |
+
The UK fraud prevention market is currently estimated at £1 billion annually,
|
485 |
+
potentially reaching £4 billion annually by 2030 (Fraud Business Insights, 2023).
|
486 |
+
By licensing our models to multiple financial institutions and fintech firms, a
|
487 |
+
consistent revenue stream is anticipated.
|
488 |
+
Our revenue projection for this product is:"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|13|8980270036d54fd98fb7630daa1aecd3
|
489 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
490 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 15/31Assessor 1
|
491 |
+
The dissemination plan and commercialisation of the project have been
|
492 |
+
outlined. The applicant has clearly highlighted the potential profit estimated
|
493 |
+
from the commercialisation of the project.
|
494 |
+
Assessor 2
|
495 |
+
The proposal outlines the lead applicant's target customer for the product that
|
496 |
+
would be developed from the project outputs, and the value proposition to
|
497 |
+
them. The lead applicant details their go-to-market strategy and delivery
|
498 |
+
model, and the proposal includes a discussion around price point and
|
499 |
+
revenue/growth expectations. The lead applicant also describes their
|
500 |
+
approach to protecting IP arising from the project - however further information
|
501 |
+
would have been appreciated here about the nature of the consortium
|
502 |
+
relationship, IP assignment between the partners and the RTO partner's
|
503 |
+
dissemination plans.
|
504 |
+
Assessor 3
|
505 |
+
The proposal identifies target customers and clearly define the value
|
506 |
+
proposition to them. It also outlines the routes to market and provides
|
507 |
+
evidence of how the project will increase profitability, productivity, and foster
|
508 |
+
growth.Year 1: 2 licensed customers - £600k ARR
|
509 |
+
Year 2: 4 licensed customers - £1.2m ARR
|
510 |
+
Year 3: 8 licensed customers - £2.4m ARR
|
511 |
+
A yet-to-be-finalised pricing model anticipates an estimated £300k p/a per model
|
512 |
+
and above forecast assumes only a single model per customer."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|14|868df679c95b45c58de938af64b9e6df
|
513 |
+
"A yet-to-be-finalised pricing model anticipates an estimated £300k p/a per model
|
514 |
+
and above forecast assumes only a single model per customer.
|
515 |
+
All our algorithms and data processing techniques will remain proprietary. Our
|
516 |
+
intellectual property will be applied for patents, ensuring our models' insights and
|
517 |
+
predictions are exclusive to clients.
|
518 |
+
Over time, as our model and approach become industry-standard, a transition to a
|
519 |
+
SaaS model is anticipated, offering real-time fraud detection as a service.
|
520 |
+
Collaborations with international fintech firms will prove our models' adaptability to
|
521 |
+
varied transaction patterns, backed by ongoing R&D to ensure global relevancy.
|
522 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|14|91de00dd604742feb8dfa4993d37f8ec
|
523 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
524 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 16/31Assessor 4
|
525 |
+
Pricing needs to be finalised and market tested before any modelling can be
|
526 |
+
relied upon
|
527 |
+
Assessor 5
|
528 |
+
Target customers are identified at a high level but value propositions are
|
529 |
+
lacking. Revenue projections and routes to market beyond existing customers
|
530 |
+
lack detail.
|
531 |
+
Average score 6.6 / 10 7. Wider impacts
|
532 |
+
What impact might this project have outside the project team?
|
533 |
+
Impact Outside the Project Team
|
534 |
+
Economic Benefits:
|
535 |
+
External Parties:
|
536 |
+
The project promises significant savings for external parties linked with UK banks
|
537 |
+
by curtailing fraud. This conserves capital and strengthens their financial stability.
|
538 |
+
UK banks face fraud-related losses of £1.2 billion annually as of 2022 as per UK
|
539 |
+
Finance's latest annual fraud report. By implementing advanced AI, 25-50% of
|
540 |
+
fraud could be prevented, translating to yearly savings of £300-600 million. These
|
541 |
+
savings can be channelled back to improve services, digital tools, and community
|
542 |
+
outreach. For instance, a £50,000 investment in BigSpark's fraud prevention led to
|
543 |
+
a UK bank saving £88,000 in a month, projecting an annual saving of around £1
|
544 |
+
million.
|
545 |
+
Customers:
|
546 |
+
Customers stand to gain directly. Diminished fraud ensures deposit safety,
|
547 |
+
potentially reduces fees, and amplifies services as banks redirect saved funds
|
548 |
+
towards widening access to their products.
|
549 |
+
UK Economy:"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|15|715dab319e814db6a6fdf7aac4bf531f
|
550 |
+
"potentially reduces fees, and amplifies services as banks redirect saved funds
|
551 |
+
towards widening access to their products.
|
552 |
+
UK Economy:
|
553 |
+
At the macro level, minimising fraud means injecting more capital into the
|
554 |
+
economy, stimulating growth and investments. Companies like BigSpark further
|
555 |
+
contribute by generating high-tech job opportunities."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|15|85fed8f4289e415b8b75e4b56098c56b
|
556 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
557 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 17/31Assessor 1
|
558 |
+
The applicant has considered a number of wider potential impacts of the
|
559 |
+
project. Some of the positive impacts mentioned could use further evidence.
|
560 |
+
For instance, it is unclear how the project would effectively bring positive
|
561 |
+
regulatory implications. No potential negative impact has been included or
|
562 |
+
mitigated which should be covered here.
|
563 |
+
Assessor 2Government Impact:
|
564 |
+
The initiative aligns with government objectives of crime reduction and bolstering
|
565 |
+
economic growth. The country enjoys reinforced financial infrastructure and an
|
566 |
+
upsurge in high-tech employment opportunities, driving economic progress and
|
567 |
+
trimming unemployment.
|
568 |
+
Social Impacts:
|
569 |
+
AI-driven fraud prevention safeguards citizens from financial crimes, enhancing
|
570 |
+
trust in institutions. This not only boosts societal wellbeing but also creates
|
571 |
+
demand for more AI and data science professionals, promoting diversity in tech
|
572 |
+
sectors.
|
573 |
+
Quality of Life:
|
574 |
+
Individuals experience heightened financial security and lesser fraud-induced
|
575 |
+
stress, raising overall life quality.
|
576 |
+
Public Empowerment:
|
577 |
+
The public benefits from increased financial security and clarity. Their confidence
|
578 |
+
grows, knowing their assets in UK banks are shielded by ethically developed
|
579 |
+
advanced tech. This ensures they don't face barriers in accessing banking
|
580 |
+
services or conducting transactions.
|
581 |
+
Regulations:"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|16|f21562f6e2fd410f83f2bcbc56bc686e
|
582 |
+
"advanced tech. This ensures they don't face barriers in accessing banking
|
583 |
+
services or conducting transactions.
|
584 |
+
Regulations:
|
585 |
+
The project brings positive regulatory implications. It paves the way for
|
586 |
+
governance structures promoting ethical AI in finance. This establishes industry
|
587 |
+
norms for consumer-centric, ethical AI, echoing sentiments of UK regulators like
|
588 |
+
the Financial Conduct Authority. It emphasises the UK's leadership in fostering
|
589 |
+
globally respected, compliant AI, and contributes positively to regulatory
|
590 |
+
frameworks, setting a precedent for ethical AI use in finance.
|
591 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|16|a33ec1dc880c47949c316efc22a80f64
|
592 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
593 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 18/31The proposal sets out a range of potential beneficial impacts of the project
|
594 |
+
outside of the applicants' organizations and the project team. These include
|
595 |
+
possible economic and social/societal benefits and contribution to government
|
596 |
+
policy priorities. The extent of the anticipated beneficial impacts is partially
|
597 |
+
quantified, however further information would have been appreciated.
|
598 |
+
Additionally, a discussion would have been welcome about possible negative
|
599 |
+
impacts and how these might be mitigated.
|
600 |
+
Assessor 3
|
601 |
+
A comprehensive description of the main positive impacts of the project on
|
602 |
+
customers and the UK Economy is provided. Some evidence of wider
|
603 |
+
government, social, regulatory and public empowerment impacts are provided.
|
604 |
+
Assessor 4
|
605 |
+
Good awareness, lacking in negative impacts
|
606 |
+
Assessor 5
|
607 |
+
Many broader positive impacts are described at a high level. Though it is hard
|
608 |
+
to attribute them to the outcomes of this project.
|
609 |
+
Average score 5.8 / 10 8. Project management
|
610 |
+
How will you manage your project effectively?
|
611 |
+
WP1 Model observability platform (Lead partner - BigSpark)
|
612 |
+
We'll build a platform to manage and integrate developed modules with a rich
|
613 |
+
UI/UX experience. Key metrics, indicators, and functions will be available from
|
614 |
+
modules such as model assurance and compliance, model explainability, and test
|
615 |
+
data synthesis."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|17|e80efec55c1143699df65b88db4d04bf
|
616 |
+
"modules such as model assurance and compliance, model explainability, and test
|
617 |
+
data synthesis.
|
618 |
+
Cost: BigSpark = £ 50,000.00 - City, UoL = £
|
619 |
+
WP2 Model assurance and compliance module (Lead partner - BigSpark)
|
620 |
+
This work package ensures trust in the AI model by implementing and monitoring
|
621 |
+
Governance, Risk and Compliance guardrails - from model design to validation
|
622 |
+
and certification. We will develop and integrate the module for managing these"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|17|3335d3cfff1c42ff9d33590b22d6a9db
|
623 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
624 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 19/31workflows, ensuring a complete tie-in to the developed innovations in observability
|
625 |
+
and explainability.
|
626 |
+
Cost: BigSpark = £ 40,000.00 - City, UoL = £
|
627 |
+
WP3 Knowledge integration and explainability module (Lead partner - City,
|
628 |
+
UoL)
|
629 |
+
We will develop methods for controlling and explaining LLM and traditional models
|
630 |
+
in a modular framework. This includes integrating with knowledge graphs and
|
631 |
+
using neuro-symbolic learning for information retrieval. We'll also augment feature
|
632 |
+
importance and explainability with LLMs for better interpretation and explanation of
|
633 |
+
AI models.
|
634 |
+
Cost: BigSpark = £ 45,000.00 - City, UoL = £ 98,000
|
635 |
+
WP4 Test data synthesis module (Lead partner - BigSpark)
|
636 |
+
We will create synthetic data to test models for known fraud patterns, including
|
637 |
+
various transaction types (BACS, CHAPS, Faster Payments, and SWIFT) and
|
638 |
+
diverse customer data.
|
639 |
+
Cost: BigSpark = £ 45,000.00 - City, UoL = £
|
640 |
+
WP 5 Use case evaluation - Fraud detection (Lead partner - BigSpark)
|
641 |
+
We'll build two ML models to showcase our platform and compare it to existing
|
642 |
+
solutions. Thorough testing and user evaluation will ensure we meet our goals.
|
643 |
+
This test case will compare old and new systems to guarantee successful
|
644 |
+
outcomes.
|
645 |
+
Cost: BigSpark = £ 130,000.00-City, UoL = £15,000.00
|
646 |
+
BigSpark £310,000.00 + City, UoL £113,000.00
|
647 |
+
Total: £ 423,000.00"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|18|539c720dca8041a08b42e3f8adc71f58
|
648 |
+
"outcomes.
|
649 |
+
Cost: BigSpark = £ 130,000.00-City, UoL = £15,000.00
|
650 |
+
BigSpark £310,000.00 + City, UoL £113,000.00
|
651 |
+
Total: £ 423,000.00
|
652 |
+
We will be using Jira for task management, bug tracking, and project planning,
|
653 |
+
GitHub for version control and collaboration, Slack for real-time communication,
|
654 |
+
and Confluence for content creation and sharing.
|
655 |
+
Overall management will be BigSpark's responsibility.
|
656 |
+
Chris Finlayson will provide project delivery leadership and overall responsibility
|
657 |
+
for finances, delivery tracking, and risk management. Hamza Niazi will provide
|
658 |
+
engineering delivery, accountability, and technical leadership. Dr Tillman Weyde
|
659 |
+
and Dr Chris Child will manage research deliverables and targeted ML
|
660 |
+
development. They will frequently review project tracking and the risk register as
|
661 |
+
part of the project board."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|18|04c04ebf9e9d40509902aa32465a71c6
|
662 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
663 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 20/31Assessor 1
|
664 |
+
Work packages as well as their associated costs have been outlined. While
|
665 |
+
the overall project plan is sound, a more in-depth level of detail would be
|
666 |
+
expected.
|
667 |
+
Assessor 2
|
668 |
+
The proposal includes a description of the applicants' project management
|
669 |
+
approach and methodology, and a plan which breaks the project down into a
|
670 |
+
series of individually costed work packages, each with a designated lead
|
671 |
+
organisation. The work packages are shown on a Gantt chart style timeline,
|
672 |
+
however a more detailed project plan would have been appreciated, covering
|
673 |
+
aspects such as deliverables, dependencies, staffing resource allocation and
|
674 |
+
what each WP/task would entail. The project plan as it stands does not
|
675 |
+
provide a sufficient level of detail for evaluation.
|
676 |
+
Assessor 3
|
677 |
+
Some details on the project management approach are provided. The main
|
678 |
+
work packages with the lead partner and the total costs are described in detail
|
679 |
+
Assessor 4
|
680 |
+
Costs lack granularity and transparency - seem excessively high for an MVP
|
681 |
+
Assessor 5
|
682 |
+
Project work packages are outlined and make sense. However overall
|
683 |
+
information is sparse and there seem to be no activities planned to support the
|
684 |
+
commercialisation of the outputs.
|
685 |
+
Average score 6.4 / 10Management Reporting Lines Appendix.pdf (opens in a new window)"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|19|dda215d14f3f432aba5caa92811e4b15
|
686 |
+
"commercialisation of the outputs.
|
687 |
+
Average score 6.4 / 10Management Reporting Lines Appendix.pdf (opens in a new window)
|
688 |
+
(/application/10099028/form/question/35976/forminput/97945/file/605727/download).
|
689 |
+
Assessor feedback
|
690 |
+
9. Risks
|
691 |
+
What are the main risks for this project?"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|19|c2e9dac21ecb4c5ab957b806ca2846d3
|
692 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
693 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 21/31Investing in AI for financial institutions can be risky due to the rapid pace of AI
|
694 |
+
development, the abundance of available technologies, and the potential for
|
695 |
+
increased regulation. Technical hurdles such as performance limitations of existing
|
696 |
+
techniques, model compatibility issues, and data quality issues pose major risks to
|
697 |
+
the project. Additionally, there are commercial risks to consider, such as
|
698 |
+
competition in the AI market, which could make it difficult to retain customers and
|
699 |
+
set prices around product and shipping features that differentiate us from
|
700 |
+
competitors.
|
701 |
+
To mitigate these risks, it is important for BigSpark and City, University of London
|
702 |
+
to stay up-to-date with the latest developments in AI, carefully select appropriate
|
703 |
+
technologies, proactively address regulatory changes, and tackle technical and
|
704 |
+
competitive challenges. A comprehensive risk assessment framework and cross-
|
705 |
+
functional collaboration are also crucial in managing the project risks effectively.
|
706 |
+
Main Risks and Uncertainties:
|
707 |
+
A number of project risks have been identified and can be broadly categorised
|
708 |
+
under headings:
|
709 |
+
Market / commercial exploitation of the project
|
710 |
+
Technical risks
|
711 |
+
Project Management risks
|
712 |
+
Health & Safety
|
713 |
+
Risk mitigation strategy:
|
714 |
+
Use of established project management methodologies, PRINCE2, Scaled Agile"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|20|88ad0a0e0ccf40cb98a63b20bb1fd769
|
715 |
+
"Project Management risks
|
716 |
+
Health & Safety
|
717 |
+
Risk mitigation strategy:
|
718 |
+
Use of established project management methodologies, PRINCE2, Scaled Agile
|
719 |
+
Encouraging regular communication and collaboration among teams
|
720 |
+
Well organised and disciplined project board, focussing on well described work
|
721 |
+
packages
|
722 |
+
Project inputs that are critical to completion:
|
723 |
+
Adequate funding and access to cloud computing infrastructure.
|
724 |
+
In house expertise in AI, including ML engineers and experts in multimodal
|
725 |
+
(LLM) learning.
|
726 |
+
Managing Regulatory and Ethical Requirements:
|
727 |
+
Implementing robust model governance to ensure compliance with privacy and
|
728 |
+
evolving regulations.
|
729 |
+
Continuous engagement with AI specialised compliance partners to ensure the
|
730 |
+
project meets all compliance standards.
|
731 |
+
Prioritising transparency in documentation to demonstrate adherence to ethical
|
732 |
+
standards and regulatory requirements."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|20|852735781f3b4d76b95c5e084c9be979
|
733 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
734 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 22/31Assessor 1
|
735 |
+
Key risk categories have been explored but more technical risks would need to
|
736 |
+
be addressed. The few technical risks included in the risk register also require
|
737 |
+
stronger mitigations. Risk mitigations need to be explored at this early stage of
|
738 |
+
the project and not be left for the future as part of the project.
|
739 |
+
Assessor 2
|
740 |
+
The proposal provides a detailed risk register which sets out key risks that the
|
741 |
+
applicants can envisage together with likelihood and impact and possible
|
742 |
+
mitigating actions. Risks are categorised as commercial / technical / regulatory
|
743 |
+
/ project management or environmental and the risk analysis also considers
|
744 |
+
residual risk after mitigation. However, further information would have been
|
745 |
+
appreciated about risk ownership and possible contingencies should mitigation
|
746 |
+
prove unsuccessful. Additionally, the risk register does not address readily
|
747 |
+
anticipated risks such as difficulty recruiting to the AI technical role and issues
|
748 |
+
that might arise with consortium working.
|
749 |
+
Assessor 3
|
750 |
+
The main risks of the project are described and their mitigation strategies are
|
751 |
+
provided. Potential constraints or conditions on the project outputs are not
|
752 |
+
described
|
753 |
+
Assessor 4
|
754 |
+
Risks are too great for a concept that is too early in stage for funding requestRisk Register:"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|21|ab999991d6da4642b42d592dfd2418e6
|
755 |
+
"described
|
756 |
+
Assessor 4
|
757 |
+
Risks are too great for a concept that is too early in stage for funding requestRisk Register:
|
758 |
+
In addition to above, the accompanying risk register, submitted as a PDF
|
759 |
+
appendix, details all currently identified project risks, their potential impact,
|
760 |
+
likelihood of occurrence, and the proposed mitigation strategies. This document
|
761 |
+
will serve as a guide for managing and monitoring risks throughout the project
|
762 |
+
lifecycle.
|
763 |
+
Innovate UK - Risk register v01.pdf (opens in a new window)
|
764 |
+
(/application/10099028/form/question/35977/forminput/97951/file/605765/download).
|
765 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|21|b62376b01dbb4acb801848584caeb840
|
766 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
767 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 23/31Assessor 5
|
768 |
+
The risks described are comprehensive but very high level and almost
|
769 |
+
agnostic to the underlying project. Any notion of the 'fraud detection' use case
|
770 |
+
is completely missing.
|
771 |
+
Average score 6.4 / 10 10. Added value
|
772 |
+
How will this public funding help you to accelerate or enhance your
|
773 |
+
approach to developing your project towards commercialisation? What
|
774 |
+
impact would this award have on the organisations involved?
|
775 |
+
Public funding for our AI project will offer several substantial advantages:
|
776 |
+
A government grant will serve as a stamp of credibility and viability, making the
|
777 |
+
product more attractive to private investors and potentially for accreditation by
|
778 |
+
public regulator bodies (e.g. FCA)
|
779 |
+
Reduced Risk:
|
780 |
+
Public funding minimises financial risks, allowing us to focus on the research and
|
781 |
+
development aspects, driving innovation without the constant pressure of
|
782 |
+
immediate profitability. Financial support will expedite the development process,
|
783 |
+
enabling quicker commercialisation and market penetration.
|
784 |
+
The impact of project outcomes on the involved organisations is expected to be
|
785 |
+
considerable:
|
786 |
+
Enhances the reputation and credibility of the involved organisations,
|
787 |
+
positioning them as leaders in AI innovation for financial institutions.
|
788 |
+
Drives internal growth by creating opportunities for expansion and hiring,"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|22|c49b4e247a5e4942a893517a348831da
|
789 |
+
"positioning them as leaders in AI innovation for financial institutions.
|
790 |
+
Drives internal growth by creating opportunities for expansion and hiring,
|
791 |
+
leading to a more robust organisational structure with BigSpark.
|
792 |
+
We have considered internally funding this development. However, this route is
|
793 |
+
not currently viable due to recent poor trading conditions for technology consulting,
|
794 |
+
compared to previous years we are currently trading at a very thin operating
|
795 |
+
margin, with no capacity available for a research and development activity of this
|
796 |
+
scale without funding.
|
797 |
+
Any existing or future investments will be used in synergy with the grant funding
|
798 |
+
to:
|
799 |
+
Expand the research and development team.
|
800 |
+
Enhance the technological infrastructure."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|22|cbeb326fe720433c8da4e2be665f5468
|
801 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
802 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 24/31Assessor 1
|
803 |
+
The argument for public funding is acceptable. The applicant has mentioned
|
804 |
+
other sources of funding explored, additional information would support their
|
805 |
+
answer. It remains unclear whether the collaboration would still take place
|
806 |
+
without the grant. The setbacks mentioned from an unsuccessful application
|
807 |
+
provide some information but no specifics.
|
808 |
+
Assessor 2
|
809 |
+
The proposal outlines the potential beneficial impact that the injection of public
|
810 |
+
funding via Innovate UK could have for the applicants' R&D intensity and
|
811 |
+
product development. However, further information would have been
|
812 |
+
appreciated about the likely extent of the anticipated impact, e.g. in terms of
|
813 |
+
reduced time-to-market. Additionally, whilst the proposal discusses the
|
814 |
+
applicants' rationale for seeking support from Innovate UK, it is unclear
|
815 |
+
whether conventional funders have been engaged with prior to the Innovate
|
816 |
+
UK application.Allocate funds for marketing and customer acquisition as we move towards
|
817 |
+
commercialisation.
|
818 |
+
Without public funding, the project would face:
|
819 |
+
Slowed progress due to limited financial resources
|
820 |
+
Deficit of academic grade research, which would put the technical quality of the
|
821 |
+
product at risk of missing its objectives
|
822 |
+
Increased financial risk leading to potential hesitancy in making crucial
|
823 |
+
investment decisions"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|23|633d2f8162fd4bd29de755deeca8e648
|
824 |
+
"product at risk of missing its objectives
|
825 |
+
Increased financial risk leading to potential hesitancy in making crucial
|
826 |
+
investment decisions
|
827 |
+
Delayed entry to the market, reducing the competitive edge and potential
|
828 |
+
market share
|
829 |
+
The influx of public funding would positively impact the R&D activities of all the
|
830 |
+
organisations involved by:
|
831 |
+
Allowing allocation of more resources towards research and development tasks
|
832 |
+
Enabling exploration of cutting-edge AI technologies and methodologies
|
833 |
+
Facilitating comprehensive testing and refinement processes to ensure the
|
834 |
+
development of superior fraud and financial crime solutions for financial
|
835 |
+
institutions.
|
836 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|23|443951994aae4f29bdd1f3f76023f61e
|
837 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
838 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 25/31Assessor 3
|
839 |
+
The arguments in favour of public funding are well-justified. Alternative
|
840 |
+
sources of support have not been thoroughly described. The project will
|
841 |
+
enhance the R&D activities of the organisation.
|
842 |
+
Assessor 4
|
843 |
+
Funding insufficiently justified and reasons for not internally boot strapping are
|
844 |
+
concerning with pressures already in the business for margin. Suggest
|
845 |
+
revisiting assumptions, validating to deliver a trustworthy proposition and
|
846 |
+
reassessing cost needs with alternative sources
|
847 |
+
Assessor 5
|
848 |
+
There are clear arguments as to how the public funding would benefit the
|
849 |
+
organisations. However the options of alternative funding sources, other than
|
850 |
+
internal funding, have not been discussed.
|
851 |
+
Average score 4.8 / 10 11. Costs and value for money
|
852 |
+
How much will the project cost and how does it represent value for money
|
853 |
+
for the team and the taxpayer?
|
854 |
+
The development of a flexible modular platform that supports large language
|
855 |
+
models and other new AI developments, such as knowledge-integration, in an
|
856 |
+
explainable way and supports compliance with regulation is a major effort. We
|
857 |
+
provide value for money by building on an existing base with a team with previous
|
858 |
+
experience in building similar solutions. The cost is for a team that can deliver
|
859 |
+
these requirements to a high standard."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|24|e7434ea7a6d94b26b6f19297b820294f
|
860 |
+
"experience in building similar solutions. The cost is for a team that can deliver
|
861 |
+
these requirements to a high standard.
|
862 |
+
BigSpark and City, University of London will be collaborating on the project
|
863 |
+
together and the funding will be split according to the resource forecast in the
|
864 |
+
budget and as illustrated in this application. This provides a sensible division of
|
865 |
+
effort and value, leveraging the university's strength in research and BigSparks
|
866 |
+
capabilities in software engineering and Machine Learning development.
|
867 |
+
The total cost for the joint project between City and BigSpark is estimated to be
|
868 |
+
£443,755.
|
869 |
+
BigSpark are requesting a grant that covers 70% of their project costs to fund the
|
870 |
+
development and evaluation phases of the project."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|24|75c7dd4a4add46f0b0a720585ecce2e6
|
871 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
872 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 26/31Assessor 1
|
873 |
+
The overall costs of the project and the repartition of the costs between the
|
874 |
+
partners are sound. The lead partner has confirmed how they would finance
|
875 |
+
their contribution. However, the costs included in the lead applicant's financials
|
876 |
+
have not been sufficiently explained. 214k£ are included in ""other costs"" as
|
877 |
+
""Lost billing days"" with no clear justifications.
|
878 |
+
Assessor 2
|
879 |
+
The proposal includes a budget which is appropriate for a piece of work of this
|
880 |
+
scale and duration, however value for money is difficult to gauge due to a lack
|
881 |
+
of information in the project plan about what the project would set out to do
|
882 |
+
and deliver. The project would not make use of subcontractor effort, and
|
883 |
+
applicants clearly state how they will fund their budget contribution. However,Breakdown:
|
884 |
+
City Application: £102,405
|
885 |
+
City will contribute expertise in data analysis, model development, and research.
|
886 |
+
Their costs are mainly for dedicated research staff and are amortised in
|
887 |
+
accordance with their standard cost models/policies
|
888 |
+
BigSpark grant Application: £216,779
|
889 |
+
BigSpark investment : £92,905
|
890 |
+
BigSpark will manage the overall project, focusing on software development,
|
891 |
+
integration, and commercialisation. Costs cover development staff, computational
|
892 |
+
hardware, software licences, and operational expenses/overheads."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|25|bcc39a9f9d6840c2bd2099dc4ec94897
|
893 |
+
"integration, and commercialisation. Costs cover development staff, computational
|
894 |
+
hardware, software licences, and operational expenses/overheads.
|
895 |
+
Each partner will invest both financial and human resources into the project, in
|
896 |
+
alignment with their areas of expertise and capability. The grant amount will
|
897 |
+
finance a large majority of the project costs for Bigspark , allowing us to focus our
|
898 |
+
resources on development, testing, and deployment without financial strain. The
|
899 |
+
investment portion will come from retained capital.
|
900 |
+
BigSpark's billable rate for AI consulting and development services is below the
|
901 |
+
market average (Consulting UK 2023). This project is a cost-effective way to
|
902 |
+
develop advanced AI solutions for financial institutions, reduce fraud, enhance
|
903 |
+
efficiency, and foster local expertise in AI and data science. Compared to
|
904 |
+
alternative spending options, this investment is strategically focused on long-term
|
905 |
+
growth and innovation, providing more substantial and enduring benefits for
|
906 |
+
financial institutions
|
907 |
+
Assessor feedback"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|25|0dffc0c7e83b4cac86c75f8a9024a89f
|
908 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
909 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 27/31The finances of all project partners are included in this summary.
|
910 |
+
Total costs
|
911 |
+
(£)Funding level
|
912 |
+
(%)Funding sought
|
913 |
+
(£)Contribution to
|
914 |
+
project (£)Other public sector funding
|
915 |
+
(£)
|
916 |
+
309,684 70.00 216,779 92,905 0
|
917 |
+
112,310 100.00 112,310 0 0
|
918 |
+
Total £421,994 329,089 92,905 0the lead applicant has included a substantial sum in the Other Costs budget
|
919 |
+
line item to cover ""lost billing days"", which is not explained or justified in the
|
920 |
+
Q11 response.
|
921 |
+
Assessor 3
|
922 |
+
The project costs seem quite high. It is unclear how the company will finance
|
923 |
+
its contribution. Little information is provided on the value for money of this
|
924 |
+
project
|
925 |
+
Assessor 4
|
926 |
+
Lacking in granular detail re daily rates, number of days, allocated spend
|
927 |
+
internally etc.
|
928 |
+
Assessor 5
|
929 |
+
Balance of costs and efforts across the two project partners seem reasonable.
|
930 |
+
Overall costs seem appropriate though are hard to judge without more detailed
|
931 |
+
breakdown. What is still unclear is what the actual outputs of the project will
|
932 |
+
be.
|
933 |
+
Application score: 64.4%
|
934 |
+
BIGSP ARK LIMITED
|
935 |
+
Lead organisation
|
936 |
+
City University of
|
937 |
+
London
|
938 |
+
Partner"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|26|65dbe322fd7f48d6b2f91f9cd80f50f4
|
939 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
940 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 28/31Funding breakdown
|
941 |
+
TotalLabour
|
942 |
+
(£)Overheads
|
943 |
+
(£)Materials
|
944 |
+
(£)Capital
|
945 |
+
usage
|
946 |
+
(£)Subcontracting
|
947 |
+
(£)Travel and
|
948 |
+
subsistence
|
949 |
+
(£)Other
|
950 |
+
costs (£)
|
951 |
+
View finances
|
952 |
+
(/application/10099028/form/FINANCE)£309,684 66,737 13,347 15,400 0 0 0214,200
|
953 |
+
£112,310 95,331 9,725 2,000 0 0 2,400 2,854
|
954 |
+
Total £421,994 162,068 23,072 17,400 0 0 2,400 217,054BIGSP ARK LIMITED
|
955 |
+
Lead organisation
|
956 |
+
City University of London
|
957 |
+
Partner
|
958 |
+
Supporting information
|
959 |
+
Project impact
|
960 |
+
Understanding the benefits of the projects Innovate UK supports
|
961 |
+
Partner Status
|
962 |
+
BIGSPARK LIMITED (Lead) Complete
|
963 |
+
City University of London Complete"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|27|6af4bcd668e2458faf06cfbf3f70bf3e
|
964 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
965 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 29/31Terms and conditions
|
966 |
+
Award terms and conditions
|
967 |
+
PartnerFunding
|
968 |
+
rules Terms and conditions
|
969 |
+
BIGSPARK
|
970 |
+
LIMITED
|
971 |
+
(Lead)Subsidy
|
972 |
+
controlInnovate UK - Subsidy control
|
973 |
+
(/application/10099028/form/terms-and-
|
974 |
+
conditions/organisation/86013/question/35938)
|
975 |
+
City
|
976 |
+
University of
|
977 |
+
LondonSubsidy
|
978 |
+
controlInnovate UK - Subsidy control
|
979 |
+
(/application/10099028/form/terms-and-
|
980 |
+
conditions/organisation/26795/question/35938)"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|28|d1f621c5f5784e96b853a7df1b6cff6b
|
981 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
982 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 30/31Assessor feedback
|
983 |
+
Assessor 1
|
984 |
+
The applicant has demonstrated a great understanding of their target market
|
985 |
+
and its dynamics. However, the overall application comports a number of
|
986 |
+
gaps. The project plan and technical risks both require a more in-depth level of
|
987 |
+
detail with challenges clearly addressed. The financials also need to be further
|
988 |
+
explained and justified.
|
989 |
+
Assessor 2
|
990 |
+
This is an interesting proposal for a project that would set out to explore the
|
991 |
+
potential of an AI based approach to fraud prevention in financial services
|
992 |
+
settings. The applicants show that they have a good understanding of the
|
993 |
+
problem space, and the core team has relevant experience which they are
|
994 |
+
able to bring to bear on the challenge. However, the proposal is not suitable
|
995 |
+
for funding due to a lack of detail in a number of key areas such as key R&D
|
996 |
+
innovations, competitor analysis, freedom-to-operate and the project plan -
|
997 |
+
please see feedback for the individual questions.
|
998 |
+
Assessor 3
|
999 |
+
The project suggests an innovative approach to fraud detection in the banking
|
1000 |
+
sector. Even if the team of the project has all the skills required to deliver it and
|
1001 |
+
they are very experienced, the argument for value for money appears to be
|
1002 |
+
lacking. The projects costs seem quite high and how the organisation will
|
1003 |
+
finance its contribution is unclear
|
1004 |
+
Assessor 4"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|29|15934a0dd87a47589691994fd25c8622
|
1005 |
+
"lacking. The projects costs seem quite high and how the organisation will
|
1006 |
+
finance its contribution is unclear
|
1007 |
+
Assessor 4
|
1008 |
+
Too early in stage, model needs market validation and assumption testing to
|
1009 |
+
remove risks that are currently concerning in a high risk area of R&D for the
|
1010 |
+
funding requested
|
1011 |
+
Assessor 5
|
1012 |
+
The application is in scope and clearly aims to advance the uptake of digital
|
1013 |
+
technologies in financial services. While the project team have good
|
1014 |
+
technological credentials, expertise on the application (fraud detection) and a"|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|29|0b9a0a5a854d48538d95f3bc7444a3c0
|
1015 |
+
"03/11/2023, 10:27 Print application - Innovation Funding Service
|
1016 |
+
https://apply-for-innovation-funding.service.gov.uk/application/10099028/print 31/31clear route to market are missing. Overall it remains unclear what exactly the
|
1017 |
+
project will deliver (a framework, model, platform, tool), making it hard to
|
1018 |
+
assess on added value and value for money."|/var/folders/jk/znm3f6kd1xj8w5_2n06stbqm0000gn/T/gradio/447833403b166612d1e8b79195cb8ca46fd4cb02/Print application - Innovation Funding Service.pdf|30|c1b9c7178bdb4c38bd779c1a452df28d
|
docs/graph.csv
ADDED
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
node_1|node_2|edge|chunk_id|node_3
|
2 |
+
innovation in professional & financial services r2 collaborations|an ai framework for de-risking large language models in the financial industry|This project will de-risk the adoption of AI and specifically Large Language Models (LLMs) in the financial industry by creating a framework that will enable the rapid exploitation of new AI technologies.|1bad89215baa459391e738efb94415ef|
|
3 |
+
an ai framework for de-risking large language models in the financial industry|modularised approach|The project will develop a modularised approach to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
4 |
+
an ai framework for de-risking large language models in the financial industry|explanability|The project will develop modules for explainability to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
5 |
+
an ai framework for de-risking large language models in the financial industry|knowledge integration|The project will develop modules for knowledge integration to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
6 |
+
an ai framework for de-risking large language models in the financial industry|rapid integration|The project will develop necessary interfaces for ensuring rapid integration to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
7 |
+
an ai framework for de-risking large language models in the financial industry|compliance|The project will develop necessary interfaces for ensuring compliance to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
8 |
+
an ai framework for de-risking large language models in the financial industry|safe operation|The project will develop necessary interfaces for ensuring safe operation to de-risk the adoption of AI and LLMs in the financial industry.|1bad89215baa459391e738efb94415ef|
|
9 |
+
ai regulation|financial institutions|The delay in adoption of AI by financial institutions is due to the risks associated with investment in AI, caused by the explosion of new AI developments and the multiplicity of new technologies on the market.|a61faa746c9141d4a73577a1c9cb43c3|
|
10 |
+
ai regulation|uk companies|The delay in adoption of AI by financial institutions risks losing the advantage of the leading position that AI research in the UK currently has.|a61faa746c9141d4a73577a1c9cb43c3|
|
11 |
+
ai|privacy|Serious problems associated with current AI include privacy.|a61faa746c9141d4a73577a1c9cb43c3|
|
12 |
+
ai|transparency|Serious problems associated with current AI include transparency.|a61faa746c9141d4a73577a1c9cb43c3|
|
13 |
+
ai|bias|Serious problems associated with current AI include bias.|a61faa746c9141d4a73577a1c9cb43c3|
|
14 |
+
ai|toxicity|Serious problems associated with current AI include toxicity.|a61faa746c9141d4a73577a1c9cb43c3|
|
15 |
+
chatgpt/gpt 4, bard, claude and llama|monolithic systems|The trend towards monolithic systems such as ChatGPT/GPT 4, Bard, Claude and Llama makes the task of dynamically integrating and adapting regulation difficult.|a61faa746c9141d4a73577a1c9cb43c3|
|
16 |
+
modular framework|ai technologies|We propose the development of a modular framework that will employ different AI technologies for their strengths.|a61faa746c9141d4a73577a1c9cb43c3|
|
17 |
+
knowledge-based rules and guardrails|modular framework|The proposed modular framework will provide interfaces through which generative, predictive and decision-making models can be combined to interact in a controlled manner.|a61faa746c9141d4a73577a1c9cb43c3|
|
18 |
+
large language models|discriminatory bias|Modern AI models, specifically large language models, may exhibit discriminatory bias in their output. This presents a risk for financial institutions in the UK as they are required to adhere to anti-discrimination regulation.|5457e85797cc4943a86dafab432168e0|
|
19 |
+
large language models|toxic language|Modern AI models, specifically large language models, may produce toxic and offensive language in their output. This poses a risk to financial institutions as they must ensure that the language used by their AI systems is not prejudiced or derogatory.|5457e85797cc4943a86dafab432168e0|
|
20 |
+
large language models|hallucinations|Modern AI models, specifically large language models, may generate false or fabricated information in their output, which is known as hallucinations. This presents a risk for financial institutions as the accuracy and reliability of their decisions based on such outputs cannot be guaranteed.|5457e85797cc4943a86dafab432168e0|
|
21 |
+
modern ai techniques|risks|The risks associated with applying modern AI techniques, specifically large language models, in the financial industry include discriminatory bias, toxic language, and hallucinations. These risks prevent many financial institutions from investing in advanced AI due to regulatory requirements and new regulation being planned and created.|5457e85797cc4943a86dafab432168e0|
|
22 |
+
modern ai techniques|reliable methods|There are currently not reliable methods to understand and explain the output of modern AI techniques, specifically large language models, which is required by UK and EU regulation for customer-facing decisions by AI. This presents a risk as financial institutions must ensure that their AI systems can provide transparent and explainable results.|5457e85797cc4943a86dafab432168e0|
|
23 |
+
modern ai techniques|regulation|New regulation for AI is currently being planned and created, which adds to the level of risk associated with applying modern AI techniques, specifically large language models, in the financial industry. This presents a challenge for financial institutions as they must ensure compliance with these new regulatory requirements.|5457e85797cc4943a86dafab432168e0|
|
24 |
+
modern ai techniques|reliability|The reliability and trustworthiness of modern AI techniques, specifically large language models, is a significant risk as they are vast in size and very difficult to control. This presents a challenge for financial institutions as they must ensure that their AI systems can provide accurate and reliable results.|5457e85797cc4943a86dafab432168e0|
|
25 |
+
modern ai techniques|classical metrics of model quality|Modern AI techniques, specifically large language models, may exhibit classical metrics of model quality, but they also show other undesirable behaviors such as discriminatory bias, toxic language, and hallucinations. This presents a risk for financial institutions as the accuracy and reliability of their decisions based on such outputs cannot be guaranteed.|5457e85797cc4943a86dafab432168e0|
|
26 |
+
uk financial industry|competitive advantage|The use of neural-symbolic machine learning to integrate logical rules will enable the use of linguistic capabilities of LLMs without their risks by ensuring and explaining adherence to rules. This provides a competitive advantage for the UK financial industry as it allows for rapid adoption of AI with less risk and lower cost.|5457e85797cc4943a86dafab432168e0|
|
27 |
+
uk financial industry|new regulation|The risks associated with applying modern AI techniques, specifically large language models, in the UK financial industry are addressed by new regulation being planned and created. Financial institutions must ensure compliance with these new regulatory requirements.|5457e85797cc4943a86dafab432168e0|
|
28 |
+
risk|financial institutions|Prevents many financial institutions from investing in advanced AI applications.|e7dbc79f7f0b464cb90f095f0b5bcdf8|
|
29 |
+
ai framework|modular ai framework|The design, implementation, and evaluation of a modular AI framework.|e7dbc79f7f0b464cb90f095f0b5bcdf8|
|
30 |
+
ai framework|different functional modules using different models|Divides AI systems into different functional modules using different models that combine the benefits of knowledge-|e7dbc79f7f0b464cb90f095f0b5bcdf8|
|
31 |
+
innovation funding service|apply-for-innovation-funding.service.gov.uk|The Innovation Funding Service provides a platform for applying for innovation funding, which includes the URL 'https://apply-for-innovation-funding.service.gov.uk/application/10099028/print'|28aa8a7b69764416b058ed5ef6f2c1df|
|
32 |
+
4/31|in scope|The project is currently in scope for the Innovation in Professional and Financial Services competition, as indicated by '4/31' in the context.|28aa8a7b69764416b058ed5ef6f2c1df|
|
33 |
+
5/5|integration and neuro-symbolic learning and reasoning, traditional explainability with feature importance, and guardrail models that detect toxicity and other undesired behaviour of large language models.|The project involves the application of research into integration, neuro-symbolic learning and reasoning, traditional explainability with feature importance, and guardrail models that detect toxicity and other undesired behaviour of large language models.|28aa8a7b69764416b058ed5ef6f2c1df|
|
34 |
+
city|university of london|Research into explainability, knowledge integration and neuro-symbolic learning methods will be applied from City, University of London in this project.|28aa8a7b69764416b058ed5ef6f2c1df|
|
35 |
+
bigspark|industrial software framework and domain expertise|BigSpark will contribute its proven industrial software framework and domain expertise to the project.|28aa8a7b69764416b058ed5ef6f2c1df|
|
36 |
+
financial institutions|safe and flexible way, allowing for rapid adaptation to changing regulations|The project will enable financial institutions to engage with the latest AI technology in a safe and flexible way, allowing for rapid adaptation to changing regulations.|28aa8a7b69764416b058ed5ef6f2c1df|
|
37 |
+
uk financial institutions|taking full advantage of the strength of ai research in the uk and staying ahead of their international competitors.|The project will help UK financial institutions take full advantage of the strength of AI research in the UK and stay ahead of their international competitors.|28aa8a7b69764416b058ed5ef6f2c1df|
|
38 |
+
services competition|fraud detection capabilities|The Services competition focuses on advancing fraud detection capabilities in the financial sector.|e2ed7bdc279048a887ac810839ccb85b|
|
39 |
+
fraud prevention|services competition|The Services competition involves collaboration between a data and engineering consultancy and a university research team for fraud prevention.|e2ed7bdc279048a887ac810839ccb85b|
|
40 |
+
financial institutions|better product for fraud detection|The project will deliver a better product for fraud detection by creating a modular AI framework that allows financial institutions to leverage novel interfaces like large language models safely and effectively.|e2ed7bdc279048a887ac810839ccb85b|
|
41 |
+
novel interfaces|better product for fraud detection|The project will deliver a better product for fraud detection by creating a modular AI framework that allows financial institutions to leverage novel interfaces like large language models safely and effectively.|e2ed7bdc279048a887ac810839ccb85b|
|
42 |
+
legacy systems|boosts fraud detection rates compared to rules-based legacy systems|The modular AI framework that allows financial institutions to leverage novel interfaces like large language models safely and effectively boosts fraud detection rates compared to rules-based legacy systems.|e2ed7bdc279048a887ac810839ccb85b|
|
43 |
+
institutions|uses ai-supported fraud prevention with confidence|The integrated explainability and auditability modules ensure model decisions adhere to regulations around transparent decision, enabling institutions to use AI-supported fraud prevention with confidence.|e2ed7bdc279048a887ac810839ccb85b|
|
44 |
+
ethics|considers broader aspects including ethics|The project considers broader aspects including ethics, interpretability, and emerging regulatory needs.|e2ed7bdc279048a887ac810839ccb85b|
|
45 |
+
interpretability|considers broader aspects including interpretability|The project considers broader aspects including ethics, interpretability, and emerging regulatory needs.|e2ed7bdc279048a887ac810839ccb85b|
|
46 |
+
emerging regulatory needs|considers broader aspects including emerging regulatory needs|The project considers broader aspects including ethics, interpretability, and emerging regulatory needs.|e2ed7bdc279048a887ac810839ccb85b|
|
47 |
+
tools to help non-technical users understand model outputs|considers broader aspects including ethics, interpretability, and emerging regulatory needs|The project provides tools to help non-technical users understand model outputs.|e2ed7bdc279048a887ac810839ccb85b|
|
48 |
+
cost savings|financial institutions|Cost savings from preventing fraud enable financial institutions to invest.|e2ed7bdc279048a887ac810839ccb85b|
|
49 |
+
understand model outputs|preventing fraud|enables|6d2f16e5135844cba12929928bad1dd7|
|
50 |
+
preventing fraud|cost savings|results in|6d2f16e5135844cba12929928bad1dd7|
|
51 |
+
cost savings|financial institutions|enable|6d2f16e5135844cba12929928bad1dd7|
|
52 |
+
financial institutions|invest more into their products|in turn making them more accessible to customers|6d2f16e5135844cba12929928bad1dd7|
|
53 |
+
innovation funding service|competition's brief|The project described meets the scope of the competition as per the competition's brief.|eceee4e218a847ab9ca18e8990d809d2|
|
54 |
+
uk sme|consortium led by a uk sme|The proposal is clearly in scope for the competition as it originates from a consortium led by a UK SME and specifically addresses themes from the competition brief.|eceee4e218a847ab9ca18e8990d809d2|
|
55 |
+
competition brief|themes from the competition brief|The proposal is clearly in scope for the competition as it originates from a consortium led by a UK SME and specifically addresses themes from the competition brief.|eceee4e218a847ab9ca18e8990d809d2|
|
56 |
+
competition brief|competition's scope|The project described meets the scope of the competition as per the competition's brief.|eceee4e218a847ab9ca18e8990d809d2|
|
57 |
+
target markets|professional and financial services sectors|The project is in line with the scope of this competition as the target markets are the professional and financial services sectors.|eceee4e218a847ab9ca18e8990d809d2|
|
58 |
+
information product|framework|With its application in fraud detection for financial services, it would be in scope for this funding call.|eceee4e218a847ab9ca18e8990d809d2|
|
59 |
+
fraud detection capacities|financial services sectors|The project suggests to improve fraud detection capacities for companies operating in these sectors|eceee4e218a847ab9ca18e8990d809d2|
|
60 |
+
banking system|customers|Customers earn the benefit of knowing advanced technology is safeguarding the banking system and their funds without having the potential of being invasive and limit their ability to access banking products or services.|eceee4e218a847ab9ca18e8990d809d2|
|
61 |
+
modern ai advancements|financial sector|Overall, the project unlocks the power of modern AI advancements for the financial sector in a compliant, accountable way that is easy to deploy|eceee4e218a847ab9ca18e8990d809d2|
|
62 |
+
uk sme|consortium|The proposal is clearly in scope for the competition as it originates from a consortium led by a UK SME and specifically addresses themes from the competition brief.|eceee4e218a847ab9ca18e8990d809d2|
|
63 |
+
competition's scope|competition's brief|The project described meets the scope of the competition as per the competition's brief.|eceee4e218a847ab9ca18e8990d809d2|
|
64 |
+
fast, ethical, and de-risked adoption of arti���cial intelligence and large language models for transparent decision making and fraud prevention in financial institutions|complex technology landscapes in banks|challenge related to exploring new fraud prevention models|72cf95f9d3e74ae8bda9d198fb75bd57|
|
65 |
+
fast, ethical, and de-risked adoption of artificial intelligence and large language models for transparent decision making and fraud prevention in financial institutions|legacy software not leveraging latest advancements|challenge related to utilizing AI and ML for fraud prevention|72cf95f9d3e74ae8bda9d198fb75bd57|
|
66 |
+
fast, ethical, and de-risked adoption of artificial intelligence and large language models for transparent decision making and fraud prevention in financial institutions|regulatory concerns like fca's consumer duty|challenge related to exploring new fraud prevention models|72cf95f9d3e74ae8bda9d198fb75bd57|
|
67 |
+
fast, ethical, and de-risked adoption of artificial intelligence and large language models for transparent decision making and fraud prevention in financial institutions|latest ai developments like large language models|raise new problems like hallucinations|72cf95f9d3e74ae8bda9d198fb75bd57|
|
68 |
+
uk finance's latest annual fraud report|over £1.2 billion stolen by criminals through fraud in 2022||72cf95f9d3e74ae8bda9d198fb75bd57|
|
69 |
+
large language models|hallucinations|Large language models (LLMs) sometimes provide answers that are plausible but incorrect, a phenomenon known as hallucinations.|0331aa8d239a481182939d9fcb246d25|
|
70 |
+
large language models|explanability|The deeply end-to-end nature of large language models (LLMs) raises new issues related to explainability, as regulatory requirements for financial decisions, such as loan scoring, necessitate explanation using the same model executing decisions.|0331aa8d239a481182939d9fcb246d25|
|
71 |
+
large language models|regulation|The potential regulation of large language models (LLMs) is spurred by their deeply end-to-end nature and issues related to hallucinations.|0331aa8d239a481182939d9fcb246d25|
|
72 |
+
large language models|knowledge/rule-based components|Modularizing large language models (LLMs) into learning and knowledge/rule-based components interacting in neuro-symbolic systems aids decision explainability.|0331aa8d239a481182939d9fcb246d25|
|
73 |
+
large language models|banking industry|The market opportunity for large language models (LLMs) is in providing a platform enabling banks to explore modern AI for decision making and fraud prevention that integrates with existing systems.|0331aa8d239a481182939d9fcb246d25|
|
74 |
+
langchain|large language models|Frameworks like LangChain enable accessing knowledge to augment large language models.|0331aa8d239a481182939d9fcb246d25|
|
75 |
+
llamaindex|large language models|Frameworks like LlamaIndex enable accessing knowledge to augment large language models.|0331aa8d239a481182939d9fcb246d25|
|
76 |
+
neuro-symbolic systems|learning components|In neuro-symbolic systems, learning and knowledge/rule-based components interact with each other.|0331aa8d239a481182939d9fcb246d25|
|
77 |
+
decision making|financial decisions|Decision making is a requirement for heavily regulated financial decisions such as loan scoring.|0331aa8d239a481182939d9fcb246d25|
|
78 |
+
ai for fraud prevention|fraud detection in financial services settings|The proposal sets out a good underlying business motivation for the project based on exploring the potential of AI for fraud prevention in financial services settings. The applicants show that they have a good understanding of the problem space and wider factors influencing the opportunity.|9ea32fd93e384055995e26e67d101ce7|
|
79 |
+
ai for fraud prevention|previous work in the area|The motivation for the project is good and it is collaborated by previous work in the area.|9ea32fd93e384055995e26e67d101ce7|
|
80 |
+
opportunity|market research and statistics|Further information would have been appreciated about the scale of the opportunity, using authoritative independent market research and statistics help evidence the applicants' assertions.|9ea32fd93e384055995e26e67d101ce7|
|
81 |
+
gap in the market|similar innovations|The gap in the market is identified and similar innovations are described|9ea32fd93e384055995e26e67d101ce7|
|
82 |
+
ai for fraud prevention|infrastructure without changes|BigSpark has already deployed advanced fraud detection technology without significant changes to infrastructure.|9ea32fd93e384055995e26e67d101ce7|
|
83 |
+
ai and large language models|interpretability and transparency of machine learning models|The main approach is to develop a modular framework that will improve the interpretability and transparency of machine learning models, with a focus on addressing the challenges and opportunities in this field. AI and Large Language Models are used for language or multi-modal information processing, but they currently lack effective methods for explanation due to their size and linguistic quality.|6b7d165847d541d3afa2855eb1f06900|
|
84 |
+
decision-making functionalities|other functions|The decision-making functionalities (e.g. assessing the probability of a transaction being fraudulent or a customer defaulting on a loan), are separated from other functions, such as the interaction with the customer via text or speech, and creating a market model.|6b7d165847d541d3afa2855eb1f06900|
|
85 |
+
interaction with the customer via text or speech|creating a market model|The process of achieving innovative modularisation framework for fraud detection involves interaction with customers through text or speech and creating a market model.|d77c3cbed4d045f5aa0c26789eb35f11|
|
86 |
+
explainability|knowledge-integration methods applied to fraud detections|The innovative modularisation framework for fraud detection will support existing techniques for explainability and knowledge integration, specifically neuro-symbolic modeling and knowledge integration.|d77c3cbed4d045f5aa0c26789eb35f11|
|
87 |
+
feature attribution|model visualization|The innovative modularisation framework for fraud detection will support existing techniques such as feature attribution and model visualization, e.g., LIME and SHAP.|d77c3cbed4d045f5aa0c26789eb35f11|
|
88 |
+
decision rule extraction|explainability and knowledge-integration methods applied to fraud detections|The innovative modularisation framework for fraud detection will support existing techniques such as decision rule extraction, e.g., LIME and SHAP.|d77c3cbed4d045f5aa0c26789eb35f11|
|
89 |
+
neuro-symbolic modeling|knowledge-integration|The innovative modularisation framework for fraud detection will interface and explain different modules using neuro-symbolic modeling and knowledge integration.|d77c3cbed4d045f5aa0c26789eb35f11|
|
90 |
+
users' trust in ai-based decisions|greater transparency|For consumers to place their trust in AI-based systems, it is essential for them to comprehend the inner workings and decision-making processes of the underlying models. Our framework will aim to provide answers to all these questions, thus promoting greater transparency.|d77c3cbed4d045f5aa0c26789eb35f11|
|
91 |
+
llms|interpretation|Augmenting explainability with LLMs aids interpretation,|d77c3cbed4d045f5aa0c26789eb35f11|
|
92 |
+
ai training|assessor feedback|This approach ensures a deeper understanding of AI decisions, identifying biases and improving performance. Our emphasis lies in combining and refining these technologies into a unified and comprehensive framework, but with clear module boundaries. This approach will provide a more effective solution for model interpretability, transparency, and compliance with regulation.|77b54d7782404b1f9328268ef2a27ebb|
|
93 |
+
bigspark|leading technology company with extensive experience in machine learning within financial services.||77b54d7782404b1f9328268ef2a27ebb|
|
94 |
+
city, university of london|innovative ai and ml designs|We are adapting innovative AI and ML designs from City, University of London to enhance our platform.|77b54d7782404b1f9328268ef2a27ebb|
|
95 |
+
christopher finlayson|data science enablement and productionisation of ai models|Christopher Finlayson has significant domain expertise in Data Science enablement and productionisation of AI models, having spent 6 years dedicated to the domain within financial services.|7502031bdf3645f28d6a3f974c242af5|
|
96 |
+
hamza niazi|ai and computer vision|Hamza Niazi is a highly skilled leader with a strong background in Defense, Health, Consultancy, and Drone Applications. He has significant experience in using AI and Computer Vision to deliver innovative solutions.|7502031bdf3645f28d6a3f974c242af5|
|
97 |
+
rayane houhou|financial institutions|In the past 3 years, he has been providing business and technology consulting for Financial Institutions.|7502031bdf3645f28d6a3f974c242af5|
|
98 |
+
institutions|british financial institutions|In the past 3 years, he has been providing business and technology advisory services to some of the largest British financial institutions.|3fd9a083b8ca48e7b6a553414749b751|
|
99 |
+
institutions|multinational financial institutions|In the past 3 years, he has been providing business and technology advisory services to some of the largest British and multinational financial institutions.|3fd9a083b8ca48e7b6a553414749b751|
|
100 |
+
city, university of london|dr tillman weyde|Dr Tillman Weyde is a Reader in Computer Science at City, University of London|3fd9a083b8ca48e7b6a553414749b751|
|
101 |
+
computer science|dr tillman weyde|Dr Tillman Weyde is a Reader in Computer Science at City, University of London|3fd9a083b8ca48e7b6a553414749b751|
|
102 |
+
academic experience|tillman weyde|Tillman Weyde has over 25 years of academic experience in AI and machine learning.|3fd9a083b8ca48e7b6a553414749b751|
|
103 |
+
ai|machine learning|His research interest is in neural network learning methods and their integration with structured prior knowledge representations.|3fd9a083b8ca48e7b6a553414749b751|
|
104 |
+
domains|education|He has developed machine learning solutions to problems in various domains from education,|3fd9a083b8ca48e7b6a553414749b751|
|
105 |
+
domains|media|to media and engineering,|3fd9a083b8ca48e7b6a553414749b751|
|
106 |
+
domains|finance|to finance.|3fd9a083b8ca48e7b6a553414749b751|
|
107 |
+
dr tillman weyde|over 150 peer-reviewed papers|Tillman Weyde has published over 150 peer-reviewed papers and has been awarded multiple prizes for his work.|3fd9a083b8ca48e7b6a553414749b751|
|
108 |
+
dr tillman weyde|epsrc college|Tillman is a member of the EPSRC college,|3fd9a083b8ca48e7b6a553414749b751|
|
109 |
+
dr tillman weyde|ieee and bcs|IEEE and BCS,|3fd9a083b8ca48e7b6a553414749b751|
|
110 |
+
regular reviewer|epsrc, ahrc, the eu commission|a regular reviewer for EPSRC, AHRC, the EU Commission.|3fd9a083b8ca48e7b6a553414749b751|
|
111 |
+
innovation funding service|https://apply-for-innovation-funding.service.gov.uk/application/10099028/print|Is the print application for Innovation Funding Service located at this URL|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
112 |
+
city university of london|new hire|City University of London is planning to hire a new team member|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
113 |
+
team composition|financials provided|Team composition in Innovation Funding Service does not align with financial details provided|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
114 |
+
collaboration between teams||More information is needed to understand the potential for collaboration between the teams involved in this collaboration|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
115 |
+
core project team|relevant skills and experience|The core project team has relevant skills and experience required for successful delivery of the project|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
116 |
+
specialist ai skills||More information is needed as to whether potential candidates have been identified for this new job role requiring specialist AI skills|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
117 |
+
associate dean|dr chris child|Dr Chris Child is the Associate Dean for Employability & Corporate Relations at the institution mentioned in the text|b17a10e4dc1d4a1ebb1a3dab35d8d204|
|
118 |
+
assessor 3dr chris child|city, university of london|Dr Chris Child is the Associate Dean for Employability & Corporate Relations at City, University of London.|db4453c60eaa4f79aa20b0685fbd69f7|
|
119 |
+
chris's funded research projects|a large language model driven ai system for a law firm.|Chris's funded research projects include a large language model driven AI system for a law firmer.|db4453c60eaa4f79aa20b0685fbd69f7|
|
120 |
+
city, uol|machine learning engineer|City, UoL will recruit a machine learning engineer|db4453c60eaa4f79aa20b0685fbd69f7|
|
121 |
+
assessor feedback|city and support bigspark with integration|The machine learning engineer will implement and test research-based solutions at City and support BigSpark with integration|db4453c60eaa4f79aa20b0685fbd69f7|
|
122 |
+
uk banking system|fraud prevention capabilities|The primary target market for this project is the UK banking system, which needs AI financial decision making and fraud prevention capabilities. Fraud losses reached £1.2 billion in 2022 (UK Finance, 2022). The global fraud prevention market was valued at $25.66 billion in 2021 with a 22.6% estimated annual growth rate (Fraud Business Insights, 2023), and the UK accounting for 4% of global banking assets (Bank for International Settlements). The current potential market for fraud prevention solutions in UK banking can be estimated at around £1 billion annually, potentially reaching £4 billion annually in 2030.|7905cfdef1ea483da918808f40d7c84c|
|
123 |
+
fraud detection teams|key stakeholders in this market|Within banks, the key stakeholders in this market are fraud detection teams,|7905cfdef1ea483da918808f40d7c84c|
|
124 |
+
ai/ml software|legacy bank systems|Integration with legacy bank systems can be a barrier to entry for AI/ML technologies, but our product addresses this issue by providing seamless integration.|566e15b9131f4af5950ebd4048b38754|
|
125 |
+
fraud detection teams|traditional rule-based systems|Our value proposition is increased accuracy and automation in financial decision making and fraud detection versus traditional, only rule-based systems.|566e15b9131f4af5950ebd4048b38754|
|
126 |
+
ai/ml software|traditional rule-based systems|New AI/ML technologies are emerging that can outperform traditional rules-based approaches, making them a dynamic force in the market.|566e15b9131f4af5950ebd4048b38754|
|
127 |
+
data regulatory/ethical concerns|ai/ml software|Data regulatory/ethical concerns are one of the main barriers to entry for AI/ML technologies, but we are well-positioned to address these issues by adhering to strict data privacy and security standards.|566e15b9131f4af5950ebd4048b38754|
|
128 |
+
fraud detection teams|analytics/data science teams|Both fraud detection teams and analytics/data science teams are key stakeholders in this market, as they rely on AI/ML software to improve decision making and fraud detection.|566e15b9131f4af5950ebd4048b38754|
|
129 |
+
information security leaders|technology leadership|Both information security leaders and technology leadership play important roles in this market, as they are responsible for ensuring the security and integration of AI/ML technologies into bank systems.|566e15b9131f4af5950ebd4048b38754|
|
130 |
+
ibm|nice|Key players in this market include IBM, NICE, and FICO.|566e15b9131f4af5950ebd4048b38754|FICO
|
131 |
+
uk lags behind in adopting modern ai advancements for fraud prevention in banking compared to other industries|most major uk banks still rely primarily on traditional rule-based systems for fraud detection|The UK lags behind other industries in integrating modern AI and machine learning into their fraud operations, while most major UK banks continue to use traditional rule-based systems for fraud detection.|fc57393422004c29b8f2fe985dfaf561|
|
132 |
+
most major uk banks still rely primarily on traditional rule-based systems for fraud detection|technology companies have been quicker to integrate ai and machine learning into their fraud operations|While most major UK banks continue to use traditional rule-based systems for fraud detection, technology companies have been more proactive in integrating AI and machine learning technologies into their fraud operations.|fc57393422004c29b8f2fe985dfaf561|
|
133 |
+
ai and machine learning|banking industry|Targeted efforts to implement leading-edge AI technologies focused on the unique needs of banks can enable the UK banking industry to make rapid progress in fraud detection and prevention while still upholding privacy, security and ethics (UK Finance, 2020).|f29587466b9547798b8d5031a7a7ee6c|
|
134 |
+
ai and machine learning|fraud operations|(Wall Street Journal, 2021)|f29587466b9547798b8d5031a7a7ee6c|
|
135 |
+
e-commerce|financial services firms|another key market needing advanced financial decision making and fraud prevention.|f29587466b9547798b8d5031a7a7ee6c|
|
136 |
+
global e-commerce fraud losses|annually|Estimated at $20 billion annually and increasing over 20% year-over-year as transactions grow (Juniper Research, 2021).|f29587466b9547798b8d5031a7a7ee6c|
|
137 |
+
ai/ml approaches|fraud prevention|New AI/ML approaches can help firms cut fraud loss rates while maintaining a strong customer experience.|f29587466b9547798b8d5031a7a7ee6c|
|
138 |
+
bigspark's consultancy business|ai specialists from city, uol, and external governance and legislation experts|collaborations with AI specialists from City, UoL, and external governance and legislation experts to enrich expertise|5e31ae5f938045718632dd531299d109|
|
139 |
+
bigspark's consultancy business|strategic advisor and implementation specialist|recognized for strategic insights, regulatory compliance knowledge, and operational enhancements|5e31ae5f938045718632dd531299d109|
|
140 |
+
financial services sector|bigspark's consultancy business|serves banks, asset managers, and insurance firms in the financial services sector|5e31ae5f938045718632dd531299d109|
|
141 |
+
financial services sector|dynamic financial sector needs|where clients demand both intellectual and actionable solutions|5e31ae5f938045718632dd531299d109|
|
142 |
+
project outcome|growth of business and increase in long term productivity|How are you going to grow your business and increase long term productivity as a result of the project?|5e31ae5f938045718632dd531299d109|
|
143 |
+
dynamic financial sector needs|ai regulatory advisory|The evolving financial regulatory landscape prompts our expansion into AI regulatory advisory to ensure our solutions stay attuned to dynamic financial sector needs.|8980270036d54fd98fb7630daa1aecd3|
|
144 |
+
fca regulated financial entities|e-commerce payment gateways and digital transaction platforms|Our target market includes FCA regulated financial entities, and other related companies such as e-commerce payment gateways and digital transaction platforms.|8980270036d54fd98fb7630daa1aecd3|
|
145 |
+
existing clients|strategic b2b sales efforts|Our initial route to market is within our existing clients, extending through strategic B2B sales efforts,|8980270036d54fd98fb7630daa1aecd3|
|
146 |
+
events, conferences, and webinars|strategic b2b sales efforts|leveraging events, conferences, and webinars,|8980270036d54fd98fb7630daa1aecd3|
|
147 |
+
platforms and software providers|partnerships with fintech platforms and software providers|We also plan to explore partnerships with fintech platforms and software providers to integrate our modules within their existing solutions.|8980270036d54fd98fb7630daa1aecd3|
|
148 |
+
uk fraud prevention market|£1 billion annually|The UK fraud prevention market is currently estimated at £1 billion annually,|8980270036d54fd98fb7630daa1aecd3|
|
149 |
+
uk fraud prevention market|£4 billion annually by 2030|potentially reaching £4 billion annually by 2030 (Fraud Business Insights, 2023).|8980270036d54fd98fb7630daa1aecd3|
|
150 |
+
multiple financial institutions and fintech firms|consistent revenue stream|By licensing our models to multiple financial institutions and fintech firms, a consistent revenue stream is anticipated.|8980270036d54fd98fb7630daa1aecd3|
|
151 |
+
year 3: 8 licensed customers - £2.4m arr|year 2: 4 licensed customers - £1.2m arr|implies that in Year 3, there will be twice as many licensed customers (8) as there were in Year 2 (4), and the aggregate annual recurring revenue (ARR) from these customers will be three times as great ($2.4m versus $1.2m). This suggests a consistent growth trajectory for the product's customer base and revenue.|868df679c95b45c58de938af64b9e6df|
|
152 |
+
year 2: 4 licensed customers - £1.2m arr|year 1: 2 licensed customers - £600k arr|shows a linear increase in the number of licensed customers (from 2 in Year 1 to 4 in Year 2) and an accompanying increase in ARR ($1.2m versus $600k). This indicates that the product is gaining traction in the market and generating increasing revenues.|868df679c95b45c58de938af64b9e6df|
|
153 |
+
pricing model|estimated £300k p/a per model and above forecast assumes only a single model per customer|suggests that the pricing strategy for the product involves charging a fee of approximately $300,00 per year for each licensed copy. The fact that the revenue forecasts assume only one such copy per customer suggests that this is either the primary business model (i.e., selling licenses rather than providing services) or that additional revenue streams are generated through other means.|868df679c95b45c58de938af64b9e6df|
|
154 |
+
target customers|dissemination plan and commercialisation of the project|indicates that the proposal outlines the potential customers for the product, as well as the steps being taken to bring the product to market. This suggests a clear understanding of who the product will appeal to and how it will be distributed.|868df679c95b45c58de938af64b9e6df|
|
155 |
+
value proposition|lead applicant's target customer for the product that would be developed from the project outputs|shows that the proposal outlines the specific benefits that the product will provide to its intended users. This implies that these benefits are tailored to the needs of the target audience.|868df679c95b45c58de938af64b9e6df|
|
156 |
+
lead applicant's go-to-market strategy and delivery model|dissemination plan and commercialisation of the project|indicates that the proposal includes a detailed explanation of how the product will be sold and delivered to customers. This suggests a thorough understanding of the sales process and the logistics involved in getting the product into customers' hands.|868df679c95b45c58de938af64b9e6df|
|
157 |
+
price point and revenue/growth expectations|dissemination plan and commercialisation of the project|shows that the proposal includes a discussion around pricing strategy and revenue projections. This implies that these aspects have been carefully considered as part of the overall market entry strategy.|868df679c95b45c58de938af64b9e6df|
|
158 |
+
pricing model|exclusive insights and predictions|Our intellectual property will be applied for patents, ensuring our models' insights and predictions are exclusive to clients.|91de00dd604742feb8dfa4993d37f8ec|
|
159 |
+
pricing model|estimated £300k p/a per model|A yet-to-be-finalised pricing model anticipates an estimated £300k p/a per model|91de00dd604742feb8dfa4993d37f8ec|
|
160 |
+
pricing model|single model per customer|and above forecast assumes only a single model per customer.|91de00dd604742feb8dfa4993d37f8ec|
|
161 |
+
saas model|real-time fraud detection|Over time, as our model and approach become industry-standard, a transition to a SaaS model is anticipated, offering real-time fraud detection as a service.|91de00dd604742feb8dfa4993d37f8ec|
|
162 |
+
collaborations with international fintech firms|varied transaction patterns|Collaborations with international fintech firms will prove our models' adaptability to varied transaction patterns,|91de00dd604742feb8dfa4993d37f8ec|
|
163 |
+
assessor feedback|||91de00dd604742feb8dfa4993d37f8ec|
|
164 |
+
uk banks|external parties linked with uk banks|Curtailing fraud promises significant savings for external parties linked with UK banks, leading to yearly savings of £300-600 million as 25-50% of fraud could be prevented. These savings can be channelled back to improve services, digital tools, and community outreach.|715dab319e814db6a6fdf7aac4bf531f|
|
165 |
+
uk banks|customers|Diminished fraud ensures deposit safety, potentially reduces fees, and amplifies services as banks redirect saved funds towards widening access to their products.|715dab319e814db6a6fdf7aac4bf531f|
|
166 |
+
uk economy|customers|Customers stand to gain directly through deposit safety, potentially reduced fees, and amplified services as banks redirect saved funds towards widening access to their products.|715dab319e814db6a6fdf7aac4bf531f|
|
167 |
+
uk economy|uk banks|By implementing advanced AI, UK banks could prevent 25-50% of fraud leading to yearly savings of £300-600 million, translating into capital and financial stability for external parties linked with UK banks.|715dab319e814db6a6fdf7aac4bf531f|
|
168 |
+
uk economy|external parties linked with uk banks|Diminished fraud leads to strengthened financial stability for external parties linked with UK banks, conserving capital and preventing losses of £1.2 billion annually as per UK Finance's latest annual fraud report.|715dab319e814db6a6fdf7aac4bf531f|
|
169 |
+
fees|savings|Banks redirect saved funds towards widening access to their products, potentially reducing fees.|85fed8f4289e415b8b75e4b56098c56b|
|
170 |
+
services|savings|Banks redirect saved funds towards widening access to their products, amplifying services as a result.|85fed8f4289e415b8b75e4b56098c56b|
|
171 |
+
economy|fraud minimization|At the macro level, minimising fraud means injecting more capital into the economy, stimulating growth and investments.|85fed8f4289e415b8b75e4b56098c56b|
|
172 |
+
job opportunities|high-tech jobs|Companies like BigSpark further contribute by generating high-tech job opportunities.|85fed8f4289e415b8b75e4b56098c56b|
|
173 |
+
government objectives of crime reduction and bolstering economic growth|ai-driven fraud prevention|The initiative aligns with government objectives of crime reduction and bolstering economic growth by implementing AI-driven fraud prevention.|f21562f6e2fd410f83f2bcbc56bc686e|
|
174 |
+
ai-driven fraud prevention|enhanced financial infrastructure|The country enjoys reinforced financial infrastructure and an upsurge in high-tech employment opportunities, driving economic progress and trimming unemployment as a result of implementing AI-driven fraud prevention.|f21562f6e2fd410f83f2bcbc56bc686e|
|
175 |
+
ai-driven fraud prevention|demand for more ai and data science professionals|The implementation of AI-driven fraud prevention creates demand for more AI and data science professionals, promoting diversity in tech sectors.|f21562f6e2fd410f83f2bcbc56bc686e|
|
176 |
+
ai-driven fraud prevention|individuals experience heightened financial security and lesser fraud-induced stress|Individuals experience heightened financial security and lesser fraud-induced stress as a result of implementing AI-driven fraud prevention.|f21562f6e2fd410f83f2bcbc56bc686e|
|
177 |
+
ai-driven fraud prevention|public benefits from increased financial security and clarity|The public benefits from increased financial security and clarity as a result of implementing AI-driven fraud prevention.|f21562f6e2fd410f83f2bcbc56bc686e|
|
178 |
+
ai-driven fraud prevention|lesser fraud-induced stress raises overall life quality|Lessers fraud-induced stress raised overall life quality as a result of implementing AI-driven fraud prevention.|f21562f6e2fd410f83f2bcbc56bc686e|
|
179 |
+
ai-driven fraud prevention|citizens from financial crimes|AI-driven fraud prevention safeguards citizens from financial crimes, enhancing trust in institutions.|f21562f6e2fd410f83f2bcbc56bc686e|
|
180 |
+
advanced tech.|barriers in accessing banking services or conducting transactions|Ensures that individuals do not encounter impediments when utilizing financial services or executing transactions due to the presence of advanced technology.|a33ec1dc880c47949c316efc22a80f64|
|
181 |
+
project|positive regulatory implications|The implementation of this initiative results in favorable effects on regulatory practices.|a33ec1dc880c47949c316efc22a80f64|
|
182 |
+
project|goverance structures promoting ethical ai in finance|The project facilitates the emergence of governance models that foster responsible and moral uses of artificial intelligence (AI) in financial contexts.|a33ec1dc880c47949c316efc22a80f64|
|
183 |
+
project|industry norms for consumer-centric, ethical ai|The project establishes standards for the utilization of AI that prioritize customer needs and moral values.|a33ec1dc880c47949c316efc22a80f64|
|
184 |
+
project|ethical ai use in finance|The implementation of this initiative contributes positively to the adoption of responsible AI practices in financial contexts.|a33ec1dc880c47949c316efc22a80f64|
|
185 |
+
assessor feedback|leadership in fostering globally respected, compliant ai|The assessment feedback indicates that this initiative reinforces the UK's leadership in promoting trustworthy and compliant AI on a global scale.|a33ec1dc880c47949c316efc22a80f64|
|
186 |
+
model assurance and compliance module|governance, risk and compliance guardrails|From model design to validation and certification, this work package ensures trust in the AI model by implementing and monitoring Governance, Risk and Compliance guardrails.|3335d3cfff1c42ff9d33590b22d6a9db|
|
187 |
+
model assurance and compliance module|lead partner - bigspark|BigSpark leads the development and integration of the module for managing Governance, Risk and Compliance guardrails from model design to validation and certification.|3335d3cfff1c42ff9d33590b22d6a9db|
|
188 |
+
model explainability|model assurance and compliance module|Model explainability is ensured as part of the Model assurance and compliance module, which implements and monitors Governance, Risk and Compliance guardrails from model design to validation and certification.|3335d3cfff1c42ff9d33590b22d6a9db|
|
189 |
+
test data synthesis|model assurance and compliance module|The Model assurance and compliance module ensures the use of test data synthesis as a part of Governance, Risk and Compliance guardrails from model design to validation and certification.|3335d3cfff1c42ff9d33590b22d6a9db|
|
190 |
+
cost: bigspark|cost: city, uol|The cost of the BigSpark work package is £50,000.00, while the cost for City and UoL's work package is also mentioned in the context.|3335d3cfff1c42ff9d33590b22d6a9db|
|
191 |
+
test data synthesis module|synthetic data|The test data synthesis module, led by BigSpark, will create synthetic data to test models for known fraud patterns, including various transaction types and diverse customer data.|539c720dca8041a08b42e3f8adc71f58|
|
192 |
+
test data synthesis module|fraud detection|The test data synthesis module will be utilized in the use case evaluation for fraud detection, led by BigSpark, to compare old and new systems and ensure successful outcomes.|539c720dca8041a08b42e3f8adc71f58|
|
193 |
+
ml models|existing solutions|In the use case evaluation for fraud detection, led by BigSpark, two ML models will be built and compared to existing solutions for thorough testing and user evaluation.|539c720dca8041a08b42e3f8adc71f58|
|
194 |
+
ml models|platform|The ML models developed in the use case evaluation for fraud detection, led by BigSpark, will showcase our platform.|539c720dca8041a08b42e3f8adc71f58|
|
195 |
+
knowledge integration and explainability module|llm|In the knowledge integration and explainability module, led by City and UoL, we will develop methods for controlling and explaining LLMs and traditional models in a modular framework.|539c720dca8041a08b42e3f8adc71f58|
|
196 |
+
knowledge integration and explainability module|neuro-symbolic learning|We'll also integrate knowledge graphs with neuro-symbolic learning for information retrieval in the knowledge integration and explainability module, led by City and UoL.|539c720dca8041a08b42e3f8adc71f58|
|
197 |
+
knowledge integration and explainability module|feature importance and explainability|In addition, we'll augment feature importance and explainability with LLMs for better interpretation and explanation of AI models in the knowledge integration and explainability module, led by City and UoL.|539c720dca8041a08b42e3f8adc71f58|
|
198 |
+
bigspark|city|BigSpark will lead two work packages: Cost: BigSpark = £ 40,000.00 and WP5 Use case evaluation - Fraud detection, while City and UoL will lead WP3 Knowledge integration and explainability module with a cost of £ 98,000.|539c720dca8041a08b42e3f8adc71f58|
|
199 |
+
bigspark|city|The total project cost is £ 423,000.00, with BigSpark contributing £ 310,000.00 and City and UoL contributing £ 113,000.00.|539c720dca8041a08b42e3f8adc71f58|UoL
|
200 |
+
bigspark|cost|The cost associated with BigSpark is £ 130,000.00 as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
201 |
+
city, uol|cost|The cost associated with City, UoL is £ 15,000.00 as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
202 |
+
bigspark|cost|The total cost for both BigSpark and City, UoL is £ 423,000.00 as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
203 |
+
jira|task management, bug tracking, and project planning|Jira will be used for task management, bug tracking, and project planning as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
204 |
+
github|version control and collaboration|GitHub will be used for version control and collaboration as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
205 |
+
slack|real-time communication|Slack will be used for real-time communication as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
206 |
+
confluence|content creation and sharing|Confluence will be used for content creation and sharing as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
207 |
+
bigspark|overall management|BigSpark's responsibility will be overall management as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
208 |
+
chris finlayson|project delivery leadership and overall responsibility for finances, delivery tracking, and risk management|Chris Finlayson will provide project delivery leadership and overall responsibility for finances, delivery tracking, and risk management as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
209 |
+
hamza niazi|engineering delivery, accountability, and technical leadership|Hamza Niazi will provide engineering delivery, accountability, and technical leadership as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
210 |
+
dr tillman weyde|managed research deliverables and targeted ml development|Dr Tillman Weyde will manage research deliverables and targeted ML development as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
211 |
+
dr chris child|managed research deliverables and targeted ml development|Dr Chris Child will manage research deliverables and targeted ML development as mentioned in the context.|04c04ebf9e9d40509902aa32465a71c6|
|
212 |
+
commercialisation|outputs|The process of converting scientific discoveries or inventions into commercial products or services is known as commercialisation. In this context, the outputs refer to the results or deliverables generated by a project, which can potentially be commercialised.|c2e9dac21ecb4c5ab957b806ca2846d3|
|
213 |
+
management reporting lines|appendix|In this context, 'Appendix' refers to an additional section or part of a document, typically containing supplementary information. The term 'Management Reporting Lines' may refer to the organizational hierarchy for reporting financial and other operational data.|c2e9dac21ecb4c5ab957b806ca2846d3|
|
214 |
+
/application/|form/question/35976/forminput/97945/file/605727/download|This is a URL (Uniform Resource Locator) that leads to a specific document or file. The 'application' part of the URL indicates the type of application required to open the file, such as a PDF viewer for '.pdf' files.|c2e9dac21ecb4c5ab957b806ca2846d3|
|
215 |
+
risks||In this context, 'risks' refers to potential negative impacts or uncertainties that may arise during the course of a project. These risks can be related to various factors such as technical, financial, legal, reputational, etc.|c2e9dac21ecb4c5ab957b806ca2846d3|
|
216 |
+
project management risks|established project management methodologies, prince2, scaled agile|In order to mitigate risks in project management, established methodologies such as PRINCE2 and Scaled Agile are utilized.|852735781f3b4d76b95c5e084c9be979|
|
217 |
+
project management risks|regular communication and collaboration among teams|Effective communication and collaboration among project teams can help mitigate risks in project management.|852735781f3b4d76b95c5e084c9be979|
|
218 |
+
project management risks|well organized and disciplined project board, focusing on well described work packages|A structured project board with clearly defined work packages can help mitigate risks in project management by ensuring that all necessary tasks are identified and executed.|852735781f3b4d76b95c5e084c9be979|
|
219 |
+
project management risks|adequate funding and access to cloud computing infrastructure.|Sufficient funding and access to cloud computing resources are critical inputs for successful project completion.|852735781f3b4d76b95c5e084c9be979|
|
220 |
+
project management risks|in house expertise in ai, including ml engineers and experts in multimodal (llm) learning.|Internal expertise in artificial intelligence, particularly machine learning (ML) and multimodal (LLM) learning, is required to manage project risks associated with these technologies.|852735781f3b4d76b95c5e084c9be979|
|
221 |
+
managing regulatory and ethical requirements|robust model governance to ensure compliance with privacy and evolving regulations.|Effective model governance is necessary to ensure adherence to privacy and regulatory requirements.|852735781f3b4d76b95c5e084c9be979|
|
222 |
+
managing regulatory and ethical requirements|continuous engagement with ai specialised compliance partners to ensure the project meets all compliance standards.|Ongoing collaboration with specialized compliance partners can help ensure that the project complies with all necessary regulatory requirements.|852735781f3b4d76b95c5e084c9be979|
|
223 |
+
managing regulatory and ethical requirements|prioritising transparency in documentation to demonstrate adherence to ethical standards and regulatory requirements.|Transparent documentation is essential for demonstrating adherence to both ethical and regulatory requirements.|852735781f3b4d76b95c5e084c9be979|
|
224 |
+
key risk categories|more technical risks|In the context of the Innovation Funding Service application, it is mentioned that key risk categories have been explored but more technical risks need to be addressed. This indicates a relation between the two terms where 'Key risk categories' are related to 'More technical risks' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
225 |
+
technical risks|stronger mitigations|The text highlights that there are a few technical risks included in the risk register, which require stronger mitigations. This points towards a relation between 'Technical risks' and 'Stronger mitigations' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
226 |
+
risk mitigations|project|The text mentions that risk mitigations need to be explored at this early stage of the project and not be left for the future as part of the project. This indicates a relation between 'Risk mitigations' and 'Project' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
227 |
+
assessor 1|risks|The text states that key risks have been explored by assessor 1. This indicates a relation between 'Assessor 1' and 'Risks' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
228 |
+
assessor 2|risk register|The text mentions that assessor 2 appreciated further information about risk ownership and possible contingencies should mitigation prove unsuccessful. This points towards a relation between 'Assessor 2' and 'Risk register' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
229 |
+
assessor 3|constraints|The text mentions that potential constraints or conditions on the project outputs are not described by assessor 3. This indicates a relation between 'Assessor 3' and 'Constraints' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
230 |
+
risk register|key risks|The text mentions that the risk register provided by the applicants sets out key risks. This points towards a relation between 'Risk Register' and 'Key risks' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
231 |
+
risk register|regulatory risks|The text mentions that risks are categorised as commercial / technical / regulatory / project management or environmental by the risk register. This indicates a relation between 'Risk Register' and 'Regulatory risks' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
232 |
+
risks|residual risk|The text mentions that the risk analysis also considers residual risk after mitigation. This points towards a relation between 'Risks' and 'Residual risk' in the given context.|ab999991d6da4642b42d592dfd2418e6|
|
233 |
+
innovate uk - risk register v01.pdf|assessor feedback|The assessor has identified risks associated with the concept and provided feedback on them, which is documented in the risk register submitted as a PDF appendix. This document serves as a guide for managing and monitoring risks throughout the project lifecycle.|b62376b01dbb4acb801848584caeb840|
|
234 |
+
assessor feedback|risks are too great for a concept that is too early in stage for funding request|The assessor's feedback indicates that the identified risks related to this concept outweigh its potential benefits, making it too risky for funding at this stage.|b62376b01dbb4acb801848584caeb840|
|
235 |
+
assessor feedback|risk register: in addition to above|The assessor's feedback mentions the existence of a risk register that expands upon the risks associated with the concept, as well as other project risks.|b62376b01dbb4acb801848584caeb840|
|
236 |
+
ai project|credibility and viability|A government grant will serve as a stamp of credibility and viability, making the product more attractive to private investors and potentially for accreditation by public regulator bodies (e.g. FCA)|c49b4e247a5e4942a893517a348831da|
|
237 |
+
ai project|reduced risk|Public funding minimises financial risks, allowing us to focus on the research and development aspects, driving innovation without the constant pressure of immediate profitability.|c49b4e247a5e4942a893517a348831da|
|
238 |
+
ai project|quick commercialisation|Financial support will expedite the development process, enabling quicker commercialisation and market penetration.|c49b4e247a5e4942a893517a348831da|
|
239 |
+
involved organisations|enhances reputation and credibility|The impact of project outcomes on the involved organisations is expected to be considerable: Enhances the reputation and credibility of the involved organisations, positioning them as leaders in AI innovation for financial institutions.|c49b4e247a5e4942a893517a348831da|
|
240 |
+
involved organisations|drives internal growth|Drives internal growth by creating opportunities for expansion and hiring,|c49b4e247a5e4942a893517a348831da|
|
241 |
+
public funding|innovate uk|The proposal outlines the potential beneficial impact that the injection of public funding via Innovate UK could have for the applicants' R&D intensity and product development.|633d2f8162fd4bd29de755deeca8e648|
|
242 |
+
public funding|conventional funders|It is unclear whether conventional funders have been engaged with prior to the Innovate UK application.|633d2f8162fd4bd29de755deeca8e648|
|
243 |
+
public funding|slowed progress|Without public funding, the project would face: Slowed progress due to limited financial resources|633d2f8162fd4bd29de755deeca8e648|
|
244 |
+
public funding|deficit of academic grade research|Without public funding, the project would face: Deficit of academic grade research, which would put the technical quality of the product at risk of missing its objectives|633d2f8162fd4bd29de755deeca8e648|
|
245 |
+
public funding|increased financial risk|Without public funding, the project would face: Increased financial risk leading to potential hesitancy in making crucial investment decisions|633d2f8162fd4bd29de755deeca8e648|
|
246 |
+
collaboration|grant|It remains unclear whether the collaboration would still take place without the grant.|633d2f8162fd4bd29de755deeca8e648|
|
247 |
+
product at risk of missing its objectives|increased financial risk leading to potential hesitancy in making crucial investment decisions|Increased financial risk can lead to potential hesitancy in making crucial investment decisions which can further result in a product missing its objectives.|443951994aae4f29bdd1f3f76023f61e|
|
248 |
+
product at risk of missing its objectives|delayed entry to the market, reducing competitive edge and potential market share|A delayed entry to the market can result in a reduced competitive edge and potential loss of market share, both of which contribute to a product being at risk of missing its objectives.|443951994aae4f29bdd1f3f76023f61e|
|
249 |
+
increased financial risk leading to potential hesitancy in making crucial investment decisions|delayed entry to the market, reducing competitive edge and potential market share|Increased financial risks can also lead to delayed entries into the market which further contributes to a reduced competitive edge and potential loss of market share.|443951994aae4f29bdd1f3f76023f61e|
|
250 |
+
r&d activities|public funding|Public funding enables the allocation of more resources towards research and development tasks which positively impacts R&D activities for all organisations involved.|443951994aae4f29bdd1f3f76023f61e|
|
251 |
+
cutting-edge ai technologies and methodologies|public funding|Public funding also enables the exploration of cutting-edge AI technologies and methodologies in R&D activities for all organisations involved.|443951994aae4f29bdd1f3f76023f61e|
|
252 |
+
r&d activities|comprehensive testing and refinement processes|The positive impact of public funding on R&D activities also facilitates comprehensive testing and refiinement processes to ensure the development of superior fraud and financial crime solutions for financial institutions.|443951994aae4f29bdd1f3f76023f61e|
|
253 |
+
flexible modular platform|large language models|The development of a flexible modular platform that supports large language models is a major effort.|e7434ea7a6d94b26b6f19297b820294f|
|
254 |
+
flexible modular platform|knowledge-integration|The development of a flexible modular platform that supports large language models and other new AI developments, such as knowledge-integration, in an explainable way is a major effort.|e7434ea7a6d94b26b6f19297b820294f|
|
255 |
+
flexible modular platform|compliance with regulation|The development of a flexible modular platform that supports large language models and other new AI developments, such as knowledge-integration, in an explainable way and supports compliance with regulation is a major effort.|e7434ea7a6d94b26b6f19297b820294f|
|
256 |
+
team|flexible modular platform|We provide value for money by building on an existing base with a team that can deliver these requirements to a high standard for the development of a flexible modular platform.|e7434ea7a6d94b26b6f19297b820294f|
|
257 |
+
previous experience|team|The cost is for a team that can deliver these requirements to a high standard, as we provide value for money by building on an existing base with a team that has previous experience in building similar solutions.|e7434ea7a6d94b26b6f19297b820294f|
|
258 |
+
standard|cost|The cost is for a team that can deliver these requirements to a high standard, as we provide value for money by building on an existing base with a team that has previous experience in building similar solutions. The cost represents value for money for the taxpayer and the team, as it aligns with a high standard.|e7434ea7a6d94b26b6f19297b820294f|
|
259 |
+
value for money|team|How much will the project cost and how does it represent value for money for the team and the taxpayer?|e7434ea7a6d94b26b6f19297b820294f|
|
260 |
+
value for money|costs|The cost is for a team that can deliver these requirements to a high standard, as we provide value for money by building on an existing base with a team that has previous experience in building similar solutions. The cost represents value for money for the taxpayer and the team, as it aligns with a high standard.|e7434ea7a6d94b26b6f19297b820294f|
|
261 |
+
similar solutions|software engineering and machine learning development|BigSpark's expertise lies in software engineering and Machine Learning development, and they have experience in building similar solutions.|75c7dd4a4add46f0b0a720585ecce2e6|
|
262 |
+
high standard|resource forecast in the budget|The cost of the project is based on a team that can deliver these requirements to a high standard. The resource forecast in the budget will determine how much funding each organization receives.|75c7dd4a4add46f0b0a720585ecce2e6|
|
263 |
+
joint project|strength in research|City, University of London's strength in research will be leveraged in this joint project with BigSpark.|75c7dd4a4add46f0b0a720585ecce2e6|
|
264 |
+
estimated cost|grant that covers 70% of their project costs|The total cost for the joint project between City and BigSpark is estimated to be £443,755. BigSpark is requesting a grant that covers 70% of their project costs.|75c7dd4a4add46f0b0a720585ecce2e6|
|
265 |
+
resource forecast|split according to resource forecast in the budget|The funding for this joint project will be split according to the resource forecast in the budget and as illustrated in this application.|75c7dd4a4add46f0b0a720585ecce2e6|
|
266 |
+
integration|commercialisation|process of bringing a product or service from the development stage to the point where it is available for sale in the market. This project will cover costs related to both integration and commercialisation, including development staff, computational hardware, software licences, and operational expenses/overheads.|0dffc0c7e83b4cac86c75f8a9024a89f|
|
267 |
+
financial resources|human resources|each partner will invest both financial and human resources into the project in alignment with their areas of expertise and capability.|0dffc0c7e83b4cac86c75f8a9024a89f|
|
268 |
+
grant amount|project costs for bigspark |the grant amount will finance a large majority of the project costs for Bigspark , allowing us to focus our resources on development, testing, and deployment without financial strain.|0dffc0c7e83b4cac86c75f8a9024a89f|
|
269 |
+
investment portion|retained capital|the investment portion will come from retained capital.|0dffc0c7e83b4cac86c75f8a9024a89f|
|
270 |
+
ai consulting and development services|market average|BigSpark's billable rate for AI consulting and development services is below the market average (Consulting UK 2023).|0dffc0c7e83b4cac86c75f8a9024a89f|
|
271 |
+
strategically focused on long-term growth and innovation|alternative spending options|compared to alternative spending options, this investment is strategically focused on long-term growth and innovation, providing more substantial and enduring benefits for financial institutions.|0dffc0c7e83b4cac86c75f8a9024a89f|
|
272 |
+
309,684|funding level|This summary includes the total costs of all project partners, which is equivalent to £309,684. The funding level refers to the amount allocated for this project.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
273 |
+
70.00|funding sought|The organization is seeking a funding level of 70.00% for this project, which amounts to £216,779.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
274 |
+
216,779|funding sought|This is the amount the organization is seeking for this project through Innovation Funding Service. It's a part of the total funding requested.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
275 |
+
92,905|contribution to project|The organization is contributing £92,905 to this project. This amount includes the costs incurred by other public sector funding.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
276 |
+
other costs budget|lead applicant|The lead applicant has included a substantial sum in the Other Costs budget to cover 'lost billing days'. This information is not explained or justified in the Q11 response.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
277 |
+
bigsp ark limited|lead organisation|City University of London has partnered with BIGSP ARK LIMITED for this project. However, further details about the partnership are not provided.|65dbe322fd7f48d6b2f91f9cd80f50f4|
|
278 |
+
innovate uk - subsidy control|city|When applying for innovation funding through the Innovation Funding Service, the grant agreement includes subsidy control provisions that align with the City's subsidy control framework.|d1f621c5f5784e96b853a7df1b6cff6b|
|
279 |
+
innovate uk - subsidy control|university of london|As a recipient of innovation funding from Innovate UK, the University of London is subject to subsidy control provisions as outlined in Innovate UK's subsidy control framework.|d1f621c5f5784e96b853a7df1b6cff6b|
|
280 |
+
digital technologies|financial services|The application aims to advance the uptake of digital technologies in financial services.|0b9a0a5a854d48538d95f3bc7444a3c0|
|
281 |
+
project costs|organisation|The projects costs seem quite high and how the organisation will finance its contribution is unclear.|0b9a0a5a854d48538d95f3bc7444a3c0|
|
282 |
+
assessor 4|model|The model needs market validation and assumption testing to remove risks that are currently concerning in a high risk area of R&D for the funding requested.|0b9a0a5a854d48538d95f3bc7444a3c0|
|
283 |
+
assessor 5|application|The application is in scope and clearly aims to advance the uptake of digital technologies in financial services. While the project team have good technological credentials, expertise on the application (fraud detection) and a|0b9a0a5a854d48538d95f3bc7444a3c0|
|
284 |
+
print application|innovation funding service|The URL provided, 'https://apply-for-innovation-funding.service.gov.uk/application/10099028/print', is associated with the Innovation Funding Service, which allows users to print their application. This implies that the service provides a feature for printing applications, and the context suggests that this functionality is relevant to the specific application being discussed.|c1b9c7178bdb4c38bd779c1a452df28d|
|
285 |
+
clear route to market|innovation funding service|The text mentions that '31/31clear route to market are missing', which suggests that this aspect is not present in the Innovation Funding Service. This implies a lack of clarity regarding the pathway for bringing the project or product to the end-users, which may hinder its success.|c1b9c7178bdb4c38bd779c1a452df28d|
|
286 |
+
project|what exactly the project will deliver|The text mentions that it remains 'unclear what exactly the project will deliver', indicating a lack of clarity regarding the outcome or output of the project.|c1b9c7178bdb4c38bd779c1a452df28d|
|
287 |
+
added value|project|The assessment of 'added value' for the project is uncertain due to the overall lack of clarity regarding its deliverables.|c1b9c7178bdb4c38bd779c1a452df28d|
|
288 |
+
value for money|project|Similarly, it is unclear whether the project represents 'value for money', as the lack of clarity regarding its deliverables makes it difficult to evaluate its financial worth.|c1b9c7178bdb4c38bd779c1a452df28d|
|
docs/index.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
helpers/__init__
ADDED
File without changes
|
helpers/__pycache__/df_helpers.cpython-311.pyc
ADDED
Binary file (4.21 kB). View file
|
|
helpers/__pycache__/prompts.cpython-311.pyc
ADDED
Binary file (3.97 kB). View file
|
|
helpers/df_helpers.py
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import uuid
|
2 |
+
import pandas as pd
|
3 |
+
import numpy as np
|
4 |
+
from .prompts import extractConcepts
|
5 |
+
from .prompts import graphPrompt
|
6 |
+
|
7 |
+
|
8 |
+
def documents2Dataframe(documents) -> pd.DataFrame:
|
9 |
+
rows = []
|
10 |
+
for chunk in documents:
|
11 |
+
row = {
|
12 |
+
"text": chunk.page_content,
|
13 |
+
**chunk.metadata,
|
14 |
+
"chunk_id": uuid.uuid4().hex,
|
15 |
+
}
|
16 |
+
rows = rows + [row]
|
17 |
+
|
18 |
+
df = pd.DataFrame(rows)
|
19 |
+
return df
|
20 |
+
|
21 |
+
|
22 |
+
def df2ConceptsList(dataframe: pd.DataFrame) -> list:
|
23 |
+
# dataframe.reset_index(inplace=True)
|
24 |
+
results = dataframe.apply(
|
25 |
+
lambda row: extractConcepts(
|
26 |
+
row.text, {"chunk_id": row.chunk_id, "type": "concept"}
|
27 |
+
),
|
28 |
+
axis=1,
|
29 |
+
)
|
30 |
+
# invalid json results in NaN
|
31 |
+
results = results.dropna()
|
32 |
+
results = results.reset_index(drop=True)
|
33 |
+
|
34 |
+
## Flatten the list of lists to one single list of entities.
|
35 |
+
concept_list = np.concatenate(results).ravel().tolist()
|
36 |
+
return concept_list
|
37 |
+
|
38 |
+
|
39 |
+
def concepts2Df(concepts_list) -> pd.DataFrame:
|
40 |
+
## Remove all NaN entities
|
41 |
+
concepts_dataframe = pd.DataFrame(concepts_list).replace(" ", np.nan)
|
42 |
+
concepts_dataframe = concepts_dataframe.dropna(subset=["entity"])
|
43 |
+
concepts_dataframe["entity"] = concepts_dataframe["entity"].apply(
|
44 |
+
lambda x: x.lower()
|
45 |
+
)
|
46 |
+
|
47 |
+
return concepts_dataframe
|
48 |
+
|
49 |
+
|
50 |
+
def df2Graph(dataframe: pd.DataFrame, model=None) -> list:
|
51 |
+
# dataframe.reset_index(inplace=True)
|
52 |
+
results = dataframe.apply(
|
53 |
+
lambda row: graphPrompt(row.text, {"chunk_id": row.chunk_id}, model), axis=1
|
54 |
+
)
|
55 |
+
# invalid json results in NaN
|
56 |
+
results = results.dropna()
|
57 |
+
results = results.reset_index(drop=True)
|
58 |
+
|
59 |
+
## Flatten the list of lists to one single list of entities.
|
60 |
+
concept_list = np.concatenate(results).ravel().tolist()
|
61 |
+
return concept_list
|
62 |
+
|
63 |
+
|
64 |
+
def graph2Df(nodes_list) -> pd.DataFrame:
|
65 |
+
## Remove all NaN entities
|
66 |
+
graph_dataframe = pd.DataFrame(nodes_list).replace(" ", np.nan)
|
67 |
+
graph_dataframe = graph_dataframe.dropna(subset=["node_1", "node_2"])
|
68 |
+
graph_dataframe["node_1"] = graph_dataframe["node_1"].apply(lambda x: x.lower())
|
69 |
+
graph_dataframe["node_2"] = graph_dataframe["node_2"].apply(lambda x: x.lower())
|
70 |
+
|
71 |
+
return graph_dataframe
|
helpers/prompts.py
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
from yachalk import chalk
|
3 |
+
sys.path.append("..")
|
4 |
+
|
5 |
+
import json
|
6 |
+
import ollama.client as client
|
7 |
+
|
8 |
+
|
9 |
+
def extractConcepts(prompt: str, metadata={}, model="mistral-openorca:latest"):
|
10 |
+
SYS_PROMPT = (
|
11 |
+
"Your task is extract the key concepts (and non personal entities) mentioned in the given context. "
|
12 |
+
"Extract only the most important and atomistic concepts, if needed break the concepts down to the simpler concepts."
|
13 |
+
"Categorize the concepts in one of the following categories: "
|
14 |
+
"[event, concept, place, object, document, organisation, condition, misc]\n"
|
15 |
+
"Format your output as a list of json with the following format:\n"
|
16 |
+
"[\n"
|
17 |
+
" {\n"
|
18 |
+
' "entity": The Concept,\n'
|
19 |
+
' "importance": The concontextual importance of the concept on a scale of 1 to 5 (5 being the highest),\n'
|
20 |
+
' "category": The Type of Concept,\n'
|
21 |
+
" }, \n"
|
22 |
+
"{ }, \n"
|
23 |
+
"]\n"
|
24 |
+
)
|
25 |
+
response, _ = client.generate(model_name=model, system=SYS_PROMPT, prompt=prompt)
|
26 |
+
try:
|
27 |
+
result = json.loads(response)
|
28 |
+
result = [dict(item, **metadata) for item in result]
|
29 |
+
except:
|
30 |
+
print("\n\nERROR ### Here is the buggy response: ", response, "\n\n")
|
31 |
+
result = None
|
32 |
+
return result
|
33 |
+
|
34 |
+
|
35 |
+
def graphPrompt(input: str, metadata={}, model="mistral-openorca:latest"):
|
36 |
+
if model == None:
|
37 |
+
model = "mistral-openorca:latest"
|
38 |
+
|
39 |
+
# model_info = client.show(model_name=model)
|
40 |
+
# print( chalk.blue(model_info))
|
41 |
+
|
42 |
+
SYS_PROMPT = (
|
43 |
+
"You are a network graph maker who extracts terms and their relations from a given context. "
|
44 |
+
"You are provided with a context chunk (delimited by ```) Your task is to extract the ontology "
|
45 |
+
"of terms mentioned in the given context. These terms should represent the key concepts as per the context. \n"
|
46 |
+
"Thought 1: While traversing through each sentence, Think about the key terms mentioned in it.\n"
|
47 |
+
"\tTerms may include object, entity, location, organization, person, \n"
|
48 |
+
"\tcondition, acronym, documents, service, concept, etc.\n"
|
49 |
+
"\tTerms should be as atomistic as possible\n\n"
|
50 |
+
"Thought 2: Think about how these terms can have one on one relation with other terms.\n"
|
51 |
+
"\tTerms that are mentioned in the same sentence or the same paragraph are typically related to each other.\n"
|
52 |
+
"\tTerms can be related to many other terms\n\n"
|
53 |
+
"Thought 3: Find out the relation between each such related pair of terms. \n\n"
|
54 |
+
"Format your output as a list of json. Each element of the list contains a pair of terms"
|
55 |
+
"and the relation between them, like the follwing: \n"
|
56 |
+
"[\n"
|
57 |
+
" {\n"
|
58 |
+
' "node_1": "A concept from extracted ontology",\n'
|
59 |
+
' "node_2": "A related concept from extracted ontology",\n'
|
60 |
+
' "edge": "relationship between the two concepts, node_1 and node_2 in one or two sentences"\n'
|
61 |
+
" }, {...}\n"
|
62 |
+
"]"
|
63 |
+
)
|
64 |
+
|
65 |
+
USER_PROMPT = f"context: ```{input}``` \n\n output: "
|
66 |
+
response, _ = client.generate(model_name=model, system=SYS_PROMPT, prompt=USER_PROMPT)
|
67 |
+
try:
|
68 |
+
result = json.loads(response)
|
69 |
+
result = [dict(item, **metadata) for item in result]
|
70 |
+
except:
|
71 |
+
print("\n\nERROR ### Here is the buggy response: ", response, "\n\n")
|
72 |
+
result = None
|
73 |
+
return result
|
lib/bindings/utils.js
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function neighbourhoodHighlight(params) {
|
2 |
+
// console.log("in nieghbourhoodhighlight");
|
3 |
+
allNodes = nodes.get({ returnType: "Object" });
|
4 |
+
// originalNodes = JSON.parse(JSON.stringify(allNodes));
|
5 |
+
// if something is selected:
|
6 |
+
if (params.nodes.length > 0) {
|
7 |
+
highlightActive = true;
|
8 |
+
var i, j;
|
9 |
+
var selectedNode = params.nodes[0];
|
10 |
+
var degrees = 2;
|
11 |
+
|
12 |
+
// mark all nodes as hard to read.
|
13 |
+
for (let nodeId in allNodes) {
|
14 |
+
// nodeColors[nodeId] = allNodes[nodeId].color;
|
15 |
+
allNodes[nodeId].color = "rgba(200,200,200,0.5)";
|
16 |
+
if (allNodes[nodeId].hiddenLabel === undefined) {
|
17 |
+
allNodes[nodeId].hiddenLabel = allNodes[nodeId].label;
|
18 |
+
allNodes[nodeId].label = undefined;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
var connectedNodes = network.getConnectedNodes(selectedNode);
|
22 |
+
var allConnectedNodes = [];
|
23 |
+
|
24 |
+
// get the second degree nodes
|
25 |
+
for (i = 1; i < degrees; i++) {
|
26 |
+
for (j = 0; j < connectedNodes.length; j++) {
|
27 |
+
allConnectedNodes = allConnectedNodes.concat(
|
28 |
+
network.getConnectedNodes(connectedNodes[j])
|
29 |
+
);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
// all second degree nodes get a different color and their label back
|
34 |
+
for (i = 0; i < allConnectedNodes.length; i++) {
|
35 |
+
// allNodes[allConnectedNodes[i]].color = "pink";
|
36 |
+
allNodes[allConnectedNodes[i]].color = "rgba(150,150,150,0.75)";
|
37 |
+
if (allNodes[allConnectedNodes[i]].hiddenLabel !== undefined) {
|
38 |
+
allNodes[allConnectedNodes[i]].label =
|
39 |
+
allNodes[allConnectedNodes[i]].hiddenLabel;
|
40 |
+
allNodes[allConnectedNodes[i]].hiddenLabel = undefined;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// all first degree nodes get their own color and their label back
|
45 |
+
for (i = 0; i < connectedNodes.length; i++) {
|
46 |
+
// allNodes[connectedNodes[i]].color = undefined;
|
47 |
+
allNodes[connectedNodes[i]].color = nodeColors[connectedNodes[i]];
|
48 |
+
if (allNodes[connectedNodes[i]].hiddenLabel !== undefined) {
|
49 |
+
allNodes[connectedNodes[i]].label =
|
50 |
+
allNodes[connectedNodes[i]].hiddenLabel;
|
51 |
+
allNodes[connectedNodes[i]].hiddenLabel = undefined;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
// the main node gets its own color and its label back.
|
56 |
+
// allNodes[selectedNode].color = undefined;
|
57 |
+
allNodes[selectedNode].color = nodeColors[selectedNode];
|
58 |
+
if (allNodes[selectedNode].hiddenLabel !== undefined) {
|
59 |
+
allNodes[selectedNode].label = allNodes[selectedNode].hiddenLabel;
|
60 |
+
allNodes[selectedNode].hiddenLabel = undefined;
|
61 |
+
}
|
62 |
+
} else if (highlightActive === true) {
|
63 |
+
// console.log("highlightActive was true");
|
64 |
+
// reset all nodes
|
65 |
+
for (let nodeId in allNodes) {
|
66 |
+
// allNodes[nodeId].color = "purple";
|
67 |
+
allNodes[nodeId].color = nodeColors[nodeId];
|
68 |
+
// delete allNodes[nodeId].color;
|
69 |
+
if (allNodes[nodeId].hiddenLabel !== undefined) {
|
70 |
+
allNodes[nodeId].label = allNodes[nodeId].hiddenLabel;
|
71 |
+
allNodes[nodeId].hiddenLabel = undefined;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
highlightActive = false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// transform the object into an array
|
78 |
+
var updateArray = [];
|
79 |
+
if (params.nodes.length > 0) {
|
80 |
+
for (let nodeId in allNodes) {
|
81 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
82 |
+
// console.log(allNodes[nodeId]);
|
83 |
+
updateArray.push(allNodes[nodeId]);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
nodes.update(updateArray);
|
87 |
+
} else {
|
88 |
+
// console.log("Nothing was selected");
|
89 |
+
for (let nodeId in allNodes) {
|
90 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
91 |
+
// console.log(allNodes[nodeId]);
|
92 |
+
// allNodes[nodeId].color = {};
|
93 |
+
updateArray.push(allNodes[nodeId]);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
nodes.update(updateArray);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
function filterHighlight(params) {
|
101 |
+
allNodes = nodes.get({ returnType: "Object" });
|
102 |
+
// if something is selected:
|
103 |
+
if (params.nodes.length > 0) {
|
104 |
+
filterActive = true;
|
105 |
+
let selectedNodes = params.nodes;
|
106 |
+
|
107 |
+
// hiding all nodes and saving the label
|
108 |
+
for (let nodeId in allNodes) {
|
109 |
+
allNodes[nodeId].hidden = true;
|
110 |
+
if (allNodes[nodeId].savedLabel === undefined) {
|
111 |
+
allNodes[nodeId].savedLabel = allNodes[nodeId].label;
|
112 |
+
allNodes[nodeId].label = undefined;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
for (let i=0; i < selectedNodes.length; i++) {
|
117 |
+
allNodes[selectedNodes[i]].hidden = false;
|
118 |
+
if (allNodes[selectedNodes[i]].savedLabel !== undefined) {
|
119 |
+
allNodes[selectedNodes[i]].label = allNodes[selectedNodes[i]].savedLabel;
|
120 |
+
allNodes[selectedNodes[i]].savedLabel = undefined;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
} else if (filterActive === true) {
|
125 |
+
// reset all nodes
|
126 |
+
for (let nodeId in allNodes) {
|
127 |
+
allNodes[nodeId].hidden = false;
|
128 |
+
if (allNodes[nodeId].savedLabel !== undefined) {
|
129 |
+
allNodes[nodeId].label = allNodes[nodeId].savedLabel;
|
130 |
+
allNodes[nodeId].savedLabel = undefined;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
filterActive = false;
|
134 |
+
}
|
135 |
+
|
136 |
+
// transform the object into an array
|
137 |
+
var updateArray = [];
|
138 |
+
if (params.nodes.length > 0) {
|
139 |
+
for (let nodeId in allNodes) {
|
140 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
141 |
+
updateArray.push(allNodes[nodeId]);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
nodes.update(updateArray);
|
145 |
+
} else {
|
146 |
+
for (let nodeId in allNodes) {
|
147 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
148 |
+
updateArray.push(allNodes[nodeId]);
|
149 |
+
}
|
150 |
+
}
|
151 |
+
nodes.update(updateArray);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
function selectNode(nodes) {
|
156 |
+
network.selectNodes(nodes);
|
157 |
+
neighbourhoodHighlight({ nodes: nodes });
|
158 |
+
return nodes;
|
159 |
+
}
|
160 |
+
|
161 |
+
function selectNodes(nodes) {
|
162 |
+
network.selectNodes(nodes);
|
163 |
+
filterHighlight({nodes: nodes});
|
164 |
+
return nodes;
|
165 |
+
}
|
166 |
+
|
167 |
+
function highlightFilter(filter) {
|
168 |
+
let selectedNodes = []
|
169 |
+
let selectedProp = filter['property']
|
170 |
+
if (filter['item'] === 'node') {
|
171 |
+
let allNodes = nodes.get({ returnType: "Object" });
|
172 |
+
for (let nodeId in allNodes) {
|
173 |
+
if (allNodes[nodeId][selectedProp] && filter['value'].includes((allNodes[nodeId][selectedProp]).toString())) {
|
174 |
+
selectedNodes.push(nodeId)
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
else if (filter['item'] === 'edge'){
|
179 |
+
let allEdges = edges.get({returnType: 'object'});
|
180 |
+
// check if the selected property exists for selected edge and select the nodes connected to the edge
|
181 |
+
for (let edge in allEdges) {
|
182 |
+
if (allEdges[edge][selectedProp] && filter['value'].includes((allEdges[edge][selectedProp]).toString())) {
|
183 |
+
selectedNodes.push(allEdges[edge]['from'])
|
184 |
+
selectedNodes.push(allEdges[edge]['to'])
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
selectNodes(selectedNodes)
|
189 |
+
}
|
lib/tom-select/tom-select.complete.min.js
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Tom Select v2.0.0-rc.4
|
3 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
*/
|
5 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TomSelect=t()}(this,(function(){"use strict"
|
6 |
+
function e(e,t){e.split(/\s+/).forEach((e=>{t(e)}))}class t{constructor(){this._events={}}on(t,i){e(t,(e=>{this._events[e]=this._events[e]||[],this._events[e].push(i)}))}off(t,i){var s=arguments.length
|
7 |
+
0!==s?e(t,(e=>{if(1===s)return delete this._events[e]
|
8 |
+
e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(i),1)})):this._events={}}trigger(t,...i){var s=this
|
9 |
+
e(t,(e=>{if(e in s._events!=!1)for(let t of s._events[e])t.apply(s,i)}))}}var i
|
10 |
+
const s="[̀-ͯ·ʾ]",n=new RegExp(s,"g")
|
11 |
+
var o
|
12 |
+
const r={"æ":"ae","ⱥ":"a","ø":"o"},l=new RegExp(Object.keys(r).join("|"),"g"),a=[[67,67],[160,160],[192,438],[452,652],[961,961],[1019,1019],[1083,1083],[1281,1289],[1984,1984],[5095,5095],[7429,7441],[7545,7549],[7680,7935],[8580,8580],[9398,9449],[11360,11391],[42792,42793],[42802,42851],[42873,42897],[42912,42922],[64256,64260],[65313,65338],[65345,65370]],c=e=>e.normalize("NFKD").replace(n,"").toLowerCase().replace(l,(function(e){return r[e]})),d=(e,t="|")=>{if(1==e.length)return e[0]
|
13 |
+
var i=1
|
14 |
+
return e.forEach((e=>{i=Math.max(i,e.length)})),1==i?"["+e.join("")+"]":"(?:"+e.join(t)+")"},p=e=>{if(1===e.length)return[[e]]
|
15 |
+
var t=[]
|
16 |
+
return p(e.substring(1)).forEach((function(i){var s=i.slice(0)
|
17 |
+
s[0]=e.charAt(0)+s[0],t.push(s),(s=i.slice(0)).unshift(e.charAt(0)),t.push(s)})),t},u=e=>{void 0===o&&(o=(()=>{var e={}
|
18 |
+
a.forEach((t=>{for(let s=t[0];s<=t[1];s++){let t=String.fromCharCode(s),n=c(t)
|
19 |
+
if(n!=t.toLowerCase()){n in e||(e[n]=[n])
|
20 |
+
var i=new RegExp(d(e[n]),"iu")
|
21 |
+
t.match(i)||e[n].push(t)}}}))
|
22 |
+
var t=Object.keys(e)
|
23 |
+
t=t.sort(((e,t)=>t.length-e.length)),i=new RegExp("("+d(t)+"[̀-ͯ·ʾ]*)","g")
|
24 |
+
var s={}
|
25 |
+
return t.sort(((e,t)=>e.length-t.length)).forEach((t=>{var i=p(t).map((t=>(t=t.map((t=>e.hasOwnProperty(t)?d(e[t]):t)),d(t,""))))
|
26 |
+
s[t]=d(i)})),s})())
|
27 |
+
return e.normalize("NFKD").toLowerCase().split(i).map((e=>{if(""==e)return""
|
28 |
+
const t=c(e)
|
29 |
+
if(o.hasOwnProperty(t))return o[t]
|
30 |
+
const i=e.normalize("NFC")
|
31 |
+
return i!=e?d([e,i]):e})).join("")},h=(e,t)=>{if(e)return e[t]},g=(e,t)=>{if(e){for(var i,s=t.split(".");(i=s.shift())&&(e=e[i]););return e}},f=(e,t,i)=>{var s,n
|
32 |
+
return e?-1===(n=(e+="").search(t.regex))?0:(s=t.string.length/e.length,0===n&&(s+=.5),s*i):0},v=e=>(e+"").replace(/([\$\(-\+\.\?\[-\^\{-\}])/g,"\\$1"),m=(e,t)=>{var i=e[t]
|
33 |
+
if("function"==typeof i)return i
|
34 |
+
i&&!Array.isArray(i)&&(e[t]=[i])},y=(e,t)=>{if(Array.isArray(e))e.forEach(t)
|
35 |
+
else for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},O=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=c(e+"").toLowerCase())>(t=c(t+"").toLowerCase())?1:t>e?-1:0
|
36 |
+
class b{constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,i){if(!e||!e.length)return[]
|
37 |
+
const s=[],n=e.split(/\s+/)
|
38 |
+
var o
|
39 |
+
return i&&(o=new RegExp("^("+Object.keys(i).map(v).join("|")+"):(.*)$")),n.forEach((e=>{let i,n=null,r=null
|
40 |
+
o&&(i=e.match(o))&&(n=i[1],e=i[2]),e.length>0&&(r=v(e),this.settings.diacritics&&(r=u(r)),t&&(r="\\b"+r)),s.push({string:e,regex:r?new RegExp(r,"iu"):null,field:n})})),s}getScoreFunction(e,t){var i=this.prepareSearch(e,t)
|
41 |
+
return this._getScoreFunction(i)}_getScoreFunction(e){const t=e.tokens,i=t.length
|
42 |
+
if(!i)return function(){return 0}
|
43 |
+
const s=e.options.fields,n=e.weights,o=s.length,r=e.getAttrFn
|
44 |
+
if(!o)return function(){return 1}
|
45 |
+
const l=1===o?function(e,t){const i=s[0].field
|
46 |
+
return f(r(t,i),e,n[i])}:function(e,t){var i=0
|
47 |
+
if(e.field){const s=r(t,e.field)
|
48 |
+
!e.regex&&s?i+=1/o:i+=f(s,e,1)}else y(n,((s,n)=>{i+=f(r(t,n),e,s)}))
|
49 |
+
return i/o}
|
50 |
+
return 1===i?function(e){return l(t[0],e)}:"and"===e.options.conjunction?function(e){for(var s,n=0,o=0;n<i;n++){if((s=l(t[n],e))<=0)return 0
|
51 |
+
o+=s}return o/i}:function(e){var s=0
|
52 |
+
return y(t,(t=>{s+=l(t,e)})),s/i}}getSortFunction(e,t){var i=this.prepareSearch(e,t)
|
53 |
+
return this._getSortFunction(i)}_getSortFunction(e){var t,i,s
|
54 |
+
const n=this,o=e.options,r=!e.query&&o.sort_empty?o.sort_empty:o.sort,l=[],a=[]
|
55 |
+
if("function"==typeof r)return r.bind(this)
|
56 |
+
const c=function(t,i){return"$score"===t?i.score:e.getAttrFn(n.items[i.id],t)}
|
57 |
+
if(r)for(t=0,i=r.length;t<i;t++)(e.query||"$score"!==r[t].field)&&l.push(r[t])
|
58 |
+
if(e.query){for(s=!0,t=0,i=l.length;t<i;t++)if("$score"===l[t].field){s=!1
|
59 |
+
break}s&&l.unshift({field:"$score",direction:"desc"})}else for(t=0,i=l.length;t<i;t++)if("$score"===l[t].field){l.splice(t,1)
|
60 |
+
break}for(t=0,i=l.length;t<i;t++)a.push("desc"===l[t].direction?-1:1)
|
61 |
+
const d=l.length
|
62 |
+
if(d){if(1===d){const e=l[0].field,t=a[0]
|
63 |
+
return function(i,s){return t*O(c(e,i),c(e,s))}}return function(e,t){var i,s,n
|
64 |
+
for(i=0;i<d;i++)if(n=l[i].field,s=a[i]*O(c(n,e),c(n,t)))return s
|
65 |
+
return 0}}return null}prepareSearch(e,t){const i={}
|
66 |
+
var s=Object.assign({},t)
|
67 |
+
if(m(s,"sort"),m(s,"sort_empty"),s.fields){m(s,"fields")
|
68 |
+
const e=[]
|
69 |
+
s.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),i[t.field]="weight"in t?t.weight:1})),s.fields=e}return{options:s,query:e.toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:s.nesting?g:h}}search(e,t){var i,s,n=this
|
70 |
+
s=this.prepareSearch(e,t),t=s.options,e=s.query
|
71 |
+
const o=t.score||n._getScoreFunction(s)
|
72 |
+
e.length?y(n.items,((e,n)=>{i=o(e),(!1===t.filter||i>0)&&s.items.push({score:i,id:n})})):y(n.items,((e,t)=>{s.items.push({score:1,id:t})}))
|
73 |
+
const r=n._getSortFunction(s)
|
74 |
+
return r&&s.items.sort(r),s.total=s.items.length,"number"==typeof t.limit&&(s.items=s.items.slice(0,t.limit)),s}}const w=e=>{if(e.jquery)return e[0]
|
75 |
+
if(e instanceof HTMLElement)return e
|
76 |
+
if(e.indexOf("<")>-1){let t=document.createElement("div")
|
77 |
+
return t.innerHTML=e.trim(),t.firstChild}return document.querySelector(e)},_=(e,t)=>{var i=document.createEvent("HTMLEvents")
|
78 |
+
i.initEvent(t,!0,!1),e.dispatchEvent(i)},I=(e,t)=>{Object.assign(e.style,t)},C=(e,...t)=>{var i=A(t);(e=x(e)).map((e=>{i.map((t=>{e.classList.add(t)}))}))},S=(e,...t)=>{var i=A(t);(e=x(e)).map((e=>{i.map((t=>{e.classList.remove(t)}))}))},A=e=>{var t=[]
|
79 |
+
return y(e,(e=>{"string"==typeof e&&(e=e.trim().split(/[\11\12\14\15\40]/)),Array.isArray(e)&&(t=t.concat(e))})),t.filter(Boolean)},x=e=>(Array.isArray(e)||(e=[e]),e),k=(e,t,i)=>{if(!i||i.contains(e))for(;e&&e.matches;){if(e.matches(t))return e
|
80 |
+
e=e.parentNode}},F=(e,t=0)=>t>0?e[e.length-1]:e[0],L=(e,t)=>{if(!e)return-1
|
81 |
+
t=t||e.nodeName
|
82 |
+
for(var i=0;e=e.previousElementSibling;)e.matches(t)&&i++
|
83 |
+
return i},P=(e,t)=>{y(t,((t,i)=>{null==t?e.removeAttribute(i):e.setAttribute(i,""+t)}))},E=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},T=(e,t)=>{if(null===t)return
|
84 |
+
if("string"==typeof t){if(!t.length)return
|
85 |
+
t=new RegExp(t,"i")}const i=e=>3===e.nodeType?(e=>{var i=e.data.match(t)
|
86 |
+
if(i&&e.data.length>0){var s=document.createElement("span")
|
87 |
+
s.className="highlight"
|
88 |
+
var n=e.splitText(i.index)
|
89 |
+
n.splitText(i[0].length)
|
90 |
+
var o=n.cloneNode(!0)
|
91 |
+
return s.appendChild(o),E(n,s),1}return 0})(e):((e=>{if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var t=0;t<e.childNodes.length;++t)t+=i(e.childNodes[t])})(e),0)
|
92 |
+
i(e)},V="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey"
|
93 |
+
var j={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}}
|
94 |
+
const q=e=>null==e?null:D(e),D=e=>"boolean"==typeof e?e?"1":"0":e+"",N=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),z=(e,t)=>{var i
|
95 |
+
return function(s,n){var o=this
|
96 |
+
i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[s]=!0,e.call(o,s,n)}),t)}},R=(e,t,i)=>{var s,n=e.trigger,o={}
|
97 |
+
for(s in e.trigger=function(){var i=arguments[0]
|
98 |
+
if(-1===t.indexOf(i))return n.apply(e,arguments)
|
99 |
+
o[i]=arguments},i.apply(e,[]),e.trigger=n,o)n.apply(e,o[s])},H=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},B=(e,t,i,s)=>{e.addEventListener(t,i,s)},K=(e,t)=>!!t&&(!!t[e]&&1===(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0)),M=(e,t)=>{const i=e.getAttribute("id")
|
100 |
+
return i||(e.setAttribute("id",t),t)},Q=e=>e.replace(/[\\"']/g,"\\$&"),G=(e,t)=>{t&&e.append(t)}
|
101 |
+
function U(e,t){var i=Object.assign({},j,t),s=i.dataAttr,n=i.labelField,o=i.valueField,r=i.disabledField,l=i.optgroupField,a=i.optgroupLabelField,c=i.optgroupValueField,d=e.tagName.toLowerCase(),p=e.getAttribute("placeholder")||e.getAttribute("data-placeholder")
|
102 |
+
if(!p&&!i.allowEmptyOption){let t=e.querySelector('option[value=""]')
|
103 |
+
t&&(p=t.textContent)}var u,h,g,f,v,m,O={placeholder:p,options:[],optgroups:[],items:[],maxItems:null}
|
104 |
+
return"select"===d?(h=O.options,g={},f=1,v=e=>{var t=Object.assign({},e.dataset),i=s&&t[s]
|
105 |
+
return"string"==typeof i&&i.length&&(t=Object.assign(t,JSON.parse(i))),t},m=(e,t)=>{var s=q(e.value)
|
106 |
+
if(null!=s&&(s||i.allowEmptyOption)){if(g.hasOwnProperty(s)){if(t){var a=g[s][l]
|
107 |
+
a?Array.isArray(a)?a.push(t):g[s][l]=[a,t]:g[s][l]=t}}else{var c=v(e)
|
108 |
+
c[n]=c[n]||e.textContent,c[o]=c[o]||s,c[r]=c[r]||e.disabled,c[l]=c[l]||t,c.$option=e,g[s]=c,h.push(c)}e.selected&&O.items.push(s)}},O.maxItems=e.hasAttribute("multiple")?null:1,y(e.children,(e=>{var t,i,s
|
109 |
+
"optgroup"===(u=e.tagName.toLowerCase())?((s=v(t=e))[a]=s[a]||t.getAttribute("label")||"",s[c]=s[c]||f++,s[r]=s[r]||t.disabled,O.optgroups.push(s),i=s[c],y(t.children,(e=>{m(e,i)}))):"option"===u&&m(e)}))):(()=>{const t=e.getAttribute(s)
|
110 |
+
if(t)O.options=JSON.parse(t),y(O.options,(e=>{O.items.push(e[o])}))
|
111 |
+
else{var r=e.value.trim()||""
|
112 |
+
if(!i.allowEmptyOption&&!r.length)return
|
113 |
+
const t=r.split(i.delimiter)
|
114 |
+
y(t,(e=>{const t={}
|
115 |
+
t[n]=e,t[o]=e,O.options.push(t)})),O.items=t}})(),Object.assign({},j,O,t)}var W=0
|
116 |
+
class J extends(function(e){return e.plugins={},class extends e{constructor(...e){super(...e),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,i){e.plugins[t]={name:t,fn:i}}initializePlugins(e){var t,i
|
117 |
+
const s=this,n=[]
|
118 |
+
if(Array.isArray(e))e.forEach((e=>{"string"==typeof e?n.push(e):(s.plugins.settings[e.name]=e.options,n.push(e.name))}))
|
119 |
+
else if(e)for(t in e)e.hasOwnProperty(t)&&(s.plugins.settings[t]=e[t],n.push(t))
|
120 |
+
for(;i=n.shift();)s.require(i)}loadPlugin(t){var i=this,s=i.plugins,n=e.plugins[t]
|
121 |
+
if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin')
|
122 |
+
s.requested[t]=!0,s.loaded[t]=n.fn.apply(i,[i.plugins.settings[t]||{}]),s.names.push(t)}require(e){var t=this,i=t.plugins
|
123 |
+
if(!t.plugins.loaded.hasOwnProperty(e)){if(i.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")')
|
124 |
+
t.loadPlugin(e)}return i.loaded[e]}}}(t)){constructor(e,t){var i
|
125 |
+
super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],W++
|
126 |
+
var s=w(e)
|
127 |
+
if(s.tomselect)throw new Error("Tom Select already initialized on this element")
|
128 |
+
s.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(s,null)).getPropertyValue("direction")
|
129 |
+
const n=U(s,t)
|
130 |
+
this.settings=n,this.input=s,this.tabIndex=s.tabIndex||0,this.is_select_tag="select"===s.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=M(s,"tomselect-"+W),this.isRequired=s.required,this.sifter=new b(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode)
|
131 |
+
var o=n.createFilter
|
132 |
+
"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?n.createFilter=e=>o.test(e):n.createFilter=()=>!0),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates()
|
133 |
+
const r=w("<div>"),l=w("<div>"),a=this._render("dropdown"),c=w('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",p=n.mode
|
134 |
+
var u
|
135 |
+
if(C(r,n.wrapperClass,d,p),C(l,n.controlClass),G(r,l),C(a,n.dropdownClass,p),n.copyClassesToDropdown&&C(a,d),C(c,n.dropdownContentClass),G(a,c),w(n.dropdownParent||r).appendChild(a),n.hasOwnProperty("controlInput"))n.controlInput?(u=w(n.controlInput),this.focus_node=u):(u=w("<input/>"),this.focus_node=l)
|
136 |
+
else{u=w('<input type="text" autocomplete="off" size="1" />')
|
137 |
+
y(["autocorrect","autocapitalize","autocomplete"],(e=>{s.getAttribute(e)&&P(u,{[e]:s.getAttribute(e)})})),u.tabIndex=-1,l.appendChild(u),this.focus_node=u}this.wrapper=r,this.dropdown=a,this.dropdown_content=c,this.control=l,this.control_input=u,this.setup()}setup(){const e=this,t=e.settings,i=e.control_input,s=e.dropdown,n=e.dropdown_content,o=e.wrapper,r=e.control,l=e.input,a=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown"
|
138 |
+
P(n,{id:d}),P(a,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d})
|
139 |
+
const p=M(a,e.inputId+"-ts-control"),u="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",h=document.querySelector(u),g=e.focus.bind(e)
|
140 |
+
if(h){B(h,"click",g),P(h,{for:p})
|
141 |
+
const t=M(h,e.inputId+"-ts-label")
|
142 |
+
P(a,{"aria-labelledby":t}),P(n,{"aria-labelledby":t})}if(o.style.width=l.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-")
|
143 |
+
C([o,s],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&P(l,{multiple:"multiple"}),e.settings.placeholder&&P(i,{placeholder:t.placeholder}),!e.settings.splitOn&&e.settings.delimiter&&(e.settings.splitOn=new RegExp("\\s*"+v(e.settings.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=z(t.load,t.loadThrottle)),e.control_input.type=l.type,B(s,"click",(t=>{const i=k(t.target,"[data-selectable]")
|
144 |
+
i&&(e.onOptionSelect(t,i),H(t,!0))})),B(r,"click",(t=>{var s=k(t.target,"[data-ts-item]",r)
|
145 |
+
s&&e.onItemSelect(t,s)?H(t,!0):""==i.value&&(e.onClick(),H(t,!0))})),B(i,"mousedown",(e=>{""!==i.value&&e.stopPropagation()})),B(a,"keydown",(t=>e.onKeyDown(t))),B(i,"keypress",(t=>e.onKeyPress(t))),B(i,"input",(t=>e.onInput(t))),B(a,"resize",(()=>e.positionDropdown()),c),B(a,"blur",(t=>e.onBlur(t))),B(a,"focus",(t=>e.onFocus(t))),B(a,"paste",(t=>e.onPaste(t)))
|
146 |
+
const f=t=>{const i=t.composedPath()[0]
|
147 |
+
if(!o.contains(i)&&!s.contains(i))return e.isFocused&&e.blur(),void e.inputState()
|
148 |
+
H(t,!0)}
|
149 |
+
var m=()=>{e.isOpen&&e.positionDropdown()}
|
150 |
+
B(document,"mousedown",f),B(window,"scroll",m,c),B(window,"resize",m,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("sroll",m),window.removeEventListener("resize",m),h&&h.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,B(l,"invalid",(t=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())})),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,l.disabled?e.disable():e.enable(),e.on("change",this.onChange),C(l,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),y(t,(e=>{this.registerOptionGroup(e)}))}setupTemplates(){var e=this,t=e.settings.labelField,i=e.settings.optgroupLabelField,s={optgroup:e=>{let t=document.createElement("div")
|
151 |
+
return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[i])+"</div>",option:(e,i)=>"<div>"+i(e[t])+"</div>",item:(e,i)=>"<div>"+i(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"}
|
152 |
+
e.settings.render=Object.assign({},s,e.settings.render)}setupCallbacks(){var e,t,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"}
|
153 |
+
for(e in i)(t=this.settings[i[e]])&&this.on(e,t)}sync(e=!0){const t=this,i=e?U(t.input,{delimiter:t.settings.delimiter}):t.settings
|
154 |
+
t.setupOptions(i.options,i.optgroups),t.setValue(i.items,!0),t.lastQuery=null}onClick(){var e=this
|
155 |
+
if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus()
|
156 |
+
e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){_(this.input,"input"),_(this.input,"change")}onPaste(e){var t=this
|
157 |
+
t.isFull()||t.isInputHidden||t.isLocked?H(e):t.settings.splitOn&&setTimeout((()=>{var e=t.inputValue()
|
158 |
+
if(e.match(t.settings.splitOn)){var i=e.trim().split(t.settings.splitOn)
|
159 |
+
y(i,(e=>{t.createItem(e)}))}}),0)}onKeyPress(e){var t=this
|
160 |
+
if(!t.isLocked){var i=String.fromCharCode(e.keyCode||e.which)
|
161 |
+
return t.settings.create&&"multi"===t.settings.mode&&i===t.settings.delimiter?(t.createItem(),void H(e)):void 0}H(e)}onKeyDown(e){var t=this
|
162 |
+
if(t.isLocked)9!==e.keyCode&&H(e)
|
163 |
+
else{switch(e.keyCode){case 65:if(K(V,e))return H(e),void t.selectAll()
|
164 |
+
break
|
165 |
+
case 27:return t.isOpen&&(H(e,!0),t.close()),void t.clearActiveItems()
|
166 |
+
case 40:if(!t.isOpen&&t.hasOptions)t.open()
|
167 |
+
else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1)
|
168 |
+
e&&t.setActiveOption(e)}return void H(e)
|
169 |
+
case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1)
|
170 |
+
e&&t.setActiveOption(e)}return void H(e)
|
171 |
+
case 13:return void(t.isOpen&&t.activeOption?(t.onOptionSelect(e,t.activeOption),H(e)):t.settings.create&&t.createItem()&&H(e))
|
172 |
+
case 37:return void t.advanceSelection(-1,e)
|
173 |
+
case 39:return void t.advanceSelection(1,e)
|
174 |
+
case 9:return void(t.settings.selectOnTab&&(t.isOpen&&t.activeOption&&(t.onOptionSelect(e,t.activeOption),H(e)),t.settings.create&&t.createItem()&&H(e)))
|
175 |
+
case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!K(V,e)&&H(e)}}onInput(e){var t=this
|
176 |
+
if(!t.isLocked){var i=t.inputValue()
|
177 |
+
t.lastValue!==i&&(t.lastValue=i,t.settings.shouldLoad.call(t,i)&&t.load(i),t.refreshOptions(),t.trigger("type",i))}}onFocus(e){var t=this,i=t.isFocused
|
178 |
+
if(t.isDisabled)return t.blur(),void H(e)
|
179 |
+
t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),i||t.trigger("focus"),t.activeItems.length||(t.showInput(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this
|
180 |
+
if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1
|
181 |
+
var i=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")}
|
182 |
+
t.settings.create&&t.settings.createOnBlur?t.createItem(null,!1,i):i()}}}onOptionSelect(e,t){var i,s=this
|
183 |
+
t&&(t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?s.createItem(null,!0,(()=>{s.settings.closeAfterSelect&&s.close()})):void 0!==(i=t.dataset.value)&&(s.lastQuery=null,s.addItem(i),s.settings.closeAfterSelect&&s.close(),!s.settings.hideSelected&&e.type&&/click/.test(e.type)&&s.setActiveOption(t))))}onItemSelect(e,t){var i=this
|
184 |
+
return!i.isLocked&&"multi"===i.settings.mode&&(H(e),i.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this
|
185 |
+
if(!t.canLoad(e))return
|
186 |
+
C(t.wrapper,t.settings.loadingClass),t.loading++
|
187 |
+
const i=t.loadCallback.bind(t)
|
188 |
+
t.settings.load.call(t,e,i)}loadCallback(e,t){const i=this
|
189 |
+
i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(e,t),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||S(i.wrapper,i.settings.loadingClass),i.trigger("load",e,t)}preload(){var e=this.wrapper.classList
|
190 |
+
e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input
|
191 |
+
t.value!==e&&(t.value=e,_(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){R(this,t?[]:["change"],(()=>{this.clear(t),this.addItems(e,t)}))}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var i,s,n,o,r,l,a=this
|
192 |
+
if("single"!==a.settings.mode){if(!e)return a.clearActiveItems(),void(a.isFocused&&a.showInput())
|
193 |
+
if("click"===(i=t&&t.type.toLowerCase())&&K("shiftKey",t)&&a.activeItems.length){for(l=a.getLastActive(),(n=Array.prototype.indexOf.call(a.control.children,l))>(o=Array.prototype.indexOf.call(a.control.children,e))&&(r=n,n=o,o=r),s=n;s<=o;s++)e=a.control.children[s],-1===a.activeItems.indexOf(e)&&a.setActiveItemClass(e)
|
194 |
+
H(t)}else"click"===i&&K(V,t)||"keydown"===i&&K("shiftKey",t)?e.classList.contains("active")?a.removeActiveItem(e):a.setActiveItemClass(e):(a.clearActiveItems(),a.setActiveItemClass(e))
|
195 |
+
a.hideInput(),a.isFocused||a.focus()}}setActiveItemClass(e){const t=this,i=t.control.querySelector(".last-active")
|
196 |
+
i&&S(i,"last-active"),C(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e)
|
197 |
+
this.activeItems.splice(t,1),S(e,"active")}clearActiveItems(){S(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,P(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),P(e,{"aria-selected":"true"}),C(e,"active"),this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return
|
198 |
+
const i=this.dropdown_content,s=i.clientHeight,n=i.scrollTop||0,o=e.offsetHeight,r=e.getBoundingClientRect().top-i.getBoundingClientRect().top+n
|
199 |
+
r+o>s+n?this.scroll(r-s+o,t):r<n&&this.scroll(r,t)}scroll(e,t){const i=this.dropdown_content
|
200 |
+
t&&(i.style.scrollBehavior=t),i.scrollTop=e,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(S(this.activeOption,"active"),P(this.activeOption,{"aria-selected":null})),this.activeOption=null,P(this.focus_node,{"aria-activedescendant":null})}selectAll(){if("single"===this.settings.mode)return
|
201 |
+
const e=this.controlChildren()
|
202 |
+
e.length&&(this.hideInput(),this.close(),this.activeItems=e,C(e,"active"))}inputState(){var e=this
|
203 |
+
e.control.contains(e.control_input)&&(P(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&P(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var e=this
|
204 |
+
e.isDisabled||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout((()=>{e.ignoreFocus=!1,e.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField
|
205 |
+
return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,i,s,n=this,o=this.getSearchOptions()
|
206 |
+
if(n.settings.score&&"function"!=typeof(s=n.settings.score.call(n,e)))throw new Error('Tom Select "score" setting must be a function that returns a function')
|
207 |
+
if(e!==n.lastQuery?(n.lastQuery=e,i=n.sifter.search(e,Object.assign(o,{score:s})),n.currentResults=i):i=Object.assign({},n.currentResults),n.settings.hideSelected)for(t=i.items.length-1;t>=0;t--){let e=q(i.items[t].id)
|
208 |
+
e&&-1!==n.items.indexOf(e)&&i.items.splice(t,1)}return i}refreshOptions(e=!0){var t,i,s,n,o,r,l,a,c,d,p
|
209 |
+
const u={},h=[]
|
210 |
+
var g,f=this,v=f.inputValue(),m=f.search(v),O=f.activeOption,b=f.settings.shouldOpen||!1,w=f.dropdown_content
|
211 |
+
for(O&&(c=O.dataset.value,d=O.closest("[data-group]")),n=m.items.length,"number"==typeof f.settings.maxOptions&&(n=Math.min(n,f.settings.maxOptions)),n>0&&(b=!0),t=0;t<n;t++){let e=m.items[t].id,n=f.options[e],l=f.getOption(e,!0)
|
212 |
+
for(f.settings.hideSelected||l.classList.toggle("selected",f.items.includes(e)),o=n[f.settings.optgroupField]||"",i=0,s=(r=Array.isArray(o)?o:[o])&&r.length;i<s;i++)o=r[i],f.optgroups.hasOwnProperty(o)||(o=""),u.hasOwnProperty(o)||(u[o]=document.createDocumentFragment(),h.push(o)),i>0&&(l=l.cloneNode(!0),P(l,{id:n.$id+"-clone-"+i,"aria-selected":null}),l.classList.add("ts-cloned"),S(l,"active")),c==e&&d&&d.dataset.group===o&&(O=l),u[o].appendChild(l)}this.settings.lockOptgroupOrder&&h.sort(((e,t)=>(f.optgroups[e]&&f.optgroups[e].$order||0)-(f.optgroups[t]&&f.optgroups[t].$order||0))),l=document.createDocumentFragment(),y(h,(e=>{if(f.optgroups.hasOwnProperty(e)&&u[e].children.length){let t=document.createDocumentFragment(),i=f.render("optgroup_header",f.optgroups[e])
|
213 |
+
G(t,i),G(t,u[e])
|
214 |
+
let s=f.render("optgroup",{group:f.optgroups[e],options:t})
|
215 |
+
G(l,s)}else G(l,u[e])})),w.innerHTML="",G(w,l),f.settings.highlight&&(g=w.querySelectorAll("span.highlight"),Array.prototype.forEach.call(g,(function(e){var t=e.parentNode
|
216 |
+
t.replaceChild(e.firstChild,e),t.normalize()})),m.query.length&&m.tokens.length&&y(m.tokens,(e=>{T(w,e.regex)})))
|
217 |
+
var _=e=>{let t=f.render(e,{input:v})
|
218 |
+
return t&&(b=!0,w.insertBefore(t,w.firstChild)),t}
|
219 |
+
if(f.loading?_("loading"):f.settings.shouldLoad.call(f,v)?0===m.items.length&&_("no_results"):_("not_loading"),(a=f.canCreate(v))&&(p=_("option_create")),f.hasOptions=m.items.length>0||a,b){if(m.items.length>0){if(!w.contains(O)&&"single"===f.settings.mode&&f.items.length&&(O=f.getOption(f.items[0])),!w.contains(O)){let e=0
|
220 |
+
p&&!f.settings.addPrecedence&&(e=1),O=f.selectable()[e]}}else p&&(O=p)
|
221 |
+
e&&!f.isOpen&&(f.open(),f.scrollToOption(O,"auto")),f.setActiveOption(O)}else f.clearActiveOption(),e&&f.isOpen&&f.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const i=this
|
222 |
+
if(Array.isArray(e))return i.addOptions(e,t),!1
|
223 |
+
const s=q(e[i.settings.valueField])
|
224 |
+
return null!==s&&!i.options.hasOwnProperty(s)&&(e.$order=e.$order||++i.order,e.$id=i.inputId+"-opt-"+e.$order,i.options[s]=e,i.lastQuery=null,t&&(i.userOptions[s]=t,i.trigger("option_add",s,e)),s)}addOptions(e,t=!1){y(e,(e=>{this.addOption(e,t)}))}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=q(e[this.settings.optgroupValueField])
|
225 |
+
return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var i
|
226 |
+
t[this.settings.optgroupValueField]=e,(i=this.registerOptionGroup(t))&&this.trigger("optgroup_add",i,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const i=this
|
227 |
+
var s,n
|
228 |
+
const o=q(e),r=q(t[i.settings.valueField])
|
229 |
+
if(null===o)return
|
230 |
+
if(!i.options.hasOwnProperty(o))return
|
231 |
+
if("string"!=typeof r)throw new Error("Value must be set in option data")
|
232 |
+
const l=i.getOption(o),a=i.getItem(o)
|
233 |
+
if(t.$order=t.$order||i.options[o].$order,delete i.options[o],i.uncacheValue(r),i.options[r]=t,l){if(i.dropdown_content.contains(l)){const e=i._render("option",t)
|
234 |
+
E(l,e),i.activeOption===l&&i.setActiveOption(e)}l.remove()}a&&(-1!==(n=i.items.indexOf(o))&&i.items.splice(n,1,r),s=i._render("item",t),a.classList.contains("active")&&C(s,"active"),E(a,s)),i.lastQuery=null}removeOption(e,t){const i=this
|
235 |
+
e=D(e),i.uncacheValue(e),delete i.userOptions[e],delete i.options[e],i.lastQuery=null,i.trigger("option_remove",e),i.removeItem(e,t)}clearOptions(){this.loadedSearches={},this.userOptions={},this.clearCache()
|
236 |
+
var e={}
|
237 |
+
y(this.options,((t,i)=>{this.items.indexOf(i)>=0&&(e[i]=this.options[i])})),this.options=this.sifter.items=e,this.lastQuery=null,this.trigger("option_clear")}getOption(e,t=!1){const i=q(e)
|
238 |
+
if(null!==i&&this.options.hasOwnProperty(i)){const e=this.options[i]
|
239 |
+
if(e.$div)return e.$div
|
240 |
+
if(t)return this._render("option",e)}return null}getAdjacent(e,t,i="option"){var s
|
241 |
+
if(!e)return null
|
242 |
+
s="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]")
|
243 |
+
for(let i=0;i<s.length;i++)if(s[i]==e)return t>0?s[i+1]:s[i-1]
|
244 |
+
return null}getItem(e){if("object"==typeof e)return e
|
245 |
+
var t=q(e)
|
246 |
+
return null!==t?this.control.querySelector(`[data-value="${Q(t)}"]`):null}addItems(e,t){var i=this,s=Array.isArray(e)?e:[e]
|
247 |
+
for(let e=0,n=(s=s.filter((e=>-1===i.items.indexOf(e)))).length;e<n;e++)i.isPending=e<n-1,i.addItem(s[e],t)}addItem(e,t){R(this,t?[]:["change"],(()=>{var i,s
|
248 |
+
const n=this,o=n.settings.mode,r=q(e)
|
249 |
+
if((!r||-1===n.items.indexOf(r)||("single"===o&&n.close(),"single"!==o&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===o&&n.clear(t),"multi"!==o||!n.isFull())){if(i=n._render("item",n.options[r]),n.control.contains(i)&&(i=i.cloneNode(!0)),s=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(i),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let e=n.getOption(r),t=n.getAdjacent(e,1)
|
250 |
+
t&&n.setActiveOption(t)}n.isPending||n.refreshOptions(n.isFocused&&"single"!==o),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,i),n.isPending||n.updateOriginalInput({silent:t})}(!n.isPending||!s&&n.isFull())&&(n.inputState(),n.refreshState())}}))}removeItem(e=null,t){const i=this
|
251 |
+
if(!(e=i.getItem(e)))return
|
252 |
+
var s,n
|
253 |
+
const o=e.dataset.value
|
254 |
+
s=L(e),e.remove(),e.classList.contains("active")&&(n=i.activeItems.indexOf(e),i.activeItems.splice(n,1),S(e,"active")),i.items.splice(s,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,t),s<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:t}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,e)}createItem(e=null,t=!0,i=(()=>{})){var s,n=this,o=n.caretPos
|
255 |
+
if(e=e||n.inputValue(),!n.canCreate(e))return i(),!1
|
256 |
+
n.lock()
|
257 |
+
var r=!1,l=e=>{if(n.unlock(),!e||"object"!=typeof e)return i()
|
258 |
+
var s=q(e[n.settings.valueField])
|
259 |
+
if("string"!=typeof s)return i()
|
260 |
+
n.setTextboxValue(),n.addOption(e,!0),n.setCaret(o),n.addItem(s),n.refreshOptions(t&&"single"!==n.settings.mode),i(e),r=!0}
|
261 |
+
return s="function"==typeof n.settings.create?n.settings.create.call(this,e,l):{[n.settings.labelField]:e,[n.settings.valueField]:e},r||l(s),!0}refreshItems(){var e=this
|
262 |
+
e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this
|
263 |
+
e.refreshValidityState()
|
264 |
+
const t=e.isFull(),i=e.isLocked
|
265 |
+
e.wrapper.classList.toggle("rtl",e.rtl)
|
266 |
+
const s=e.wrapper.classList
|
267 |
+
var n
|
268 |
+
s.toggle("focus",e.isFocused),s.toggle("disabled",e.isDisabled),s.toggle("required",e.isRequired),s.toggle("invalid",!e.isValid),s.toggle("locked",i),s.toggle("full",t),s.toggle("input-active",e.isFocused&&!e.isInputHidden),s.toggle("dropdown-active",e.isOpen),s.toggle("has-options",(n=e.options,0===Object.keys(n).length)),s.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this
|
269 |
+
e.input.checkValidity&&(e.isValid=e.input.checkValidity(),e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this
|
270 |
+
var i,s
|
271 |
+
const n=t.input.querySelector('option[value=""]')
|
272 |
+
if(t.is_select_tag){const e=[]
|
273 |
+
function o(i,s,o){return i||(i=w('<option value="'+N(s)+'">'+N(o)+"</option>")),i!=n&&t.input.append(i),e.push(i),i.selected=!0,i}t.input.querySelectorAll("option:checked").forEach((e=>{e.selected=!1})),0==t.items.length&&"single"==t.settings.mode?o(n,"",""):t.items.forEach((n=>{if(i=t.options[n],s=i[t.settings.labelField]||"",e.includes(i.$option)){o(t.input.querySelector(`option[value="${Q(n)}"]:not(:checked)`),n,s)}else i.$option=o(i.$option,n,s)}))}else t.input.value=t.getValue()
|
274 |
+
t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this
|
275 |
+
e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,P(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),I(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),I(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,i=t.isOpen
|
276 |
+
e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.hideInput()),t.isOpen=!1,P(t.focus_node,{"aria-expanded":"false"}),I(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),i&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),i=e.offsetHeight+t.top+window.scrollY,s=t.left+window.scrollX
|
277 |
+
I(this.dropdown,{width:t.width+"px",top:i+"px",left:s+"px"})}}clear(e){var t=this
|
278 |
+
if(t.items.length){var i=t.controlChildren()
|
279 |
+
y(i,(e=>{t.removeItem(e,!0)})),t.showInput(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,i=t.caretPos,s=t.control
|
280 |
+
s.insertBefore(e,s.children[i]),t.setCaret(i+1)}deleteSelection(e){var t,i,s,n,o,r=this
|
281 |
+
t=e&&8===e.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)}
|
282 |
+
const l=[]
|
283 |
+
if(r.activeItems.length)n=F(r.activeItems,t),s=L(n),t>0&&s++,y(r.activeItems,(e=>l.push(e)))
|
284 |
+
else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren()
|
285 |
+
t<0&&0===i.start&&0===i.length?l.push(e[r.caretPos-1]):t>0&&i.start===r.inputValue().length&&l.push(e[r.caretPos])}const a=l.map((e=>e.dataset.value))
|
286 |
+
if(!a.length||"function"==typeof r.settings.onDelete&&!1===r.settings.onDelete.call(r,a,e))return!1
|
287 |
+
for(H(e,!0),void 0!==s&&r.setCaret(s);l.length;)r.removeItem(l.pop())
|
288 |
+
return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}advanceSelection(e,t){var i,s,n=this
|
289 |
+
n.rtl&&(e*=-1),n.inputValue().length||(K(V,t)||K("shiftKey",t)?(s=(i=n.getLastActive(e))?i.classList.contains("active")?n.getAdjacent(i,e,"item"):i:e>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(s.classList.contains("active")&&n.removeActiveItem(i),n.setActiveItemClass(s)):n.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active")
|
290 |
+
if(t)return t
|
291 |
+
var i=this.control.querySelectorAll(".active")
|
292 |
+
return i?F(i,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.close(),this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var e=this
|
293 |
+
e.input.disabled=!0,e.control_input.disabled=!0,e.focus_node.tabIndex=-1,e.isDisabled=!0,e.lock()}enable(){var e=this
|
294 |
+
e.input.disabled=!1,e.control_input.disabled=!1,e.focus_node.tabIndex=e.tabIndex,e.isDisabled=!1,e.unlock()}destroy(){var e=this,t=e.revertSettings
|
295 |
+
e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,S(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){return"function"!=typeof this.settings.render[e]?null:this._render(e,t)}_render(e,t){var i,s,n=""
|
296 |
+
const o=this
|
297 |
+
return"option"!==e&&"item"!=e||(n=D(t[o.settings.valueField])),null==(s=o.settings.render[e].call(this,t,N))||(s=w(s),"option"===e||"option_create"===e?t[o.settings.disabledField]?P(s,{"aria-disabled":"true"}):P(s,{"data-selectable":""}):"optgroup"===e&&(i=t.group[o.settings.optgroupValueField],P(s,{"data-group":i}),t.group[o.settings.disabledField]&&P(s,{"data-disabled":""})),"option"!==e&&"item"!==e||(P(s,{"data-value":n}),"item"===e?(C(s,o.settings.itemClass),P(s,{"data-ts-item":""})):(C(s,o.settings.optionClass),P(s,{role:"option",id:t.$id}),o.options[n].$div=s))),s}clearCache(){y(this.options,((e,t)=>{e.$div&&(e.$div.remove(),delete e.$div)}))}uncacheValue(e){const t=this.getOption(e)
|
298 |
+
t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,i){var s=this,n=s[t]
|
299 |
+
s[t]=function(){var t,o
|
300 |
+
return"after"===e&&(t=n.apply(s,arguments)),o=i.apply(s,arguments),"instead"===e?o:("before"===e&&(t=n.apply(s,arguments)),t)}}}return J.define("change_listener",(function(){B(this.input,"change",(()=>{this.sync()}))})),J.define("checkbox_options",(function(){var e=this,t=e.onOptionSelect
|
301 |
+
e.settings.hideSelected=!1
|
302 |
+
var i=function(e){setTimeout((()=>{var t=e.querySelector("input")
|
303 |
+
e.classList.contains("selected")?t.checked=!0:t.checked=!1}),1)}
|
304 |
+
e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option
|
305 |
+
e.settings.render.option=(i,s)=>{var n=w(t.call(e,i,s)),o=document.createElement("input")
|
306 |
+
o.addEventListener("click",(function(e){H(e)})),o.type="checkbox"
|
307 |
+
const r=q(i[e.settings.valueField])
|
308 |
+
return r&&e.items.indexOf(r)>-1&&(o.checked=!0),n.prepend(o),n}})),e.on("item_remove",(t=>{var s=e.getOption(t)
|
309 |
+
s&&(s.classList.remove("selected"),i(s))})),e.hook("instead","onOptionSelect",((s,n)=>{if(n.classList.contains("selected"))return n.classList.remove("selected"),e.removeItem(n.dataset.value),e.refreshOptions(),void H(s,!0)
|
310 |
+
t.call(e,s,n),i(n)}))})),J.define("clear_button",(function(e){const t=this,i=Object.assign({className:"clear-button",title:"Clear All",html:e=>`<div class="${e.className}" title="${e.title}">×</div>`},e)
|
311 |
+
t.on("initialize",(()=>{var e=w(i.html(i))
|
312 |
+
e.addEventListener("click",(e=>{t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation()})),t.control.appendChild(e)}))})),J.define("drag_drop",(function(){var e=this
|
313 |
+
if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".')
|
314 |
+
if("multi"===e.settings.mode){var t=e.lock,i=e.unlock
|
315 |
+
e.hook("instead","lock",(()=>{var i=$(e.control).data("sortable")
|
316 |
+
return i&&i.disable(),t.call(e)})),e.hook("instead","unlock",(()=>{var t=$(e.control).data("sortable")
|
317 |
+
return t&&t.enable(),i.call(e)})),e.on("initialize",(()=>{var t=$(e.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:(e,i)=>{i.placeholder.css("width",i.helper.css("width")),t.css({overflow:"visible"})},stop:()=>{t.css({overflow:"hidden"})
|
318 |
+
var i=[]
|
319 |
+
t.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),e.setValue(i)}})}))}})),J.define("dropdown_header",(function(e){const t=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">×</a></div></div>'},e)
|
320 |
+
t.on("initialize",(()=>{var e=w(i.html(i)),s=e.querySelector("."+i.closeClass)
|
321 |
+
s&&s.addEventListener("click",(e=>{H(e,!0),t.close()})),t.dropdown.insertBefore(e,t.dropdown.firstChild)}))})),J.define("caret_position",(function(){var e=this
|
322 |
+
e.hook("instead","setCaret",(t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach(((i,s)=>{s<t?e.control_input.insertAdjacentElement("beforebegin",i):e.control.appendChild(i)})):t=e.items.length,e.caretPos=t})),e.hook("instead","moveCaret",(t=>{if(!e.isFocused)return
|
323 |
+
const i=e.getLastActive(t)
|
324 |
+
if(i){const s=L(i)
|
325 |
+
e.setCaret(t>0?s+1:s),e.setActiveItem()}else e.setCaret(e.caretPos+t)}))})),J.define("dropdown_input",(function(){var e=this
|
326 |
+
e.settings.shouldOpen=!0,e.hook("before","setup",(()=>{e.focus_node=e.control,C(e.control_input,"dropdown-input")
|
327 |
+
const t=w('<div class="dropdown-input-wrap">')
|
328 |
+
t.append(e.control_input),e.dropdown.insertBefore(t,e.dropdown.firstChild)})),e.on("initialize",(()=>{e.control_input.addEventListener("keydown",(t=>{switch(t.keyCode){case 27:return e.isOpen&&(H(t,!0),e.close()),void e.clearActiveItems()
|
329 |
+
case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)})),e.on("blur",(()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex})),e.on("dropdown_open",(()=>{e.control_input.focus()}))
|
330 |
+
const t=e.onBlur
|
331 |
+
e.hook("instead","onBlur",(i=>{if(!i||i.relatedTarget!=e.control_input)return t.call(e)})),B(e.control_input,"blur",(()=>e.onBlur())),e.hook("before","close",(()=>{e.isOpen&&e.focus_node.focus()}))}))})),J.define("input_autogrow",(function(){var e=this
|
332 |
+
e.on("initialize",(()=>{var t=document.createElement("span"),i=e.control_input
|
333 |
+
t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t)
|
334 |
+
for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=i.style[e]
|
335 |
+
var s=()=>{e.items.length>0?(t.textContent=i.value,i.style.width=t.clientWidth+"px"):i.style.width=""}
|
336 |
+
s(),e.on("update item_add item_remove",s),B(i,"input",s),B(i,"keyup",s),B(i,"blur",s),B(i,"update",s)}))})),J.define("no_backspace_delete",(function(){var e=this,t=e.deleteSelection
|
337 |
+
this.hook("instead","deleteSelection",(i=>!!e.activeItems.length&&t.call(e,i)))})),J.define("no_active_items",(function(){this.hook("instead","setActiveItem",(()=>{})),this.hook("instead","selectAll",(()=>{}))})),J.define("optgroup_columns",(function(){var e=this,t=e.onKeyDown
|
338 |
+
e.hook("instead","onKeyDown",(i=>{var s,n,o,r
|
339 |
+
if(!e.isOpen||37!==i.keyCode&&39!==i.keyCode)return t.call(e,i)
|
340 |
+
r=k(e.activeOption,"[data-group]"),s=L(e.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(n=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,s)])&&e.setActiveOption(n)}))})),J.define("remove_button",(function(e){const t=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},e)
|
341 |
+
var i=this
|
342 |
+
if(t.append){var s='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+N(t.title)+'">'+t.label+"</a>"
|
343 |
+
i.hook("after","setupTemplates",(()=>{var e=i.settings.render.item
|
344 |
+
i.settings.render.item=(t,n)=>{var o=w(e.call(i,t,n)),r=w(s)
|
345 |
+
return o.appendChild(r),B(r,"mousedown",(e=>{H(e,!0)})),B(r,"click",(e=>{if(H(e,!0),!i.isLocked){var t=o.dataset.value
|
346 |
+
i.removeItem(t),i.refreshOptions(!1)}})),o}}))}})),J.define("restore_on_backspace",(function(e){const t=this,i=Object.assign({text:e=>e[t.settings.labelField]},e)
|
347 |
+
t.on("item_remove",(function(e){if(""===t.control_input.value.trim()){var s=t.options[e]
|
348 |
+
s&&t.setTextboxValue(i.text.call(t,s))}}))})),J.define("virtual_scroll",(function(){const e=this,t=e.canLoad,i=e.clearActiveOption,s=e.loadCallback
|
349 |
+
var n,o={},r=!1
|
350 |
+
if(!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method"
|
351 |
+
function l(t){return!("number"==typeof e.settings.maxOptions&&n.children.length>=e.settings.maxOptions)&&!(!(t in o)||!o[t])}e.settings.sortField=[{field:"$order"},{field:"$score"}],e.setNextUrl=function(e,t){o[e]=t},e.getUrl=function(t){if(t in o){const e=o[t]
|
352 |
+
return o[t]=!1,e}return o={},e.settings.firstUrl(t)},e.hook("instead","clearActiveOption",(()=>{if(!r)return i.call(e)})),e.hook("instead","canLoad",(i=>i in o?l(i):t.call(e,i))),e.hook("instead","loadCallback",((t,i)=>{r||e.clearOptions(),s.call(e,t,i),r=!1})),e.hook("after","refreshOptions",(()=>{const t=e.lastValue
|
353 |
+
var i
|
354 |
+
l(t)?(i=e.render("loading_more",{query:t}))&&i.setAttribute("data-selectable",""):t in o&&!n.querySelector(".no-results")&&(i=e.render("no_more_results",{query:t})),i&&(C(i,e.settings.optionClass),n.append(i))})),e.on("initialize",(()=>{n=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:function(){return'<div class="loading-more-results">Loading more results ... </div>'},no_more_results:function(){return'<div class="no-more-results">No more results</div>'}},e.settings.render),n.addEventListener("scroll",(function(){n.clientHeight/(n.scrollHeight-n.scrollTop)<.95||l(e.lastValue)&&(r||(r=!0,e.load.call(e,e.lastValue)))}))}))})),J}))
|
355 |
+
var tomSelect=function(e,t){return new TomSelect(e,t)}
|
356 |
+
//# sourceMappingURL=tom-select.complete.min.js.map
|
lib/tom-select/tom-select.css
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* tom-select.css (v2.0.0-rc.4)
|
3 |
+
* Copyright (c) contributors
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
6 |
+
* file except in compliance with the License. You may obtain a copy of the License at:
|
7 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
*
|
9 |
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
10 |
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
+
* ANY KIND, either express or implied. See the License for the specific language
|
12 |
+
* governing permissions and limitations under the License.
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
.ts-wrapper.plugin-drag_drop.multi > .ts-control > div.ui-sortable-placeholder {
|
16 |
+
visibility: visible !important;
|
17 |
+
background: #f2f2f2 !important;
|
18 |
+
background: rgba(0, 0, 0, 0.06) !important;
|
19 |
+
border: 0 none !important;
|
20 |
+
box-shadow: inset 0 0 12px 4px #fff; }
|
21 |
+
|
22 |
+
.ts-wrapper.plugin-drag_drop .ui-sortable-placeholder::after {
|
23 |
+
content: '!';
|
24 |
+
visibility: hidden; }
|
25 |
+
|
26 |
+
.ts-wrapper.plugin-drag_drop .ui-sortable-helper {
|
27 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
|
28 |
+
|
29 |
+
.plugin-checkbox_options .option input {
|
30 |
+
margin-right: 0.5rem; }
|
31 |
+
|
32 |
+
.plugin-clear_button .ts-control {
|
33 |
+
padding-right: calc( 1em + (3 * 6px)) !important; }
|
34 |
+
|
35 |
+
.plugin-clear_button .clear-button {
|
36 |
+
opacity: 0;
|
37 |
+
position: absolute;
|
38 |
+
top: 8px;
|
39 |
+
right: calc(8px - 6px);
|
40 |
+
margin-right: 0 !important;
|
41 |
+
background: transparent !important;
|
42 |
+
transition: opacity 0.5s;
|
43 |
+
cursor: pointer; }
|
44 |
+
|
45 |
+
.plugin-clear_button.single .clear-button {
|
46 |
+
right: calc(8px - 6px + 2rem); }
|
47 |
+
|
48 |
+
.plugin-clear_button.focus.has-items .clear-button,
|
49 |
+
.plugin-clear_button:hover.has-items .clear-button {
|
50 |
+
opacity: 1; }
|
51 |
+
|
52 |
+
.ts-wrapper .dropdown-header {
|
53 |
+
position: relative;
|
54 |
+
padding: 10px 8px;
|
55 |
+
border-bottom: 1px solid #d0d0d0;
|
56 |
+
background: #f8f8f8;
|
57 |
+
border-radius: 3px 3px 0 0; }
|
58 |
+
|
59 |
+
.ts-wrapper .dropdown-header-close {
|
60 |
+
position: absolute;
|
61 |
+
right: 8px;
|
62 |
+
top: 50%;
|
63 |
+
color: #303030;
|
64 |
+
opacity: 0.4;
|
65 |
+
margin-top: -12px;
|
66 |
+
line-height: 20px;
|
67 |
+
font-size: 20px !important; }
|
68 |
+
|
69 |
+
.ts-wrapper .dropdown-header-close:hover {
|
70 |
+
color: black; }
|
71 |
+
|
72 |
+
.plugin-dropdown_input.focus.dropdown-active .ts-control {
|
73 |
+
box-shadow: none;
|
74 |
+
border: 1px solid #d0d0d0; }
|
75 |
+
|
76 |
+
.plugin-dropdown_input .dropdown-input {
|
77 |
+
border: 1px solid #d0d0d0;
|
78 |
+
border-width: 0 0 1px 0;
|
79 |
+
display: block;
|
80 |
+
padding: 8px 8px;
|
81 |
+
box-shadow: none;
|
82 |
+
width: 100%;
|
83 |
+
background: transparent; }
|
84 |
+
|
85 |
+
.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input {
|
86 |
+
min-width: 0; }
|
87 |
+
|
88 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input {
|
89 |
+
flex: none;
|
90 |
+
min-width: 4px; }
|
91 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-webkit-input-placeholder {
|
92 |
+
color: transparent; }
|
93 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder {
|
94 |
+
color: transparent; }
|
95 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder {
|
96 |
+
color: transparent; }
|
97 |
+
|
98 |
+
.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content {
|
99 |
+
display: flex; }
|
100 |
+
|
101 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup {
|
102 |
+
border-right: 1px solid #f2f2f2;
|
103 |
+
border-top: 0 none;
|
104 |
+
flex-grow: 1;
|
105 |
+
flex-basis: 0;
|
106 |
+
min-width: 0; }
|
107 |
+
|
108 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup:last-child {
|
109 |
+
border-right: 0 none; }
|
110 |
+
|
111 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup:before {
|
112 |
+
display: none; }
|
113 |
+
|
114 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup-header {
|
115 |
+
border-top: 0 none; }
|
116 |
+
|
117 |
+
.ts-wrapper.plugin-remove_button .item {
|
118 |
+
display: inline-flex;
|
119 |
+
align-items: center;
|
120 |
+
padding-right: 0 !important; }
|
121 |
+
|
122 |
+
.ts-wrapper.plugin-remove_button .item .remove {
|
123 |
+
color: inherit;
|
124 |
+
text-decoration: none;
|
125 |
+
vertical-align: middle;
|
126 |
+
display: inline-block;
|
127 |
+
padding: 2px 6px;
|
128 |
+
border-left: 1px solid #d0d0d0;
|
129 |
+
border-radius: 0 2px 2px 0;
|
130 |
+
box-sizing: border-box;
|
131 |
+
margin-left: 6px; }
|
132 |
+
|
133 |
+
.ts-wrapper.plugin-remove_button .item .remove:hover {
|
134 |
+
background: rgba(0, 0, 0, 0.05); }
|
135 |
+
|
136 |
+
.ts-wrapper.plugin-remove_button .item.active .remove {
|
137 |
+
border-left-color: #cacaca; }
|
138 |
+
|
139 |
+
.ts-wrapper.plugin-remove_button.disabled .item .remove:hover {
|
140 |
+
background: none; }
|
141 |
+
|
142 |
+
.ts-wrapper.plugin-remove_button.disabled .item .remove {
|
143 |
+
border-left-color: white; }
|
144 |
+
|
145 |
+
.ts-wrapper.plugin-remove_button .remove-single {
|
146 |
+
position: absolute;
|
147 |
+
right: 0;
|
148 |
+
top: 0;
|
149 |
+
font-size: 23px; }
|
150 |
+
|
151 |
+
.ts-wrapper {
|
152 |
+
position: relative; }
|
153 |
+
|
154 |
+
.ts-dropdown,
|
155 |
+
.ts-control,
|
156 |
+
.ts-control input {
|
157 |
+
color: #303030;
|
158 |
+
font-family: inherit;
|
159 |
+
font-size: 13px;
|
160 |
+
line-height: 18px;
|
161 |
+
font-smoothing: inherit; }
|
162 |
+
|
163 |
+
.ts-control,
|
164 |
+
.ts-wrapper.single.input-active .ts-control {
|
165 |
+
background: #fff;
|
166 |
+
cursor: text; }
|
167 |
+
|
168 |
+
.ts-control {
|
169 |
+
border: 1px solid #d0d0d0;
|
170 |
+
padding: 8px 8px;
|
171 |
+
width: 100%;
|
172 |
+
overflow: hidden;
|
173 |
+
position: relative;
|
174 |
+
z-index: 1;
|
175 |
+
box-sizing: border-box;
|
176 |
+
box-shadow: none;
|
177 |
+
border-radius: 3px;
|
178 |
+
display: flex;
|
179 |
+
flex-wrap: wrap; }
|
180 |
+
.ts-wrapper.multi.has-items .ts-control {
|
181 |
+
padding: calc( 8px - 2px - 0) 8px calc( 8px - 2px - 3px - 0); }
|
182 |
+
.full .ts-control {
|
183 |
+
background-color: #fff; }
|
184 |
+
.disabled .ts-control,
|
185 |
+
.disabled .ts-control * {
|
186 |
+
cursor: default !important; }
|
187 |
+
.focus .ts-control {
|
188 |
+
box-shadow: none; }
|
189 |
+
.ts-control > * {
|
190 |
+
vertical-align: baseline;
|
191 |
+
display: inline-block; }
|
192 |
+
.ts-wrapper.multi .ts-control > div {
|
193 |
+
cursor: pointer;
|
194 |
+
margin: 0 3px 3px 0;
|
195 |
+
padding: 2px 6px;
|
196 |
+
background: #f2f2f2;
|
197 |
+
color: #303030;
|
198 |
+
border: 0 solid #d0d0d0; }
|
199 |
+
.ts-wrapper.multi .ts-control > div.active {
|
200 |
+
background: #e8e8e8;
|
201 |
+
color: #303030;
|
202 |
+
border: 0 solid #cacaca; }
|
203 |
+
.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active {
|
204 |
+
color: #7d7c7c;
|
205 |
+
background: white;
|
206 |
+
border: 0 solid white; }
|
207 |
+
.ts-control > input {
|
208 |
+
flex: 1 1 auto;
|
209 |
+
min-width: 7rem;
|
210 |
+
display: inline-block !important;
|
211 |
+
padding: 0 !important;
|
212 |
+
min-height: 0 !important;
|
213 |
+
max-height: none !important;
|
214 |
+
max-width: 100% !important;
|
215 |
+
margin: 0 !important;
|
216 |
+
text-indent: 0 !important;
|
217 |
+
border: 0 none !important;
|
218 |
+
background: none !important;
|
219 |
+
line-height: inherit !important;
|
220 |
+
-webkit-user-select: auto !important;
|
221 |
+
-moz-user-select: auto !important;
|
222 |
+
-ms-user-select: auto !important;
|
223 |
+
user-select: auto !important;
|
224 |
+
box-shadow: none !important; }
|
225 |
+
.ts-control > input::-ms-clear {
|
226 |
+
display: none; }
|
227 |
+
.ts-control > input:focus {
|
228 |
+
outline: none !important; }
|
229 |
+
.has-items .ts-control > input {
|
230 |
+
margin: 0 4px !important; }
|
231 |
+
.ts-control.rtl {
|
232 |
+
text-align: right; }
|
233 |
+
.ts-control.rtl.single .ts-control:after {
|
234 |
+
left: 15px;
|
235 |
+
right: auto; }
|
236 |
+
.ts-control.rtl .ts-control > input {
|
237 |
+
margin: 0 4px 0 -2px !important; }
|
238 |
+
.disabled .ts-control {
|
239 |
+
opacity: 0.5;
|
240 |
+
background-color: #fafafa; }
|
241 |
+
.input-hidden .ts-control > input {
|
242 |
+
opacity: 0;
|
243 |
+
position: absolute;
|
244 |
+
left: -10000px; }
|
245 |
+
|
246 |
+
.ts-dropdown {
|
247 |
+
position: absolute;
|
248 |
+
top: 100%;
|
249 |
+
left: 0;
|
250 |
+
width: 100%;
|
251 |
+
z-index: 10;
|
252 |
+
border: 1px solid #d0d0d0;
|
253 |
+
background: #fff;
|
254 |
+
margin: 0.25rem 0 0 0;
|
255 |
+
border-top: 0 none;
|
256 |
+
box-sizing: border-box;
|
257 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
258 |
+
border-radius: 0 0 3px 3px; }
|
259 |
+
.ts-dropdown [data-selectable] {
|
260 |
+
cursor: pointer;
|
261 |
+
overflow: hidden; }
|
262 |
+
.ts-dropdown [data-selectable] .highlight {
|
263 |
+
background: rgba(125, 168, 208, 0.2);
|
264 |
+
border-radius: 1px; }
|
265 |
+
.ts-dropdown .option,
|
266 |
+
.ts-dropdown .optgroup-header,
|
267 |
+
.ts-dropdown .no-results,
|
268 |
+
.ts-dropdown .create {
|
269 |
+
padding: 5px 8px; }
|
270 |
+
.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option {
|
271 |
+
cursor: inherit;
|
272 |
+
opacity: 0.5; }
|
273 |
+
.ts-dropdown [data-selectable].option {
|
274 |
+
opacity: 1;
|
275 |
+
cursor: pointer; }
|
276 |
+
.ts-dropdown .optgroup:first-child .optgroup-header {
|
277 |
+
border-top: 0 none; }
|
278 |
+
.ts-dropdown .optgroup-header {
|
279 |
+
color: #303030;
|
280 |
+
background: #fff;
|
281 |
+
cursor: default; }
|
282 |
+
.ts-dropdown .create:hover,
|
283 |
+
.ts-dropdown .option:hover,
|
284 |
+
.ts-dropdown .active {
|
285 |
+
background-color: #f5fafd;
|
286 |
+
color: #495c68; }
|
287 |
+
.ts-dropdown .create:hover.create,
|
288 |
+
.ts-dropdown .option:hover.create,
|
289 |
+
.ts-dropdown .active.create {
|
290 |
+
color: #495c68; }
|
291 |
+
.ts-dropdown .create {
|
292 |
+
color: rgba(48, 48, 48, 0.5); }
|
293 |
+
.ts-dropdown .spinner {
|
294 |
+
display: inline-block;
|
295 |
+
width: 30px;
|
296 |
+
height: 30px;
|
297 |
+
margin: 5px 8px; }
|
298 |
+
.ts-dropdown .spinner:after {
|
299 |
+
content: " ";
|
300 |
+
display: block;
|
301 |
+
width: 24px;
|
302 |
+
height: 24px;
|
303 |
+
margin: 3px;
|
304 |
+
border-radius: 50%;
|
305 |
+
border: 5px solid #d0d0d0;
|
306 |
+
border-color: #d0d0d0 transparent #d0d0d0 transparent;
|
307 |
+
animation: lds-dual-ring 1.2s linear infinite; }
|
308 |
+
|
309 |
+
@keyframes lds-dual-ring {
|
310 |
+
0% {
|
311 |
+
transform: rotate(0deg); }
|
312 |
+
100% {
|
313 |
+
transform: rotate(360deg); } }
|
314 |
+
|
315 |
+
.ts-dropdown-content {
|
316 |
+
overflow-y: auto;
|
317 |
+
overflow-x: hidden;
|
318 |
+
max-height: 200px;
|
319 |
+
overflow-scrolling: touch;
|
320 |
+
scroll-behavior: smooth; }
|
321 |
+
|
322 |
+
.ts-hidden-accessible {
|
323 |
+
border: 0 !important;
|
324 |
+
clip: rect(0 0 0 0) !important;
|
325 |
+
-webkit-clip-path: inset(50%) !important;
|
326 |
+
clip-path: inset(50%) !important;
|
327 |
+
height: 1px !important;
|
328 |
+
overflow: hidden !important;
|
329 |
+
padding: 0 !important;
|
330 |
+
position: absolute !important;
|
331 |
+
width: 1px !important;
|
332 |
+
white-space: nowrap !important; }
|
333 |
+
|
334 |
+
/*# sourceMappingURL=tom-select.css.map */
|
lib/vis-9.0.4/vis-network.css
ADDED
The diff for this file is too large to render.
See raw diff
|
|
lib/vis-9.0.4/vis-network.min.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
lib/vis-9.1.2/vis-network.css
ADDED
The diff for this file is too large to render.
See raw diff
|
|
lib/vis-9.1.2/vis-network.min.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
ollama/__init__.py
ADDED
File without changes
|
ollama/__pycache__/__init__.cpython-311.pyc
ADDED
Binary file (189 Bytes). View file
|
|
ollama/__pycache__/client.cpython-311.pyc
ADDED
Binary file (9.41 kB). View file
|
|
ollama/client.py
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
+
import requests
|
4 |
+
|
5 |
+
local_model=True
|
6 |
+
if local_model:
|
7 |
+
BASE_URL = os.environ.get('OLLAMA_HOST', 'http://localhost:11434')
|
8 |
+
else:
|
9 |
+
BASE_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-alpha"
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
# Generate a response for a given prompt with a provided model. This is a streaming endpoint, so will be a series of responses.
|
14 |
+
# The final response object will include statistics and additional data from the request. Use the callback function to override
|
15 |
+
# the default handler.
|
16 |
+
def generate(model_name, prompt, system=None, template=None, context=None, options=None, callback=None):
|
17 |
+
try:
|
18 |
+
if local_model:
|
19 |
+
url = f"{BASE_URL}/api/generate"
|
20 |
+
headers = None
|
21 |
+
payload = {
|
22 |
+
"model": model_name,
|
23 |
+
"prompt": prompt,
|
24 |
+
"system": system,
|
25 |
+
"template": template,
|
26 |
+
"context": context,
|
27 |
+
"options": options
|
28 |
+
}
|
29 |
+
# Remove keys with None values
|
30 |
+
payload = {k: v for k, v in payload.items() if v is not None}
|
31 |
+
|
32 |
+
else:
|
33 |
+
url = f"{BASE_URL}"
|
34 |
+
headers = {"Authorization": "Bearer "+os.environ.get('TOKEN')}
|
35 |
+
payload = prompt
|
36 |
+
|
37 |
+
with requests.post(url, headers=headers, json=payload, stream=True) as response:
|
38 |
+
response.raise_for_status()
|
39 |
+
|
40 |
+
# Creating a variable to hold the context history of the final chunk
|
41 |
+
final_context = None
|
42 |
+
|
43 |
+
# Variable to hold concatenated response strings if no callback is provided
|
44 |
+
full_response = ""
|
45 |
+
|
46 |
+
# Iterating over the response line by line and displaying the details
|
47 |
+
for line in response.iter_lines():
|
48 |
+
if line:
|
49 |
+
# Parsing each line (JSON chunk) and extracting the details
|
50 |
+
chunk = json.loads(line)
|
51 |
+
|
52 |
+
# If a callback function is provided, call it with the chunk
|
53 |
+
if callback:
|
54 |
+
callback(chunk)
|
55 |
+
else:
|
56 |
+
# If this is not the last chunk, add the "response" field value to full_response and print it
|
57 |
+
if not chunk.get("done"):
|
58 |
+
response_piece = chunk.get("response", "")
|
59 |
+
full_response += response_piece
|
60 |
+
print(response_piece, end="", flush=True)
|
61 |
+
|
62 |
+
# Check if it's the last chunk (done is true)
|
63 |
+
if chunk.get("done"):
|
64 |
+
final_context = chunk.get("context")
|
65 |
+
|
66 |
+
# Return the full response and the final context
|
67 |
+
return full_response, final_context
|
68 |
+
except requests.exceptions.RequestException as e:
|
69 |
+
print(f"An error occurred: {e}")
|
70 |
+
return None, None
|
71 |
+
|
72 |
+
# Create a model from a Modelfile. Use the callback function to override the default handler.
|
73 |
+
def create(model_name, model_path, callback=None):
|
74 |
+
try:
|
75 |
+
url = f"{BASE_URL}/api/create"
|
76 |
+
payload = {"name": model_name, "path": model_path}
|
77 |
+
|
78 |
+
# Making a POST request with the stream parameter set to True to handle streaming responses
|
79 |
+
with requests.post(url, json=payload, stream=True) as response:
|
80 |
+
response.raise_for_status()
|
81 |
+
|
82 |
+
# Iterating over the response line by line and displaying the status
|
83 |
+
for line in response.iter_lines():
|
84 |
+
if line:
|
85 |
+
# Parsing each line (JSON chunk) and extracting the status
|
86 |
+
chunk = json.loads(line)
|
87 |
+
|
88 |
+
if callback:
|
89 |
+
callback(chunk)
|
90 |
+
else:
|
91 |
+
print(f"Status: {chunk.get('status')}")
|
92 |
+
except requests.exceptions.RequestException as e:
|
93 |
+
print(f"An error occurred: {e}")
|
94 |
+
|
95 |
+
# Pull a model from a the model registry. Cancelled pulls are resumed from where they left off, and multiple
|
96 |
+
# calls to will share the same download progress. Use the callback function to override the default handler.
|
97 |
+
def pull(model_name, insecure=False, callback=None):
|
98 |
+
try:
|
99 |
+
url = f"{BASE_URL}/api/pull"
|
100 |
+
payload = {
|
101 |
+
"name": model_name,
|
102 |
+
"insecure": insecure
|
103 |
+
}
|
104 |
+
|
105 |
+
# Making a POST request with the stream parameter set to True to handle streaming responses
|
106 |
+
with requests.post(url, json=payload, stream=True) as response:
|
107 |
+
response.raise_for_status()
|
108 |
+
|
109 |
+
# Iterating over the response line by line and displaying the details
|
110 |
+
for line in response.iter_lines():
|
111 |
+
if line:
|
112 |
+
# Parsing each line (JSON chunk) and extracting the details
|
113 |
+
chunk = json.loads(line)
|
114 |
+
|
115 |
+
# If a callback function is provided, call it with the chunk
|
116 |
+
if callback:
|
117 |
+
callback(chunk)
|
118 |
+
else:
|
119 |
+
# Print the status message directly to the console
|
120 |
+
print(chunk.get('status', ''), end='', flush=True)
|
121 |
+
|
122 |
+
# If there's layer data, you might also want to print that (adjust as necessary)
|
123 |
+
if 'digest' in chunk:
|
124 |
+
print(f" - Digest: {chunk['digest']}", end='', flush=True)
|
125 |
+
print(f" - Total: {chunk['total']}", end='', flush=True)
|
126 |
+
print(f" - Completed: {chunk['completed']}", end='\n', flush=True)
|
127 |
+
else:
|
128 |
+
print()
|
129 |
+
except requests.exceptions.RequestException as e:
|
130 |
+
print(f"An error occurred: {e}")
|
131 |
+
|
132 |
+
# Push a model to the model registry. Use the callback function to override the default handler.
|
133 |
+
def push(model_name, insecure=False, callback=None):
|
134 |
+
try:
|
135 |
+
url = f"{BASE_URL}/api/push"
|
136 |
+
payload = {
|
137 |
+
"name": model_name,
|
138 |
+
"insecure": insecure
|
139 |
+
}
|
140 |
+
|
141 |
+
# Making a POST request with the stream parameter set to True to handle streaming responses
|
142 |
+
with requests.post(url, json=payload, stream=True) as response:
|
143 |
+
response.raise_for_status()
|
144 |
+
|
145 |
+
# Iterating over the response line by line and displaying the details
|
146 |
+
for line in response.iter_lines():
|
147 |
+
if line:
|
148 |
+
# Parsing each line (JSON chunk) and extracting the details
|
149 |
+
chunk = json.loads(line)
|
150 |
+
|
151 |
+
# If a callback function is provided, call it with the chunk
|
152 |
+
if callback:
|
153 |
+
callback(chunk)
|
154 |
+
else:
|
155 |
+
# Print the status message directly to the console
|
156 |
+
print(chunk.get('status', ''), end='', flush=True)
|
157 |
+
|
158 |
+
# If there's layer data, you might also want to print that (adjust as necessary)
|
159 |
+
if 'digest' in chunk:
|
160 |
+
print(f" - Digest: {chunk['digest']}", end='', flush=True)
|
161 |
+
print(f" - Total: {chunk['total']}", end='', flush=True)
|
162 |
+
print(f" - Completed: {chunk['completed']}", end='\n', flush=True)
|
163 |
+
else:
|
164 |
+
print()
|
165 |
+
except requests.exceptions.RequestException as e:
|
166 |
+
print(f"An error occurred: {e}")
|
167 |
+
|
168 |
+
# List models that are available locally.
|
169 |
+
def list():
|
170 |
+
try:
|
171 |
+
response = requests.get(f"{BASE_URL}/api/tags")
|
172 |
+
response.raise_for_status()
|
173 |
+
data = response.json()
|
174 |
+
models = data.get('models', [])
|
175 |
+
return models
|
176 |
+
|
177 |
+
except requests.exceptions.RequestException as e:
|
178 |
+
print(f"An error occurred: {e}")
|
179 |
+
return None
|
180 |
+
|
181 |
+
# Copy a model. Creates a model with another name from an existing model.
|
182 |
+
def copy(source, destination):
|
183 |
+
try:
|
184 |
+
# Create the JSON payload
|
185 |
+
payload = {
|
186 |
+
"source": source,
|
187 |
+
"destination": destination
|
188 |
+
}
|
189 |
+
|
190 |
+
response = requests.post(f"{BASE_URL}/api/copy", json=payload)
|
191 |
+
response.raise_for_status()
|
192 |
+
|
193 |
+
# If the request was successful, return a message indicating that the copy was successful
|
194 |
+
return "Copy successful"
|
195 |
+
|
196 |
+
except requests.exceptions.RequestException as e:
|
197 |
+
print(f"An error occurred: {e}")
|
198 |
+
return None
|
199 |
+
|
200 |
+
# Delete a model and its data.
|
201 |
+
def delete(model_name):
|
202 |
+
try:
|
203 |
+
url = f"{BASE_URL}/api/delete"
|
204 |
+
payload = {"name": model_name}
|
205 |
+
response = requests.delete(url, json=payload)
|
206 |
+
response.raise_for_status()
|
207 |
+
return "Delete successful"
|
208 |
+
except requests.exceptions.RequestException as e:
|
209 |
+
print(f"An error occurred: {e}")
|
210 |
+
return None
|
211 |
+
|
212 |
+
# Show info about a model.
|
213 |
+
def show(model_name):
|
214 |
+
try:
|
215 |
+
url = f"{BASE_URL}/api/show"
|
216 |
+
payload = {"name": model_name}
|
217 |
+
response = requests.post(url, json=payload)
|
218 |
+
response.raise_for_status()
|
219 |
+
|
220 |
+
# Parse the JSON response and return it
|
221 |
+
data = response.json()
|
222 |
+
return data
|
223 |
+
except requests.exceptions.RequestException as e:
|
224 |
+
print(f"An error occurred: {e}")
|
225 |
+
return None
|
226 |
+
|
227 |
+
def heartbeat():
|
228 |
+
try:
|
229 |
+
url = f"{BASE_URL}/"
|
230 |
+
response = requests.head(url)
|
231 |
+
response.raise_for_status()
|
232 |
+
return "Ollama is running"
|
233 |
+
except requests.exceptions.RequestException as e:
|
234 |
+
print(f"An error occurred: {e}")
|
235 |
+
return "Ollama is not running"
|
236 |
+
|
requirements.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
gradio
|
2 |
+
beautifulsoup4
|
3 |
+
pandas
|
4 |
+
requests
|
5 |
+
networkx
|
6 |
+
pyvis==0.3.1
|
7 |
+
spacy-llm
|
8 |
+
yachalk
|
9 |
+
langchain
|