Spaces:
Running
on
Zero
Running
on
Zero
gospacedev
commited on
Commit
•
7e8cb7f
1
Parent(s):
c424de3
Increase the max new tokens
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub import InferenceClient
|
|
5 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
6 |
|
7 |
def system_instructions(question_difficulty, tone, topic):
|
8 |
-
return f"""<s> [INST] Your are a great teacher and your task is to create 10 questions with 4 choices with a {question_difficulty} difficulty in a {tone} tone about {topic}, then create an answers. Index in
|
9 |
|
10 |
|
11 |
with gr.Blocks(title="Quizmona", theme=gr.themes.Default(primary_hue="green", secondary_hue="green"), css="style.css") as demo:
|
@@ -46,7 +46,7 @@ with gr.Blocks(title="Quizmona", theme=gr.themes.Default(primary_hue="green", se
|
|
46 |
|
47 |
generate_kwargs = dict(
|
48 |
temperature=0.1,
|
49 |
-
max_new_tokens=
|
50 |
top_p=0.95,
|
51 |
repetition_penalty=1.0,
|
52 |
do_sample=True,
|
|
|
5 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
6 |
|
7 |
def system_instructions(question_difficulty, tone, topic):
|
8 |
+
return f"""<s> [INST] Your are a great teacher and your task is to create 10 questions with 4 choices with a {question_difficulty} difficulty in a {tone} tone about {topic}, then create an answers. Index in JSON format, the questions as "Q#":"" to "Q#":"", the four choices as "Q#:C1":"" to "Q#:C4":"", and the answers as "A#":"Q#:C#" to "A#":"Q#:C#". [/INST]"""
|
9 |
|
10 |
|
11 |
with gr.Blocks(title="Quizmona", theme=gr.themes.Default(primary_hue="green", secondary_hue="green"), css="style.css") as demo:
|
|
|
46 |
|
47 |
generate_kwargs = dict(
|
48 |
temperature=0.1,
|
49 |
+
max_new_tokens=2048,
|
50 |
top_p=0.95,
|
51 |
repetition_penalty=1.0,
|
52 |
do_sample=True,
|