Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,7 +63,7 @@ def chat_with_document(text, conversation_history, user_query):
|
|
| 63 |
def generate_questions_from_text(text, num_questions):
|
| 64 |
prompt = (
|
| 65 |
f"Generate up to {num_questions} study questions with answers based on the following document.\n"
|
| 66 |
-
"Return the output as a table with two columns: 'Question' and 'Answer'.\n\nDocument:\n\n{text}"
|
| 67 |
)
|
| 68 |
messages = [
|
| 69 |
{"role": "system", "content": "You are an educational assistant that generates study questions."},
|
|
|
|
| 63 |
def generate_questions_from_text(text, num_questions):
|
| 64 |
prompt = (
|
| 65 |
f"Generate up to {num_questions} study questions with answers based on the following document.\n"
|
| 66 |
+
f"Return the output as a table with two columns: 'Question' and 'Answer'.\n\nDocument:\n\n{text}"
|
| 67 |
)
|
| 68 |
messages = [
|
| 69 |
{"role": "system", "content": "You are an educational assistant that generates study questions."},
|