mou3az commited on
Commit
e577e73
1 Parent(s): c3a1282

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -61,8 +61,9 @@ def generate_quiz_page():
61
 
62
  if request.content_type == 'application/json':
63
  return jsonify(response)
64
-
65
- return render_template('quiz.html', textWithAnswers=response)
 
66
 
67
  return render_template('index.html')
68
 
 
61
 
62
  if request.content_type == 'application/json':
63
  return jsonify(response)
64
+
65
+ response_text = response.get('text', '') if isinstance(response, dict) else ''
66
+ return render_template('quiz.html', textWithAnswers=response_text)
67
 
68
  return render_template('index.html')
69