victormiller commited on
Commit
41451ff
1 Parent(s): d594e25

Update results.py

Browse files
Files changed (1) hide show
  1. results.py +35 -1
results.py CHANGED
@@ -381,6 +381,40 @@ fig.update_layout(
381
  # Show the figure
382
  llama_graph1 = fig
383
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
 
385
  intro_div = Div(
386
  H2("Perplexity Evaluation on Duplicate Data"),
@@ -444,7 +478,7 @@ llama_div = Div(
444
  Section(
445
  H3("Perplexity vs Years"),
446
  Img(src="images/prep-across-diff-years-global.png", height = "300", width = "600" ),
447
- #plotly2fasthtml(llama_graph1),
448
  ),
449
  Section(
450
  H3("Perplexity vs Dump Duplication"),
 
381
  # Show the figure
382
  llama_graph1 = fig
383
 
384
+ ##llama graph 2
385
+
386
+ import plotly.graph_objects as go
387
+
388
+ # Data for different years and buckets
389
+ data = {
390
+ "1-1": [10.036774097041135, 9.46310273785878, 9.41413706166537, 9.50318602661455, 9.007669062339426, 8.388255660116407, 10.112246017864624, 10.239269162661959, 9.931951075969451, 8.646614152066428],
391
+ "2-5": [9.306693996275795, 8.763464863196129, 8.645126825996691, 9.473904977192573, 10.95829859145081, 10.676105294328789, 10.255251179892559, 9.54987953569235, 9.12737570591033, 8.806922449908505],
392
+ "6-10": [9.442327622499175, 9.075851726027564, 9.527148465147846, 9.755998086072951, 10.128151243953157, 9.728353939624842, 9.233548505479437, 9.067380903629866, 8.995868137602248, 8.816629232137835],
393
+ "11-100": [9.015408185880002, 8.868392446242012, 9.120345162203675, 8.968012141869462, 9.451949410987668, 9.381837094065533, 9.25131862646364, 9.014261939731549, 9.00805668763514, 8.995152677487027],
394
+ "101-1000": [9.94583162297666, 9.113560631617027, 8.9228845723255, 8.895860780054043, 8.863879736723902, 8.401723232809463, 8.458532176757009, 8.14345667720481, 7.882044010499616, 7.737747701620713],
395
+ "1001-30000000": [9.141712571508352, 8.037411460181893, 9.14052983061081, 8.757970647106037, 8.440366034517687, 7.5705604983353325, 7.4808205167223525, 7.312019290288715, 7.538858258386088, 6.77703951001925]
396
+ }
397
+
398
+ # Years
399
+ years = ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"]
400
+
401
+ # Create the figure
402
+ fig = go.Figure()
403
+
404
+ # Add lines for each bucket
405
+ for bucket, perplexities in data.items():
406
+ fig.add_trace(go.Scatter(x=years, y=perplexities, mode='lines+markers', name=bucket))
407
+
408
+ # Update layout
409
+ fig.update_layout(
410
+ title="Perplexity Across Different Years (Global)",
411
+ xaxis_title="Year",
412
+ yaxis_title="Average Perplexity",
413
+ legend_title="Bucket (duplicate count range)"
414
+ )
415
+
416
+ # Show the figure
417
+ llama_graph2 = fig
418
 
419
  intro_div = Div(
420
  H2("Perplexity Evaluation on Duplicate Data"),
 
478
  Section(
479
  H3("Perplexity vs Years"),
480
  Img(src="images/prep-across-diff-years-global.png", height = "300", width = "600" ),
481
+ plotly2fasthtml(llama_graph2),
482
  ),
483
  Section(
484
  H3("Perplexity vs Dump Duplication"),