kevin-pek commited on
Commit
108bb17
1 Parent(s): 7c8f585

gradio interface with haystack

Browse files
Files changed (2) hide show
  1. Data Flow Diagram.excalidraw +1338 -0
  2. main.py +55 -0
Data Flow Diagram.excalidraw ADDED
@@ -0,0 +1,1338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "excalidraw",
3
+ "version": 2,
4
+ "source": "https://excalidraw.com",
5
+ "elements": [
6
+ {
7
+ "type": "rectangle",
8
+ "version": 353,
9
+ "versionNonce": 412064510,
10
+ "isDeleted": false,
11
+ "id": "b7pxkDczcchwIbszJLfD4",
12
+ "fillStyle": "hachure",
13
+ "strokeWidth": 4,
14
+ "strokeStyle": "solid",
15
+ "roughness": 1,
16
+ "opacity": 100,
17
+ "angle": 0,
18
+ "x": 367.7243303571429,
19
+ "y": 428.81696428571433,
20
+ "strokeColor": "#000000",
21
+ "backgroundColor": "transparent",
22
+ "width": 245,
23
+ "height": 246,
24
+ "seed": 1822494526,
25
+ "groupIds": [],
26
+ "roundness": {
27
+ "type": 3
28
+ },
29
+ "boundElements": [
30
+ {
31
+ "type": "text",
32
+ "id": "RPXwlWir1Xn59OZgYVQ3H"
33
+ },
34
+ {
35
+ "id": "1VyagIK3JnMhHshHeoj6Y",
36
+ "type": "arrow"
37
+ },
38
+ {
39
+ "id": "EK8UJFziH75SqI7uiNjuw",
40
+ "type": "arrow"
41
+ }
42
+ ],
43
+ "updated": 1686123883822,
44
+ "link": null,
45
+ "locked": false
46
+ },
47
+ {
48
+ "type": "text",
49
+ "version": 379,
50
+ "versionNonce": 772414434,
51
+ "isDeleted": false,
52
+ "id": "RPXwlWir1Xn59OZgYVQ3H",
53
+ "fillStyle": "hachure",
54
+ "strokeWidth": 1,
55
+ "strokeStyle": "solid",
56
+ "roughness": 1,
57
+ "opacity": 100,
58
+ "angle": 0,
59
+ "x": 414.4423555646624,
60
+ "y": 446.81696428571433,
61
+ "strokeColor": "#000000",
62
+ "backgroundColor": "transparent",
63
+ "width": 151.56394958496094,
64
+ "height": 210,
65
+ "seed": 1135617790,
66
+ "groupIds": [],
67
+ "roundness": null,
68
+ "boundElements": [],
69
+ "updated": 1686123883822,
70
+ "link": null,
71
+ "locked": false,
72
+ "fontSize": 28,
73
+ "fontFamily": 1,
74
+ "text": "User Data\n\nPDFs\nDOCX\nPPTX\nTEX",
75
+ "textAlign": "center",
76
+ "verticalAlign": "middle",
77
+ "containerId": "b7pxkDczcchwIbszJLfD4",
78
+ "originalText": "User Data\n\nPDFs\nDOCX\nPPTX\nTEX",
79
+ "lineHeight": 1.25,
80
+ "baseline": 200
81
+ },
82
+ {
83
+ "type": "rectangle",
84
+ "version": 309,
85
+ "versionNonce": 606047038,
86
+ "isDeleted": false,
87
+ "id": "3JMJqMfpTKLeo3zoOKNFW",
88
+ "fillStyle": "hachure",
89
+ "strokeWidth": 4,
90
+ "strokeStyle": "solid",
91
+ "roughness": 1,
92
+ "opacity": 100,
93
+ "angle": 0,
94
+ "x": 920.8481522817463,
95
+ "y": 421.70424107142844,
96
+ "strokeColor": "#000000",
97
+ "backgroundColor": "transparent",
98
+ "width": 355,
99
+ "height": 248,
100
+ "seed": 1065192190,
101
+ "groupIds": [],
102
+ "roundness": {
103
+ "type": 3
104
+ },
105
+ "boundElements": [
106
+ {
107
+ "type": "text",
108
+ "id": "XCJgLVM6VIUBYBhM5nHVM"
109
+ },
110
+ {
111
+ "id": "1VyagIK3JnMhHshHeoj6Y",
112
+ "type": "arrow"
113
+ },
114
+ {
115
+ "id": "-JpT91ZVqlWSE3rCOtneJ",
116
+ "type": "arrow"
117
+ }
118
+ ],
119
+ "updated": 1686123883822,
120
+ "link": null,
121
+ "locked": false
122
+ },
123
+ {
124
+ "type": "text",
125
+ "version": 396,
126
+ "versionNonce": 35536351,
127
+ "isDeleted": false,
128
+ "id": "XCJgLVM6VIUBYBhM5nHVM",
129
+ "fillStyle": "hachure",
130
+ "strokeWidth": 1,
131
+ "strokeStyle": "solid",
132
+ "roughness": 1,
133
+ "opacity": 100,
134
+ "angle": 0,
135
+ "x": 952.916206480965,
136
+ "y": 458.20424107142844,
137
+ "strokeColor": "#000000",
138
+ "backgroundColor": "transparent",
139
+ "width": 290.8638916015625,
140
+ "height": 175,
141
+ "seed": 1375887358,
142
+ "groupIds": [],
143
+ "roundness": null,
144
+ "boundElements": [],
145
+ "updated": 1686152296772,
146
+ "link": null,
147
+ "locked": false,
148
+ "fontSize": 28,
149
+ "fontFamily": 1,
150
+ "text": "Preprocessor\nExtracts metadata \nfrom documents\n\nApache Tika",
151
+ "textAlign": "center",
152
+ "verticalAlign": "middle",
153
+ "containerId": "3JMJqMfpTKLeo3zoOKNFW",
154
+ "originalText": "Preprocessor\nExtracts metadata from documents\n\nApache Tika",
155
+ "lineHeight": 1.25,
156
+ "baseline": 165
157
+ },
158
+ {
159
+ "type": "arrow",
160
+ "version": 665,
161
+ "versionNonce": 684217278,
162
+ "isDeleted": false,
163
+ "id": "1VyagIK3JnMhHshHeoj6Y",
164
+ "fillStyle": "hachure",
165
+ "strokeWidth": 4,
166
+ "strokeStyle": "solid",
167
+ "roughness": 1,
168
+ "opacity": 100,
169
+ "angle": 0,
170
+ "x": 621.7727131931823,
171
+ "y": 552.6077510793499,
172
+ "strokeColor": "#000000",
173
+ "backgroundColor": "transparent",
174
+ "width": 289.5850660920373,
175
+ "height": 1.4030689601490849,
176
+ "seed": 184780478,
177
+ "groupIds": [],
178
+ "roundness": {
179
+ "type": 2
180
+ },
181
+ "boundElements": [],
182
+ "updated": 1686123883822,
183
+ "link": null,
184
+ "locked": false,
185
+ "startBinding": {
186
+ "elementId": "b7pxkDczcchwIbszJLfD4",
187
+ "focus": 0.0015636720616594639,
188
+ "gap": 9.048382836039423
189
+ },
190
+ "endBinding": {
191
+ "elementId": "3JMJqMfpTKLeo3zoOKNFW",
192
+ "focus": -0.07378316395119473,
193
+ "gap": 9.490372996526617
194
+ },
195
+ "lastCommittedPoint": null,
196
+ "startArrowhead": null,
197
+ "endArrowhead": "arrow",
198
+ "points": [
199
+ [
200
+ 0,
201
+ 0
202
+ ],
203
+ [
204
+ 289.5850660920373,
205
+ 1.4030689601490849
206
+ ]
207
+ ]
208
+ },
209
+ {
210
+ "type": "rectangle",
211
+ "version": 304,
212
+ "versionNonce": 1701203746,
213
+ "isDeleted": false,
214
+ "id": "wt4iNAGGyjNR3CuIkVH9N",
215
+ "fillStyle": "hachure",
216
+ "strokeWidth": 4,
217
+ "strokeStyle": "solid",
218
+ "roughness": 1,
219
+ "opacity": 100,
220
+ "angle": 0,
221
+ "x": 824.4450644841272,
222
+ "y": 340.5541294642855,
223
+ "strokeColor": "#000000",
224
+ "backgroundColor": "transparent",
225
+ "width": 1140.2583705357147,
226
+ "height": 848.6277901785713,
227
+ "seed": 144761826,
228
+ "groupIds": [],
229
+ "roundness": {
230
+ "type": 3
231
+ },
232
+ "boundElements": [],
233
+ "updated": 1686123883822,
234
+ "link": null,
235
+ "locked": false
236
+ },
237
+ {
238
+ "type": "rectangle",
239
+ "version": 575,
240
+ "versionNonce": 332667618,
241
+ "isDeleted": false,
242
+ "id": "J22jlqkSc0rEm9yDMgCuT",
243
+ "fillStyle": "hachure",
244
+ "strokeWidth": 4,
245
+ "strokeStyle": "solid",
246
+ "roughness": 1,
247
+ "opacity": 100,
248
+ "angle": 0,
249
+ "x": 1488.056183345734,
250
+ "y": 780.3056466238836,
251
+ "strokeColor": "#000000",
252
+ "backgroundColor": "transparent",
253
+ "width": 420.7855902777774,
254
+ "height": 346.9097222222222,
255
+ "seed": 765672318,
256
+ "groupIds": [],
257
+ "roundness": {
258
+ "type": 3
259
+ },
260
+ "boundElements": [
261
+ {
262
+ "type": "text",
263
+ "id": "2hwXZXG8bFrKNwxnVUQP4"
264
+ },
265
+ {
266
+ "id": "-0MJWgPI0_rWhzy-t8Ns6",
267
+ "type": "arrow"
268
+ },
269
+ {
270
+ "id": "1aqouuarBWLBwIpKAQfLf",
271
+ "type": "arrow"
272
+ }
273
+ ],
274
+ "updated": 1686123883822,
275
+ "link": null,
276
+ "locked": false
277
+ },
278
+ {
279
+ "type": "text",
280
+ "version": 614,
281
+ "versionNonce": 1463352382,
282
+ "isDeleted": false,
283
+ "id": "2hwXZXG8bFrKNwxnVUQP4",
284
+ "fillStyle": "hachure",
285
+ "strokeWidth": 1,
286
+ "strokeStyle": "solid",
287
+ "roughness": 1,
288
+ "opacity": 100,
289
+ "angle": 0,
290
+ "x": 1578.6230126032751,
291
+ "y": 866.2605077349947,
292
+ "strokeColor": "#000000",
293
+ "backgroundColor": "transparent",
294
+ "width": 239.6519317626953,
295
+ "height": 175,
296
+ "seed": 1609044158,
297
+ "groupIds": [],
298
+ "roundness": null,
299
+ "boundElements": [],
300
+ "updated": 1686123883822,
301
+ "link": null,
302
+ "locked": false,
303
+ "fontSize": 28,
304
+ "fontFamily": 1,
305
+ "text": "Vector Database\n\nMilvus\nPgvector\nElasticsearch",
306
+ "textAlign": "center",
307
+ "verticalAlign": "middle",
308
+ "containerId": "J22jlqkSc0rEm9yDMgCuT",
309
+ "originalText": "Vector Database\n\nMilvus\nPgvector\nElasticsearch",
310
+ "lineHeight": 1.25,
311
+ "baseline": 165
312
+ },
313
+ {
314
+ "type": "rectangle",
315
+ "version": 325,
316
+ "versionNonce": 617630306,
317
+ "isDeleted": false,
318
+ "id": "6yls6E8tQxE7macw6vhxQ",
319
+ "fillStyle": "hachure",
320
+ "strokeWidth": 4,
321
+ "strokeStyle": "solid",
322
+ "roughness": 1,
323
+ "opacity": 100,
324
+ "angle": 0,
325
+ "x": 888.1119869171628,
326
+ "y": 810.1126902746778,
327
+ "strokeColor": "#000000",
328
+ "backgroundColor": "transparent",
329
+ "width": 420,
330
+ "height": 334,
331
+ "seed": 151127038,
332
+ "groupIds": [],
333
+ "roundness": {
334
+ "type": 3
335
+ },
336
+ "boundElements": [
337
+ {
338
+ "type": "text",
339
+ "id": "9em--BMfFgH2xeGATfyo4"
340
+ },
341
+ {
342
+ "id": "zewGru4dg7-hvs0WH2K1T",
343
+ "type": "arrow"
344
+ },
345
+ {
346
+ "id": "-0MJWgPI0_rWhzy-t8Ns6",
347
+ "type": "arrow"
348
+ },
349
+ {
350
+ "id": "1aqouuarBWLBwIpKAQfLf",
351
+ "type": "arrow"
352
+ },
353
+ {
354
+ "id": "-JpT91ZVqlWSE3rCOtneJ",
355
+ "type": "arrow"
356
+ }
357
+ ],
358
+ "updated": 1686123883822,
359
+ "link": null,
360
+ "locked": false
361
+ },
362
+ {
363
+ "type": "text",
364
+ "version": 481,
365
+ "versionNonce": 117015742,
366
+ "isDeleted": false,
367
+ "id": "9em--BMfFgH2xeGATfyo4",
368
+ "fillStyle": "hachure",
369
+ "strokeWidth": 1,
370
+ "strokeStyle": "solid",
371
+ "roughness": 1,
372
+ "opacity": 100,
373
+ "angle": 0,
374
+ "x": 897.8560665070065,
375
+ "y": 837.1126902746778,
376
+ "strokeColor": "#000000",
377
+ "backgroundColor": "transparent",
378
+ "width": 400.5118408203125,
379
+ "height": 280,
380
+ "seed": 538166434,
381
+ "groupIds": [],
382
+ "roundness": null,
383
+ "boundElements": [],
384
+ "updated": 1686123883822,
385
+ "link": null,
386
+ "locked": false,
387
+ "fontSize": 28,
388
+ "fontFamily": 1,
389
+ "text": "Encoders (Creates Index for\nthe Database)\n\nSBERT (semantic tf-er)\nFAISS (in mem)\nHNSW\nANN (Annoy, in mem)\nBM25",
390
+ "textAlign": "center",
391
+ "verticalAlign": "middle",
392
+ "containerId": "6yls6E8tQxE7macw6vhxQ",
393
+ "originalText": "Encoders (Creates Index for the Database)\n\nSBERT (semantic tf-er)\nFAISS (in mem)\nHNSW\nANN (Annoy, in mem)\nBM25",
394
+ "lineHeight": 1.25,
395
+ "baseline": 270
396
+ },
397
+ {
398
+ "type": "text",
399
+ "version": 192,
400
+ "versionNonce": 824613346,
401
+ "isDeleted": false,
402
+ "id": "kqrjouCXz6SGF9fSBYqBg",
403
+ "fillStyle": "hachure",
404
+ "strokeWidth": 4,
405
+ "strokeStyle": "solid",
406
+ "roughness": 1,
407
+ "opacity": 100,
408
+ "angle": 0,
409
+ "x": 872.2247101314483,
410
+ "y": 358.0536624968997,
411
+ "strokeColor": "#000000",
412
+ "backgroundColor": "transparent",
413
+ "width": 160.23594665527344,
414
+ "height": 45,
415
+ "seed": 711131170,
416
+ "groupIds": [],
417
+ "roundness": null,
418
+ "boundElements": [],
419
+ "updated": 1686123883822,
420
+ "link": null,
421
+ "locked": false,
422
+ "fontSize": 36,
423
+ "fontFamily": 1,
424
+ "text": "Haystack",
425
+ "textAlign": "left",
426
+ "verticalAlign": "top",
427
+ "containerId": null,
428
+ "originalText": "Haystack",
429
+ "lineHeight": 1.25,
430
+ "baseline": 32
431
+ },
432
+ {
433
+ "type": "arrow",
434
+ "version": 994,
435
+ "versionNonce": 1301409086,
436
+ "isDeleted": false,
437
+ "id": "-JpT91ZVqlWSE3rCOtneJ",
438
+ "fillStyle": "hachure",
439
+ "strokeWidth": 4,
440
+ "strokeStyle": "solid",
441
+ "roughness": 1,
442
+ "opacity": 100,
443
+ "angle": 0,
444
+ "x": 1085.9694477489766,
445
+ "y": 681.8462648742615,
446
+ "strokeColor": "#000000",
447
+ "backgroundColor": "transparent",
448
+ "width": 1.1966632701874005,
449
+ "height": 115.56747980878049,
450
+ "seed": 582495870,
451
+ "groupIds": [],
452
+ "roundness": {
453
+ "type": 2
454
+ },
455
+ "boundElements": [],
456
+ "updated": 1686123883822,
457
+ "link": null,
458
+ "locked": false,
459
+ "startBinding": {
460
+ "elementId": "3JMJqMfpTKLeo3zoOKNFW",
461
+ "focus": 0.07712329987309789,
462
+ "gap": 12.142023802833023
463
+ },
464
+ "endBinding": {
465
+ "elementId": "6yls6E8tQxE7macw6vhxQ",
466
+ "focus": -0.042909296806605254,
467
+ "gap": 12.698945591635834
468
+ },
469
+ "lastCommittedPoint": null,
470
+ "startArrowhead": null,
471
+ "endArrowhead": "arrow",
472
+ "points": [
473
+ [
474
+ 0,
475
+ 0
476
+ ],
477
+ [
478
+ 1.1966632701874005,
479
+ 115.56747980878049
480
+ ]
481
+ ]
482
+ },
483
+ {
484
+ "type": "rectangle",
485
+ "version": 279,
486
+ "versionNonce": 2126319010,
487
+ "isDeleted": false,
488
+ "id": "iyXbiLaMXYBy-HtmWBvOo",
489
+ "fillStyle": "hachure",
490
+ "strokeWidth": 4,
491
+ "strokeStyle": "solid",
492
+ "roughness": 1,
493
+ "opacity": 100,
494
+ "angle": 0,
495
+ "x": 402.479422433036,
496
+ "y": 945.8490028986851,
497
+ "strokeColor": "#000000",
498
+ "backgroundColor": "transparent",
499
+ "width": 169,
500
+ "height": 115,
501
+ "seed": 1955233698,
502
+ "groupIds": [],
503
+ "roundness": {
504
+ "type": 3
505
+ },
506
+ "boundElements": [
507
+ {
508
+ "type": "text",
509
+ "id": "OYaABKgvwa_k0LiljW5Yb"
510
+ },
511
+ {
512
+ "id": "zewGru4dg7-hvs0WH2K1T",
513
+ "type": "arrow"
514
+ },
515
+ {
516
+ "id": "4PQgww3CeUMS8WpVB9aYk",
517
+ "type": "arrow"
518
+ }
519
+ ],
520
+ "updated": 1686123883822,
521
+ "link": null,
522
+ "locked": false
523
+ },
524
+ {
525
+ "type": "text",
526
+ "version": 321,
527
+ "versionNonce": 563975550,
528
+ "isDeleted": false,
529
+ "id": "OYaABKgvwa_k0LiljW5Yb",
530
+ "fillStyle": "hachure",
531
+ "strokeWidth": 1,
532
+ "strokeStyle": "solid",
533
+ "roughness": 1,
534
+ "opacity": 100,
535
+ "angle": 0,
536
+ "x": 438.03744397844616,
537
+ "y": 980.8490028986851,
538
+ "strokeColor": "#000000",
539
+ "backgroundColor": "transparent",
540
+ "width": 97.88395690917969,
541
+ "height": 45,
542
+ "seed": 495139170,
543
+ "groupIds": [],
544
+ "roundness": null,
545
+ "boundElements": [],
546
+ "updated": 1686123883822,
547
+ "link": null,
548
+ "locked": false,
549
+ "fontSize": 36,
550
+ "fontFamily": 1,
551
+ "text": "Query",
552
+ "textAlign": "center",
553
+ "verticalAlign": "middle",
554
+ "containerId": "iyXbiLaMXYBy-HtmWBvOo",
555
+ "originalText": "Query",
556
+ "lineHeight": 1.25,
557
+ "baseline": 32
558
+ },
559
+ {
560
+ "type": "arrow",
561
+ "version": 892,
562
+ "versionNonce": 2122986942,
563
+ "isDeleted": false,
564
+ "id": "zewGru4dg7-hvs0WH2K1T",
565
+ "fillStyle": "hachure",
566
+ "strokeWidth": 4,
567
+ "strokeStyle": "solid",
568
+ "roughness": 1,
569
+ "opacity": 100,
570
+ "angle": 0,
571
+ "x": 580.6782222057445,
572
+ "y": 994.3966234246425,
573
+ "strokeColor": "#000000",
574
+ "backgroundColor": "transparent",
575
+ "width": 300.2850219382026,
576
+ "height": 1.8820099431195558,
577
+ "seed": 1899198114,
578
+ "groupIds": [],
579
+ "roundness": {
580
+ "type": 2
581
+ },
582
+ "boundElements": [],
583
+ "updated": 1686123883823,
584
+ "link": null,
585
+ "locked": false,
586
+ "startBinding": {
587
+ "elementId": "iyXbiLaMXYBy-HtmWBvOo",
588
+ "gap": 9.198799772708469,
589
+ "focus": -0.16438005876920447
590
+ },
591
+ "endBinding": {
592
+ "elementId": "6yls6E8tQxE7macw6vhxQ",
593
+ "gap": 7.148742773215697,
594
+ "focus": -0.12195444661637078
595
+ },
596
+ "lastCommittedPoint": null,
597
+ "startArrowhead": null,
598
+ "endArrowhead": "arrow",
599
+ "points": [
600
+ [
601
+ 0,
602
+ 0
603
+ ],
604
+ [
605
+ 300.2850219382026,
606
+ 1.8820099431195558
607
+ ]
608
+ ]
609
+ },
610
+ {
611
+ "type": "arrow",
612
+ "version": 1069,
613
+ "versionNonce": 782994722,
614
+ "isDeleted": false,
615
+ "id": "-0MJWgPI0_rWhzy-t8Ns6",
616
+ "fillStyle": "hachure",
617
+ "strokeWidth": 4,
618
+ "strokeStyle": "solid",
619
+ "roughness": 1,
620
+ "opacity": 100,
621
+ "angle": 0,
622
+ "x": 1319.5066044569376,
623
+ "y": 939.000448305401,
624
+ "strokeColor": "#000000",
625
+ "backgroundColor": "transparent",
626
+ "width": 157.3723657110604,
627
+ "height": 2.984683418077111,
628
+ "seed": 1876722146,
629
+ "groupIds": [],
630
+ "roundness": {
631
+ "type": 2
632
+ },
633
+ "boundElements": [],
634
+ "updated": 1686123883823,
635
+ "link": null,
636
+ "locked": false,
637
+ "startBinding": {
638
+ "elementId": "6yls6E8tQxE7macw6vhxQ",
639
+ "focus": -0.2527547454942667,
640
+ "gap": 11.3946175397748
641
+ },
642
+ "endBinding": {
643
+ "elementId": "J22jlqkSc0rEm9yDMgCuT",
644
+ "focus": 0.04267875575963368,
645
+ "gap": 11.177213177736007
646
+ },
647
+ "lastCommittedPoint": null,
648
+ "startArrowhead": null,
649
+ "endArrowhead": "arrow",
650
+ "points": [
651
+ [
652
+ 0,
653
+ 0
654
+ ],
655
+ [
656
+ 157.3723657110604,
657
+ 2.984683418077111
658
+ ]
659
+ ]
660
+ },
661
+ {
662
+ "type": "arrow",
663
+ "version": 1078,
664
+ "versionNonce": 226020862,
665
+ "isDeleted": false,
666
+ "id": "1aqouuarBWLBwIpKAQfLf",
667
+ "fillStyle": "hachure",
668
+ "strokeWidth": 4,
669
+ "strokeStyle": "solid",
670
+ "roughness": 1,
671
+ "opacity": 100,
672
+ "angle": 0,
673
+ "x": 1472.1963245060938,
674
+ "y": 958.3225976216577,
675
+ "strokeColor": "#000000",
676
+ "backgroundColor": "transparent",
677
+ "width": 151.57340552498817,
678
+ "height": 1.2806783171292864,
679
+ "seed": 1918084286,
680
+ "groupIds": [],
681
+ "roundness": {
682
+ "type": 2
683
+ },
684
+ "boundElements": [],
685
+ "updated": 1686123883823,
686
+ "link": null,
687
+ "locked": false,
688
+ "startBinding": {
689
+ "elementId": "J22jlqkSc0rEm9yDMgCuT",
690
+ "focus": -0.03292613251715128,
691
+ "gap": 15.859858839640196
692
+ },
693
+ "endBinding": {
694
+ "elementId": "6yls6E8tQxE7macw6vhxQ",
695
+ "focus": -0.13006015555653785,
696
+ "gap": 12.510932063942846
697
+ },
698
+ "lastCommittedPoint": null,
699
+ "startArrowhead": null,
700
+ "endArrowhead": "arrow",
701
+ "points": [
702
+ [
703
+ 0,
704
+ 0
705
+ ],
706
+ [
707
+ -151.57340552498817,
708
+ -1.2806783171292864
709
+ ]
710
+ ]
711
+ },
712
+ {
713
+ "type": "text",
714
+ "version": 76,
715
+ "versionNonce": 1036097762,
716
+ "isDeleted": false,
717
+ "id": "MPkXu4Tmso68ovoKBHl46",
718
+ "fillStyle": "hachure",
719
+ "strokeWidth": 4,
720
+ "strokeStyle": "solid",
721
+ "roughness": 1,
722
+ "opacity": 100,
723
+ "angle": 0,
724
+ "x": 214.6854538690477,
725
+ "y": 872.1880095951138,
726
+ "strokeColor": "#000000",
727
+ "backgroundColor": "transparent",
728
+ "width": 584.3878173828125,
729
+ "height": 45,
730
+ "seed": 205870526,
731
+ "groupIds": [],
732
+ "roundness": null,
733
+ "boundElements": [],
734
+ "updated": 1686123883823,
735
+ "link": null,
736
+ "locked": false,
737
+ "fontSize": 36,
738
+ "fontFamily": 1,
739
+ "text": "Retrieval (QnA, Semantic Search)",
740
+ "textAlign": "left",
741
+ "verticalAlign": "top",
742
+ "containerId": null,
743
+ "originalText": "Retrieval (QnA, Semantic Search)",
744
+ "lineHeight": 1.25,
745
+ "baseline": 32
746
+ },
747
+ {
748
+ "type": "text",
749
+ "version": 199,
750
+ "versionNonce": 728391230,
751
+ "isDeleted": false,
752
+ "id": "Qgdqs9vNKTunwwTouWhb0",
753
+ "fillStyle": "hachure",
754
+ "strokeWidth": 4,
755
+ "strokeStyle": "solid",
756
+ "roughness": 1,
757
+ "opacity": 100,
758
+ "angle": 0,
759
+ "x": 367.7602306547619,
760
+ "y": 357.70884292844715,
761
+ "strokeColor": "#000000",
762
+ "backgroundColor": "transparent",
763
+ "width": 271.2239074707031,
764
+ "height": 45,
765
+ "seed": 1449124542,
766
+ "groupIds": [],
767
+ "roundness": null,
768
+ "boundElements": [],
769
+ "updated": 1686123883823,
770
+ "link": null,
771
+ "locked": false,
772
+ "fontSize": 36,
773
+ "fontFamily": 1,
774
+ "text": "Data Ingesting",
775
+ "textAlign": "left",
776
+ "verticalAlign": "top",
777
+ "containerId": null,
778
+ "originalText": "Data Ingesting",
779
+ "lineHeight": 1.25,
780
+ "baseline": 32
781
+ },
782
+ {
783
+ "type": "rectangle",
784
+ "version": 160,
785
+ "versionNonce": 1570778274,
786
+ "isDeleted": false,
787
+ "id": "k2CnsPZWHyeDkXgJrsBlr",
788
+ "fillStyle": "hachure",
789
+ "strokeWidth": 4,
790
+ "strokeStyle": "solid",
791
+ "roughness": 1,
792
+ "opacity": 100,
793
+ "angle": 0,
794
+ "x": -270.83038039434496,
795
+ "y": 394.2065294053817,
796
+ "strokeColor": "#000000",
797
+ "backgroundColor": "transparent",
798
+ "width": 435.6138392857142,
799
+ "height": 699.4363839285713,
800
+ "seed": 1309730942,
801
+ "groupIds": [],
802
+ "roundness": {
803
+ "type": 3
804
+ },
805
+ "boundElements": [
806
+ {
807
+ "type": "text",
808
+ "id": "Uj-mc_MUovWhwyFHNYovn"
809
+ },
810
+ {
811
+ "id": "EK8UJFziH75SqI7uiNjuw",
812
+ "type": "arrow"
813
+ },
814
+ {
815
+ "id": "4PQgww3CeUMS8WpVB9aYk",
816
+ "type": "arrow"
817
+ }
818
+ ],
819
+ "updated": 1686123883823,
820
+ "link": null,
821
+ "locked": false
822
+ },
823
+ {
824
+ "type": "text",
825
+ "version": 118,
826
+ "versionNonce": 911240895,
827
+ "isDeleted": false,
828
+ "id": "Uj-mc_MUovWhwyFHNYovn",
829
+ "fillStyle": "hachure",
830
+ "strokeWidth": 1,
831
+ "strokeStyle": "solid",
832
+ "roughness": 1,
833
+ "opacity": 100,
834
+ "angle": 0,
835
+ "x": -215.16741216750347,
836
+ "y": 608.9247213696674,
837
+ "strokeColor": "#000000",
838
+ "backgroundColor": "transparent",
839
+ "width": 324.28790283203125,
840
+ "height": 270,
841
+ "seed": 648440126,
842
+ "groupIds": [],
843
+ "roundness": null,
844
+ "boundElements": [],
845
+ "updated": 1686152362705,
846
+ "link": null,
847
+ "locked": false,
848
+ "fontSize": 36,
849
+ "fontFamily": 1,
850
+ "text": "Desktop/Web\nApplication\n\nCan be any cross \nplatform or web \nframework",
851
+ "textAlign": "center",
852
+ "verticalAlign": "middle",
853
+ "containerId": "k2CnsPZWHyeDkXgJrsBlr",
854
+ "originalText": "Desktop/Web\nApplication\n\nCan be any cross platform or web framework",
855
+ "lineHeight": 1.25,
856
+ "baseline": 257
857
+ },
858
+ {
859
+ "type": "arrow",
860
+ "version": 327,
861
+ "versionNonce": 1945520226,
862
+ "isDeleted": false,
863
+ "id": "EK8UJFziH75SqI7uiNjuw",
864
+ "fillStyle": "hachure",
865
+ "strokeWidth": 4,
866
+ "strokeStyle": "solid",
867
+ "roughness": 1,
868
+ "opacity": 100,
869
+ "angle": 0,
870
+ "x": 179.0803338913695,
871
+ "y": 561.2444942991496,
872
+ "strokeColor": "#000000",
873
+ "backgroundColor": "transparent",
874
+ "width": 178.55561755952363,
875
+ "height": 2.644754493833375,
876
+ "seed": 199703422,
877
+ "groupIds": [],
878
+ "roundness": {
879
+ "type": 2
880
+ },
881
+ "boundElements": [],
882
+ "updated": 1686123883823,
883
+ "link": null,
884
+ "locked": false,
885
+ "startBinding": {
886
+ "elementId": "k2CnsPZWHyeDkXgJrsBlr",
887
+ "focus": -0.507623074443353,
888
+ "gap": 14.296875000000227
889
+ },
890
+ "endBinding": {
891
+ "elementId": "b7pxkDczcchwIbszJLfD4",
892
+ "focus": -0.03860838532454731,
893
+ "gap": 10.088378906249773
894
+ },
895
+ "lastCommittedPoint": null,
896
+ "startArrowhead": null,
897
+ "endArrowhead": "arrow",
898
+ "points": [
899
+ [
900
+ 0,
901
+ 0
902
+ ],
903
+ [
904
+ 178.55561755952363,
905
+ -2.644754493833375
906
+ ]
907
+ ]
908
+ },
909
+ {
910
+ "type": "arrow",
911
+ "version": 62,
912
+ "versionNonce": 599418558,
913
+ "isDeleted": false,
914
+ "id": "4PQgww3CeUMS8WpVB9aYk",
915
+ "fillStyle": "hachure",
916
+ "strokeWidth": 4,
917
+ "strokeStyle": "solid",
918
+ "roughness": 1,
919
+ "opacity": 100,
920
+ "angle": 0,
921
+ "x": 175.28569103422657,
922
+ "y": 1002.6973746892165,
923
+ "strokeColor": "#000000",
924
+ "backgroundColor": "transparent",
925
+ "width": 218.84858630952377,
926
+ "height": 2.2294232810793346,
927
+ "seed": 776191394,
928
+ "groupIds": [],
929
+ "roundness": {
930
+ "type": 2
931
+ },
932
+ "boundElements": [],
933
+ "updated": 1686123883823,
934
+ "link": null,
935
+ "locked": false,
936
+ "startBinding": {
937
+ "elementId": "k2CnsPZWHyeDkXgJrsBlr",
938
+ "focus": 0.72867463147048,
939
+ "gap": 10.502232142857338
940
+ },
941
+ "endBinding": {
942
+ "elementId": "iyXbiLaMXYBy-HtmWBvOo",
943
+ "focus": -0.04324158834028842,
944
+ "gap": 8.34514508928578
945
+ },
946
+ "lastCommittedPoint": null,
947
+ "startArrowhead": null,
948
+ "endArrowhead": "arrow",
949
+ "points": [
950
+ [
951
+ 0,
952
+ 0
953
+ ],
954
+ [
955
+ 218.84858630952377,
956
+ 2.2294232810793346
957
+ ]
958
+ ]
959
+ },
960
+ {
961
+ "id": "XLD_CHZjm1VGui922OvT3",
962
+ "type": "text",
963
+ "x": -240.00684175037122,
964
+ "y": -135.90442669580824,
965
+ "width": 880.9190418243402,
966
+ "height": 100.96728752682807,
967
+ "angle": 0,
968
+ "strokeColor": "#1e1e1e",
969
+ "backgroundColor": "#ffc9c9",
970
+ "fillStyle": "hachure",
971
+ "strokeWidth": 4,
972
+ "strokeStyle": "solid",
973
+ "roughness": 1,
974
+ "opacity": 100,
975
+ "groupIds": [],
976
+ "roundness": null,
977
+ "seed": 74490257,
978
+ "version": 206,
979
+ "versionNonce": 1379886431,
980
+ "isDeleted": false,
981
+ "boundElements": null,
982
+ "updated": 1686152291537,
983
+ "link": null,
984
+ "locked": false,
985
+ "text": "Possible Architectures",
986
+ "fontSize": 80.77383002146237,
987
+ "fontFamily": 1,
988
+ "textAlign": "left",
989
+ "verticalAlign": "top",
990
+ "baseline": 71.00000000000011,
991
+ "containerId": null,
992
+ "originalText": "Possible Architectures",
993
+ "lineHeight": 1.25
994
+ },
995
+ {
996
+ "id": "cknJXduAcHHVgiokCQJl9",
997
+ "type": "text",
998
+ "x": -200.62402925037122,
999
+ "y": 186.5179365854417,
1000
+ "width": 840.3793682734175,
1001
+ "height": 73.11718750000001,
1002
+ "angle": 0,
1003
+ "strokeColor": "#1e1e1e",
1004
+ "backgroundColor": "#ffc9c9",
1005
+ "fillStyle": "hachure",
1006
+ "strokeWidth": 4,
1007
+ "strokeStyle": "solid",
1008
+ "roughness": 1,
1009
+ "opacity": 100,
1010
+ "groupIds": [],
1011
+ "roundness": null,
1012
+ "seed": 417436191,
1013
+ "version": 124,
1014
+ "versionNonce": 347582833,
1015
+ "isDeleted": false,
1016
+ "boundElements": null,
1017
+ "updated": 1686152322739,
1018
+ "link": null,
1019
+ "locked": false,
1020
+ "text": "Serverless API, cloud service",
1021
+ "fontSize": 58.49375000000004,
1022
+ "fontFamily": 1,
1023
+ "textAlign": "left",
1024
+ "verticalAlign": "top",
1025
+ "baseline": 50.99999999999996,
1026
+ "containerId": null,
1027
+ "originalText": "Serverless API, cloud service",
1028
+ "lineHeight": 1.25
1029
+ },
1030
+ {
1031
+ "id": "p6fDcBnze9bghfsVNikUp",
1032
+ "type": "text",
1033
+ "x": -155.9755917503711,
1034
+ "y": 1301.1263350229415,
1035
+ "width": 616.8109197616585,
1036
+ "height": 67.6328125000001,
1037
+ "angle": 0,
1038
+ "strokeColor": "#1e1e1e",
1039
+ "backgroundColor": "#ffc9c9",
1040
+ "fillStyle": "hachure",
1041
+ "strokeWidth": 4,
1042
+ "strokeStyle": "solid",
1043
+ "roughness": 1,
1044
+ "opacity": 100,
1045
+ "groupIds": [],
1046
+ "roundness": null,
1047
+ "seed": 2031929649,
1048
+ "version": 71,
1049
+ "versionNonce": 377734911,
1050
+ "isDeleted": false,
1051
+ "boundElements": null,
1052
+ "updated": 1686152340018,
1053
+ "link": null,
1054
+ "locked": false,
1055
+ "text": "Fully Native Application",
1056
+ "fontSize": 54.10625000000007,
1057
+ "fontFamily": 1,
1058
+ "textAlign": "left",
1059
+ "verticalAlign": "top",
1060
+ "baseline": 47.000000000000014,
1061
+ "containerId": null,
1062
+ "originalText": "Fully Native Application",
1063
+ "lineHeight": 1.25
1064
+ },
1065
+ {
1066
+ "id": "9nD5Kmsc66eWPTCtuItxf",
1067
+ "type": "rectangle",
1068
+ "x": -193.686529250371,
1069
+ "y": 1410.2996748666915,
1070
+ "width": 1415.1093749999995,
1071
+ "height": 1010.7343750000001,
1072
+ "angle": 0,
1073
+ "strokeColor": "#1e1e1e",
1074
+ "backgroundColor": "transparent",
1075
+ "fillStyle": "hachure",
1076
+ "strokeWidth": 4,
1077
+ "strokeStyle": "solid",
1078
+ "roughness": 1,
1079
+ "opacity": 100,
1080
+ "groupIds": [],
1081
+ "roundness": {
1082
+ "type": 3
1083
+ },
1084
+ "seed": 920662609,
1085
+ "version": 93,
1086
+ "versionNonce": 1891433041,
1087
+ "isDeleted": false,
1088
+ "boundElements": [],
1089
+ "updated": 1686152577220,
1090
+ "link": null,
1091
+ "locked": false
1092
+ },
1093
+ {
1094
+ "id": "aMcwXbbSlBsMXY7WDb1WP",
1095
+ "type": "rectangle",
1096
+ "x": -140.0693417503711,
1097
+ "y": 1540.8465498666912,
1098
+ "width": 479,
1099
+ "height": 332,
1100
+ "angle": 0,
1101
+ "strokeColor": "#1e1e1e",
1102
+ "backgroundColor": "transparent",
1103
+ "fillStyle": "hachure",
1104
+ "strokeWidth": 4,
1105
+ "strokeStyle": "solid",
1106
+ "roughness": 1,
1107
+ "opacity": 100,
1108
+ "groupIds": [],
1109
+ "roundness": {
1110
+ "type": 3
1111
+ },
1112
+ "seed": 239065919,
1113
+ "version": 92,
1114
+ "versionNonce": 874992721,
1115
+ "isDeleted": false,
1116
+ "boundElements": [
1117
+ {
1118
+ "type": "text",
1119
+ "id": "H94xIN-iTX0TKY4Fdqqr7"
1120
+ }
1121
+ ],
1122
+ "updated": 1686152548582,
1123
+ "link": null,
1124
+ "locked": false
1125
+ },
1126
+ {
1127
+ "id": "H94xIN-iTX0TKY4Fdqqr7",
1128
+ "type": "text",
1129
+ "x": -117.10928926013673,
1130
+ "y": 1661.8465498666912,
1131
+ "width": 433.07989501953125,
1132
+ "height": 90,
1133
+ "angle": 0,
1134
+ "strokeColor": "#1e1e1e",
1135
+ "backgroundColor": "transparent",
1136
+ "fillStyle": "hachure",
1137
+ "strokeWidth": 4,
1138
+ "strokeStyle": "solid",
1139
+ "roughness": 1,
1140
+ "opacity": 100,
1141
+ "groupIds": [],
1142
+ "roundness": null,
1143
+ "seed": 1975898687,
1144
+ "version": 93,
1145
+ "versionNonce": 65246527,
1146
+ "isDeleted": false,
1147
+ "boundElements": null,
1148
+ "updated": 1686152548583,
1149
+ "link": null,
1150
+ "locked": false,
1151
+ "text": "MAUI for Native Cross \nPlatform",
1152
+ "fontSize": 36,
1153
+ "fontFamily": 1,
1154
+ "textAlign": "center",
1155
+ "verticalAlign": "middle",
1156
+ "baseline": 77,
1157
+ "containerId": "aMcwXbbSlBsMXY7WDb1WP",
1158
+ "originalText": "MAUI for Native Cross Platform",
1159
+ "lineHeight": 1.25
1160
+ },
1161
+ {
1162
+ "id": "M5wxK_BMQQ4Xi63hZpgBT",
1163
+ "type": "text",
1164
+ "x": -74.88965425037111,
1165
+ "y": 1460.0340498666915,
1166
+ "width": 281.77191162109375,
1167
+ "height": 45,
1168
+ "angle": 0,
1169
+ "strokeColor": "#1e1e1e",
1170
+ "backgroundColor": "transparent",
1171
+ "fillStyle": "hachure",
1172
+ "strokeWidth": 4,
1173
+ "strokeStyle": "solid",
1174
+ "roughness": 1,
1175
+ "opacity": 100,
1176
+ "groupIds": [],
1177
+ "roundness": null,
1178
+ "seed": 177592977,
1179
+ "version": 15,
1180
+ "versionNonce": 1726060465,
1181
+ "isDeleted": false,
1182
+ "boundElements": null,
1183
+ "updated": 1686152399643,
1184
+ "link": null,
1185
+ "locked": false,
1186
+ "text": ".NET Framework",
1187
+ "fontSize": 36,
1188
+ "fontFamily": 1,
1189
+ "textAlign": "left",
1190
+ "verticalAlign": "top",
1191
+ "baseline": 32,
1192
+ "containerId": null,
1193
+ "originalText": ".NET Framework",
1194
+ "lineHeight": 1.25
1195
+ },
1196
+ {
1197
+ "id": "ueSFRdb3iaD6B8oxX-_m5",
1198
+ "type": "rectangle",
1199
+ "x": 539.8525332496286,
1200
+ "y": 1945.3699873666908,
1201
+ "width": 545,
1202
+ "height": 357,
1203
+ "angle": 0,
1204
+ "strokeColor": "#1e1e1e",
1205
+ "backgroundColor": "transparent",
1206
+ "fillStyle": "hachure",
1207
+ "strokeWidth": 4,
1208
+ "strokeStyle": "solid",
1209
+ "roughness": 1,
1210
+ "opacity": 100,
1211
+ "groupIds": [],
1212
+ "roundness": {
1213
+ "type": 3
1214
+ },
1215
+ "seed": 1468510751,
1216
+ "version": 189,
1217
+ "versionNonce": 1669326705,
1218
+ "isDeleted": false,
1219
+ "boundElements": [
1220
+ {
1221
+ "type": "text",
1222
+ "id": "Wjjh4s9oU_xhIrWtWIFxF"
1223
+ }
1224
+ ],
1225
+ "updated": 1686153281266,
1226
+ "link": null,
1227
+ "locked": false
1228
+ },
1229
+ {
1230
+ "id": "Wjjh4s9oU_xhIrWtWIFxF",
1231
+ "type": "text",
1232
+ "x": 602.886590866816,
1233
+ "y": 2056.369987366691,
1234
+ "width": 418.931884765625,
1235
+ "height": 135,
1236
+ "angle": 0,
1237
+ "strokeColor": "#1e1e1e",
1238
+ "backgroundColor": "transparent",
1239
+ "fillStyle": "hachure",
1240
+ "strokeWidth": 4,
1241
+ "strokeStyle": "solid",
1242
+ "roughness": 1,
1243
+ "opacity": 100,
1244
+ "groupIds": [],
1245
+ "roundness": null,
1246
+ "seed": 12769375,
1247
+ "version": 304,
1248
+ "versionNonce": 433114641,
1249
+ "isDeleted": false,
1250
+ "boundElements": null,
1251
+ "updated": 1686153429461,
1252
+ "link": null,
1253
+ "locked": false,
1254
+ "text": "FAISSSharp/FAISSMask\nHNSW\nSBert ONNX model",
1255
+ "fontSize": 36,
1256
+ "fontFamily": 1,
1257
+ "textAlign": "center",
1258
+ "verticalAlign": "middle",
1259
+ "baseline": 122,
1260
+ "containerId": "ueSFRdb3iaD6B8oxX-_m5",
1261
+ "originalText": "FAISSSharp/FAISSMask\nHNSW\nSBert ONNX model",
1262
+ "lineHeight": 1.25
1263
+ },
1264
+ {
1265
+ "id": "oVpSnp_-z_Q3QbkS6_y_G",
1266
+ "type": "rectangle",
1267
+ "x": 519.0556582496286,
1268
+ "y": 1522.8465498666915,
1269
+ "width": 613.3984374999998,
1270
+ "height": 335.9453125,
1271
+ "angle": 0,
1272
+ "strokeColor": "#1e1e1e",
1273
+ "backgroundColor": "transparent",
1274
+ "fillStyle": "hachure",
1275
+ "strokeWidth": 4,
1276
+ "strokeStyle": "solid",
1277
+ "roughness": 1,
1278
+ "opacity": 100,
1279
+ "groupIds": [],
1280
+ "roundness": {
1281
+ "type": 3
1282
+ },
1283
+ "seed": 987409713,
1284
+ "version": 61,
1285
+ "versionNonce": 36928945,
1286
+ "isDeleted": false,
1287
+ "boundElements": [
1288
+ {
1289
+ "type": "text",
1290
+ "id": "xxaEPY9T0qU1Y0Tj-SH5c"
1291
+ }
1292
+ ],
1293
+ "updated": 1686152551280,
1294
+ "link": null,
1295
+ "locked": false
1296
+ },
1297
+ {
1298
+ "id": "xxaEPY9T0qU1Y0Tj-SH5c",
1299
+ "type": "text",
1300
+ "x": 564.7369326636909,
1301
+ "y": 1600.8192061166915,
1302
+ "width": 522.035888671875,
1303
+ "height": 180,
1304
+ "angle": 0,
1305
+ "strokeColor": "#1e1e1e",
1306
+ "backgroundColor": "transparent",
1307
+ "fillStyle": "hachure",
1308
+ "strokeWidth": 4,
1309
+ "strokeStyle": "solid",
1310
+ "roughness": 1,
1311
+ "opacity": 100,
1312
+ "groupIds": [],
1313
+ "roundness": null,
1314
+ "seed": 1960999999,
1315
+ "version": 123,
1316
+ "versionNonce": 1358775871,
1317
+ "isDeleted": false,
1318
+ "boundElements": null,
1319
+ "updated": 1686152605639,
1320
+ "link": null,
1321
+ "locked": false,
1322
+ "text": "Tikaondotnet\n\nTika binding for .NET using\nIKVM (Java binding for .NET)",
1323
+ "fontSize": 36,
1324
+ "fontFamily": 1,
1325
+ "textAlign": "center",
1326
+ "verticalAlign": "middle",
1327
+ "baseline": 167,
1328
+ "containerId": "oVpSnp_-z_Q3QbkS6_y_G",
1329
+ "originalText": "Tikaondotnet\n\nTika binding for .NET using\nIKVM (Java binding for .NET)",
1330
+ "lineHeight": 1.25
1331
+ }
1332
+ ],
1333
+ "appState": {
1334
+ "gridSize": null,
1335
+ "viewBackgroundColor": "#ffffff"
1336
+ },
1337
+ "files": {}
1338
+ }
main.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from haystack.nodes import PreProcessor, PDFToTextConverter, EmbeddingRetriever
2
+ from haystack.document_stores import InMemoryDocumentStore
3
+ from haystack.pipelines import DocumentSearchPipeline
4
+ import gradio as gr
5
+
6
+ preprocessor = PreProcessor(
7
+ clean_empty_lines=True,
8
+ clean_whitespace=True,
9
+ clean_header_footer=True,
10
+ split_by="word",
11
+ split_length=100,
12
+ split_respect_sentence_boundary=True,
13
+ split_overlap=3
14
+ )
15
+ document_store = InMemoryDocumentStore()
16
+ retriever = EmbeddingRetriever(document_store=document_store, embedding_model="sentence-transformers/all-MiniLM-L6-v2")
17
+ pipeline = DocumentSearchPipeline(retriever)
18
+
19
+ def print_answers(results):
20
+ fields = ["answer", "score"] # "context"
21
+ answers = results["answers"]
22
+ filtered_answers = []
23
+ for ans in answers:
24
+ filtered_ans = {
25
+ field: getattr(ans, field) for field in fields if getattr(ans, field) is not None
26
+ }
27
+ filtered_answers.append(filtered_ans)
28
+ return filtered_answers
29
+
30
+ def write_pdf(pdf_file):
31
+ converter = PDFToTextConverter(remove_numeric_tables=True, valid_languages=["en"])
32
+ document = converter.convert(file_path=pdf_file.name, meta=None)[0]
33
+ preprocessed_docs = preprocessor.process(document)
34
+ document_store.write_documents(preprocessed_docs)
35
+
36
+ def predict(question, pdf_file):
37
+ print("Start processing pdf")
38
+ write_pdf(pdf_file)
39
+ print("Processing done.")
40
+ result = pipeline.run(query=question, params={"Retriever": { "top_k": 2 }})
41
+ answers = print_answers(result)
42
+ return answers
43
+
44
+ title = "Search"
45
+ interface = gr.Interface(
46
+ fn=predict,
47
+ inputs=[gr.components.Textbox(lines = 3, label="Ask an open question!"),gr.components.File(file_count="single", type="file", label="Upload a pdf")],
48
+ outputs="text",
49
+ title=title,
50
+ flagging_options=["top", "medium", "bad"],
51
+ interpretation="default",
52
+ theme="default" # “default", “huggingface", “dark-grass", “peach"
53
+ )
54
+
55
+ interface.launch()