Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def generate_math_questions(grade, term, qtype="Unspecified", num_questions=10):
|
|
75 |
print(f"Retrieved {len(raw_questions)} document(s)")
|
76 |
|
77 |
# 隨機選取並限制字串長度的題庫內容
|
78 |
-
input_question_bank = random_questions_with_limit(raw_questions,
|
79 |
|
80 |
# 系統訊息 (system) 與使用者要求 (user) 的對話內容
|
81 |
# 說明給模型:要產生新的英文題目,保持難度與風格類似,但不要直接抄題庫原文
|
@@ -130,7 +130,7 @@ def generate_math_questions(grade, term, qtype="Unspecified", num_questions=10):
|
|
130 |
# 使用 InferenceClient 呼叫 API 模型產生新題目
|
131 |
completion = client.chat.completions.create(
|
132 |
# model="mistralai/Mistral-7B-Instruct-v0.3",
|
133 |
-
model="
|
134 |
# model="mistralai/Mistral-Nemo-Instruct-2407",
|
135 |
messages=messages,
|
136 |
max_tokens=500
|
|
|
75 |
print(f"Retrieved {len(raw_questions)} document(s)")
|
76 |
|
77 |
# 隨機選取並限制字串長度的題庫內容
|
78 |
+
input_question_bank = random_questions_with_limit(raw_questions, 1000)
|
79 |
|
80 |
# 系統訊息 (system) 與使用者要求 (user) 的對話內容
|
81 |
# 說明給模型:要產生新的英文題目,保持難度與風格類似,但不要直接抄題庫原文
|
|
|
130 |
# 使用 InferenceClient 呼叫 API 模型產生新題目
|
131 |
completion = client.chat.completions.create(
|
132 |
# model="mistralai/Mistral-7B-Instruct-v0.3",
|
133 |
+
model="qwen-qwq-32b",
|
134 |
# model="mistralai/Mistral-Nemo-Instruct-2407",
|
135 |
messages=messages,
|
136 |
max_tokens=500
|