Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def generate_question_with_chatgpt(context):
|
|
| 55 |
response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
|
| 56 |
result = response.json()
|
| 57 |
|
| 58 |
-
if 'choices' in result:
|
| 59 |
# Extract the generated question from the response
|
| 60 |
generated_question = result["choices"][0]["message"]["content"]
|
| 61 |
|
|
|
|
| 55 |
response = requests.post(CHATGPT_API_ENDPOINT, json=data, headers=headers)
|
| 56 |
result = response.json()
|
| 57 |
|
| 58 |
+
if 'choices' in result:
|
| 59 |
# Extract the generated question from the response
|
| 60 |
generated_question = result["choices"][0]["message"]["content"]
|
| 61 |
|