Update app.py
Browse files
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 |
-
|
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 |
|