Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -164,7 +164,7 @@ def generate_math_questions(grade, term, qtype="Unspecified", num_questions=10):
|
|
| 164 |
model="deepseek-r1-distill-qwen-32b",
|
| 165 |
# model="mistralai/Mistral-Nemo-Instruct-2407",
|
| 166 |
messages=messages,
|
| 167 |
-
max_tokens=
|
| 168 |
)
|
| 169 |
|
| 170 |
response = completion.choices[0].message.content
|
|
@@ -194,7 +194,7 @@ with gr.Blocks() as app:
|
|
| 194 |
|
| 195 |
# 產生題目的按鈕與輸出區塊
|
| 196 |
generate_button = gr.Button("🚀 Generate Questions")
|
| 197 |
-
output = gr.
|
| 198 |
|
| 199 |
# 按下按鈕後呼叫 generate_math_questions 函式並顯示結果
|
| 200 |
generate_button.click(generate_math_questions, inputs=[grade, term, qtype, num_questions], outputs=output)
|
|
|
|
| 164 |
model="deepseek-r1-distill-qwen-32b",
|
| 165 |
# model="mistralai/Mistral-Nemo-Instruct-2407",
|
| 166 |
messages=messages,
|
| 167 |
+
max_tokens=500
|
| 168 |
)
|
| 169 |
|
| 170 |
response = completion.choices[0].message.content
|
|
|
|
| 194 |
|
| 195 |
# 產生題目的按鈕與輸出區塊
|
| 196 |
generate_button = gr.Button("🚀 Generate Questions")
|
| 197 |
+
output = gr.Textbox("📝 Your questions will appear here!", label="📝 Your questions")
|
| 198 |
|
| 199 |
# 按下按鈕後呼叫 generate_math_questions 函式並顯示結果
|
| 200 |
generate_button.click(generate_math_questions, inputs=[grade, term, qtype, num_questions], outputs=output)
|