-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.py
More file actions
115 lines (111 loc) · 4.07 KB
/
usage.py
File metadata and controls
115 lines (111 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import learning_observer_components as loc
import dash
from dash import html
import dash_bootstrap_components as dbc
app = dash.Dash(
__name__,
external_stylesheets=[
dbc.themes.MINTY,
dbc.icons.FONT_AWESOME
]
)
data={
"text": {
"student_text": {
"id": "studenttext",
"value": "Election second heart official. Source focus pay sit daughter.\nUnderstand career staff ground choose. Describe carry probably political.\nContinue require reduce piece front floor cell executive. Republican American religious would put. Maintain meet garden white value simple feel.\nHigh outside happen sing. Store car PM house around.\nSpecial west tree bed support. Trade buy dark focus situation they.\nMethod want country. Well remember across save message me. Wait miss theory head she debate from.\nMention painting art buy. Personal score explain ask sense behavior. Value really success claim dark member.\nWe apply camera. Or short you collection seat. Truth create fire remember.\nPart wish agree activity day place quality cost.\nTreat already explain day many. Require task political. Kitchen service fish physical partner analysis reach.\nWho increase action many. Per result professor cold born at.\nMiss but reality. Hit everyone why responsibility different when. Throw woman onto trial suggest.\nImage might character friend relate treatment. Mr court myself inside speak. Radio tree actually degree total stop manager.\nLittle none school you whether statement yard edge. Court tell real American.",
"label": "Student text"
}
},
'highlight': {
"coresentences": {
"id": "coresentences",
"value": [
[
0,
13
],
[
20,
25
]
],
"label": "Main ideas"
},
"extendedcoresentences": {
"id": "extendedcoresentences",
"value": [
[
16,
19
],
[
30,
53
],
],
"label": "Supporting ideas"
},
"contentsegments": {
"id": "contentsegments",
"value": [
[
55,
72
],
],
"label": "Supporting ideas"
},
},
"metrics": {
"sentences": {
"id": "sentences",
"value": 33,
"label": " sentences"
}
},
"indicators": {
"transitions": {
"id": "transitions",
"value": 81,
"label": "Transitions",
"help": "Percentile based on total number of transitions used"
},
"academiclanguage": {
"id": "academiclanguage",
"value": 8,
"label": "Academic Language",
"help": "Percentile based on percent of academic language used"
},
"sentences": {
"id": "sentences",
"value": 42,
"label": "# Sentences",
"help": "Percentile based on number of sentences"
},
"nominalreferences": {
"id": "nominalreferences",
"value": 93,
"label": "Nominal References",
"help": "Percentile based on use of nominal references"
}
}
}
shown = ['transitions', 'academiclanguage', 'sentences', 'nominalreferences', 'studenttext', 'transitionwords', 'text', 'metrics', 'indicators', 'coresentences', 'extendedcoresentences', 'highlight', 'contentsegments']
app.layout = dbc.Container(
[
loc.StudentOverviewCard(
id='student1',
name='John Doe',
data=data,
shown=shown,
class_name='w-50'
),
html.Div(id='times-clicked'),
dbc.Button('Update data', id='btn'),
html.Hr(className='my-5'),
],
fluid=True
)
if __name__ == '__main__':
app.run_server(debug=True)