Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -136,8 +136,12 @@ def generate_math_questions(grade, term, qtype="Unspecified", num_questions=10):
|
|
136 |
max_tokens=1000
|
137 |
)
|
138 |
|
|
|
|
|
|
|
|
|
139 |
# 傳回模型產生的文本
|
140 |
-
return
|
141 |
|
142 |
# 建立 Gradio 介面
|
143 |
with gr.Blocks() as app:
|
|
|
136 |
max_tokens=1000
|
137 |
)
|
138 |
|
139 |
+
response = completion.choices[0].message.content
|
140 |
+
|
141 |
+
print(response)
|
142 |
+
|
143 |
# 傳回模型產生的文本
|
144 |
+
return response
|
145 |
|
146 |
# 建立 Gradio 介面
|
147 |
with gr.Blocks() as app:
|