Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from requests.exceptions import RequestException
|
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
|
8 |
-
client = InferenceClient("
|
9 |
|
10 |
def system_instructions(context):
|
11 |
return f"""<s> [INST] Your are a great teacher and your task is to create 6 questions with answer and 4 choices based on the following context:\n\n{context}\n\n. Each example should be like this
|
@@ -52,7 +52,7 @@ def generate_quiz_page():
|
|
52 |
response = generate_quiz(context)
|
53 |
|
54 |
if request.headers.get('Content-Type') == 'application/json':
|
55 |
-
return jsonify(
|
56 |
|
57 |
|
58 |
quiz_html = f"""
|
|
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
|
8 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
9 |
|
10 |
def system_instructions(context):
|
11 |
return f"""<s> [INST] Your are a great teacher and your task is to create 6 questions with answer and 4 choices based on the following context:\n\n{context}\n\n. Each example should be like this
|
|
|
52 |
response = generate_quiz(context)
|
53 |
|
54 |
if request.headers.get('Content-Type') == 'application/json':
|
55 |
+
return jsonify(response)
|
56 |
|
57 |
|
58 |
quiz_html = f"""
|