mou3az commited on
Commit
779a104
1 Parent(s): 5c215d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  from flask import Flask, request, jsonify, render_template
2
  from huggingface_hub import InferenceClient
3
  from requests.exceptions import RequestException
4
- import json
5
 
6
  app = Flask(__name__)
7
 
@@ -63,8 +62,7 @@ def generate_quiz_page():
63
  if request.content_type == 'application/json':
64
  return jsonify(response)
65
 
66
- response_json = json.dumps(response)
67
- return render_template('quiz.html', response_json=response_json)
68
 
69
  return render_template('index.html')
70
 
 
1
  from flask import Flask, request, jsonify, render_template
2
  from huggingface_hub import InferenceClient
3
  from requests.exceptions import RequestException
 
4
 
5
  app = Flask(__name__)
6
 
 
62
  if request.content_type == 'application/json':
63
  return jsonify(response)
64
 
65
+ return render_template('quiz.html', textWithAnswers=response['text'])
 
66
 
67
  return render_template('index.html')
68