Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,10 +17,12 @@ def index():
|
|
17 |
if set_name == 'A':
|
18 |
english = english_sentences_A[index]
|
19 |
japanese = japanese_translations_A[index]
|
|
|
20 |
else:
|
21 |
english = english_sentences_B[index]
|
22 |
japanese = japanese_translations_B[index]
|
23 |
-
|
|
|
24 |
|
25 |
@app.route('/next')
|
26 |
def next_card():
|
@@ -44,4 +46,4 @@ def prev_card():
|
|
44 |
return redirect(url_for('index', set=set_name, index=index))
|
45 |
|
46 |
if __name__ == '__main__':
|
47 |
-
app.run(debug=True,host="0.0.0.0", port=7860)
|
|
|
17 |
if set_name == 'A':
|
18 |
english = english_sentences_A[index]
|
19 |
japanese = japanese_translations_A[index]
|
20 |
+
total = len(english_sentences_A)
|
21 |
else:
|
22 |
english = english_sentences_B[index]
|
23 |
japanese = japanese_translations_B[index]
|
24 |
+
total = len(english_sentences_B)
|
25 |
+
return render_template('index.html', set_name=set_name, index=index, english=english, japanese=japanese, total=total)
|
26 |
|
27 |
@app.route('/next')
|
28 |
def next_card():
|
|
|
46 |
return redirect(url_for('index', set=set_name, index=index))
|
47 |
|
48 |
if __name__ == '__main__':
|
49 |
+
app.run(debug=True, host="0.0.0.0", port=7860)
|