Spaces:
Runtime error
Runtime error
JollypopChannel
commited on
Commit
•
f63f8bc
1
Parent(s):
8ca1e3e
correct grammartical error of the sentence (question) when generating exam question
Browse files- app.py +1 -1
- templates/result.html +1 -1
app.py
CHANGED
@@ -49,7 +49,7 @@ def process():
|
|
49 |
vvocab, sentence = key.split(" = ")
|
50 |
# print(f'What does the word "{vvocab}" means in this sentence "{sentence}"?')
|
51 |
with open(T2E_exam, "a") as file:
|
52 |
-
file.write(f'What is the meaning of
|
53 |
|
54 |
for choice in value:
|
55 |
# print(f"- {choice}")
|
|
|
49 |
vvocab, sentence = key.split(" = ")
|
50 |
# print(f'What does the word "{vvocab}" means in this sentence "{sentence}"?')
|
51 |
with open(T2E_exam, "a") as file:
|
52 |
+
file.write(f'What is the meaning of the word "{vvocab}" in this sentence "{sentence}"?\n')
|
53 |
|
54 |
for choice in value:
|
55 |
# print(f"- {choice}")
|
templates/result.html
CHANGED
@@ -192,7 +192,7 @@
|
|
192 |
</div>
|
193 |
{% endif %}
|
194 |
{% for key, values in output.items() %}
|
195 |
-
<h2 class="question">What is the meaning of
|
196 |
<ul>
|
197 |
{% for value in values %}
|
198 |
<li class="choice">{{ value }}</li>
|
|
|
192 |
</div>
|
193 |
{% endif %}
|
194 |
{% for key, values in output.items() %}
|
195 |
+
<h2 class="question">What is the meaning of the word "{{ key.split(' = ')[0] }}" in this sentence "{{ key.split(' = ')[1] }}"?</h2>
|
196 |
<ul>
|
197 |
{% for value in values %}
|
198 |
<li class="choice">{{ value }}</li>
|