Spaces:
Running
Running
victormiller
commited on
Commit
•
12aa2bb
1
Parent(s):
5d4fe34
Update results.py
Browse files- results.py +46 -27
results.py
CHANGED
@@ -422,50 +422,69 @@ llama_graph2 = fig
|
|
422 |
#llama graph 4
|
423 |
|
424 |
# Data for different buckets and years
|
|
|
|
|
|
|
425 |
data = {
|
426 |
-
"
|
427 |
-
"
|
428 |
-
"perplexities": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
},
|
430 |
-
"
|
431 |
-
"
|
432 |
-
"perplexities": [
|
433 |
},
|
434 |
-
"
|
435 |
-
"
|
436 |
-
"perplexities": [9.
|
437 |
},
|
438 |
-
"
|
439 |
-
"
|
440 |
-
"perplexities": [9.
|
441 |
},
|
442 |
-
"
|
443 |
-
"
|
444 |
-
"perplexities": [9.
|
445 |
},
|
446 |
-
"
|
447 |
-
"
|
448 |
-
"perplexities": [
|
449 |
}
|
450 |
}
|
451 |
|
452 |
# Create figure
|
453 |
-
|
454 |
|
455 |
-
# Add traces for each
|
456 |
-
for
|
457 |
-
|
458 |
|
459 |
# Update layout
|
460 |
-
|
461 |
-
title="Perplexity Across Different
|
462 |
-
xaxis_title="
|
463 |
yaxis_title="Average Perplexity",
|
464 |
-
legend_title="
|
465 |
)
|
466 |
|
467 |
# Show the figure
|
468 |
-
llama_graph4 =
|
469 |
|
470 |
##llama graph 5
|
471 |
|
|
|
422 |
#llama graph 4
|
423 |
|
424 |
# Data for different buckets and years
|
425 |
+
import plotly.graph_objects as go
|
426 |
+
|
427 |
+
# Data for different years and buckets
|
428 |
data = {
|
429 |
+
"2014": {
|
430 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
431 |
+
"perplexities": [9.276942939297756, 8.69938211424056, 8.158271167692497, 8.367670702299348, 6.583755343348351, 7.497674909399879]
|
432 |
+
},
|
433 |
+
"2015": {
|
434 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
435 |
+
"perplexities": [9.103981560121444, 8.198551019737206, 8.17752561770772, 8.233928498586414, 6.517481691960036, 7.3736492145399355]
|
436 |
+
},
|
437 |
+
"2016": {
|
438 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
439 |
+
"perplexities": [9.023271012270133, 8.067050538323626, 8.150103850870096, 8.232721560484496, 6.3749350052179015, 7.350697996200808]
|
440 |
+
},
|
441 |
+
"2017": {
|
442 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
443 |
+
"perplexities": [9.129487810210167, 8.290815319993621, 7.878257519772607, 7.98292071692709, 6.524893452272168, 6.918924770013169]
|
444 |
+
},
|
445 |
+
"2018": {
|
446 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
447 |
+
"perplexities": [9.213411471804902, 7.89026459259236, 7.403516159589743, 7.556076611087452, 6.6509342133282745, 6.493818412135467]
|
448 |
},
|
449 |
+
"2019": {
|
450 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
451 |
+
"perplexities": [8.96407327327958, 7.628975687395983, 7.036189728869401, 6.6349379440939895, 6.446837262269017, 6.086615106309735]
|
452 |
},
|
453 |
+
"2020": {
|
454 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
455 |
+
"perplexities": [9.137673180826452, 7.794611238323424, 7.059198583303955, 6.82070782491814, 6.64418110544852, 6.271177318179787]
|
456 |
},
|
457 |
+
"2021": {
|
458 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
459 |
+
"perplexities": [9.178752781806578, 7.70543845537127, 6.698443323550492, 6.472409310902069, 7.307749809853384, 6.782598533191676]
|
460 |
},
|
461 |
+
"2022": {
|
462 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
463 |
+
"perplexities": [9.096031774523855, 7.652072280274248, 6.615135590934534, 6.239500427643811, 6.787412545253696, 6.99638904682498]
|
464 |
},
|
465 |
+
"2023": {
|
466 |
+
"buckets": ["1-1", "2-5", "6-10", "11-100", "101-1000", "1001-30000000"],
|
467 |
+
"perplexities": [8.728460642325789, 7.561677894180029, 6.194391269071906, 5.775947387872692, 6.054439209079063, 5.3384410032299]
|
468 |
}
|
469 |
}
|
470 |
|
471 |
# Create figure
|
472 |
+
fig = go.Figure()
|
473 |
|
474 |
+
# Add traces for each year
|
475 |
+
for year, year_data in data.items():
|
476 |
+
fig.add_trace(go.Scatter(x=year_data["buckets"], y=year_data["perplexities"], mode='lines+markers', name=year))
|
477 |
|
478 |
# Update layout
|
479 |
+
fig.update_layout(
|
480 |
+
title="Perplexity Across Different Buckets (Local)",
|
481 |
+
xaxis_title="Bucket (Duplicate Count Range)",
|
482 |
yaxis_title="Average Perplexity",
|
483 |
+
legend_title="Year"
|
484 |
)
|
485 |
|
486 |
# Show the figure
|
487 |
+
llama_graph4 = fig
|
488 |
|
489 |
##llama graph 5
|
490 |
|