JollypopChannel commited on
Commit
ee8ff1a
1 Parent(s): ca623b5

since we don't use the alert bar to inform the user that the first choice is the correct answer anymore and instead, use it as an error alert, we have to code it to show on the first choice that it's different from the other choices and indeed is the correct one

Browse files
Files changed (3) hide show
  1. 127.0.0.1.txt +33 -0
  2. __pycache__/model.cpython-310.pyc +0 -0
  3. model.py +17 -2
127.0.0.1.txt CHANGED
@@ -16,3 +16,36 @@ Visit https://scribehow.com/shared/How_to_use_T2E_Vocabulary_Exam_Generator__vyY
16
  Note: The first choice of each question is the correct answer, the rest are trick choices!
17
 
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  Note: The first choice of each question is the correct answer, the rest are trick choices!
17
 
18
 
19
+ What is the meaning of this word "computer" in this sentence "[computer] good"?
20
+ - >> a machine for performing calculations automatically
21
+ - an expert at calculation (or at operating calculating machines)
22
+
23
+ What is the meaning of this word "good" in this sentence "computer [good]"?
24
+ - >> moral excellence or admirableness
25
+ - (often used as a combining form) in a good or proper or satisfactory manner or to a high standard (`good' is a nonstandard dialectal variant for `well')
26
+ - exerting force or influence
27
+ - of moral excellence
28
+ - morally admirable
29
+ - in excellent physical condition
30
+ - generally admired
31
+ - having desirable or positive qualities especially those suitable for a thing specified
32
+ - resulting favorably
33
+ - having or showing knowledge and skill and aptitude
34
+ - promoting or enhancing well-being
35
+ - that which is pleasing or valuable or useful
36
+ - completely and absolutely (`good' is sometimes used informally for `thoroughly')
37
+ - financially sound
38
+ - tending to promote physical well-being; beneficial to health
39
+ - deserving of esteem and respect
40
+ - benefit
41
+ - having the normally expected amount
42
+ - thorough
43
+ - most suitable or right for a particular purpose
44
+ - articles of commerce
45
+ - agreeable or pleasing
46
+ - capable of pleasing
47
+ - not forged
48
+ - appealing to the mind
49
+ - not left to spoil
50
+ - with or in a close or intimate relationship
51
+
__pycache__/model.cpython-310.pyc CHANGED
Binary files a/__pycache__/model.cpython-310.pyc and b/__pycache__/model.cpython-310.pyc differ
 
model.py CHANGED
@@ -159,14 +159,29 @@ def model(passage, level):
159
  vocab, context = key4.split(" = ")
160
  sequence_to_classify = context
161
  candidate_labels = value4
162
- correct_def[key4] = []
 
 
163
  hypothesis_template = 'The meaning of [' + vocab + '] is {}.'
164
 
165
  output = classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template)
166
 
167
  # Process the score of each definition and add it to the Python dictionary, correct_def
168
  for label, score in zip(output['labels'], output['scores']):
169
- correct_def[key4].append(f"{label}")
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  return correct_def
172
 
 
159
  vocab, context = key4.split(" = ")
160
  sequence_to_classify = context
161
  candidate_labels = value4
162
+ # correct_def[key4] = []
163
+ correct_def_list = []
164
+ temp_def = []
165
  hypothesis_template = 'The meaning of [' + vocab + '] is {}.'
166
 
167
  output = classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template)
168
 
169
  # Process the score of each definition and add it to the Python dictionary, correct_def
170
  for label, score in zip(output['labels'], output['scores']):
171
+ temp_def.append(label)
172
+ # print(temp_def)
173
+ for first in range(len(temp_def)):
174
+ if first == 0:
175
+ val = f">> {temp_def[first]}"
176
+ else:
177
+ val = f"{temp_def[first]}"
178
+
179
+ correct_def_list.append(val)
180
+
181
+ print(type(key4), type(correct_def_list))
182
+ correct_def[key4] = correct_def_list
183
+
184
+ # correct_def[key4].append(f"{label}")
185
 
186
  return correct_def
187