Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,9 +54,9 @@ def chat_with_document(text, conversation_history, user_query):
|
|
| 54 |
|
| 55 |
def generate_flashcards_from_text(text, num_cards):
|
| 56 |
prompt = (
|
| 57 |
-
f"Generate {num_cards} flashcards based on the following document. "
|
| 58 |
"Return a Python dictionary where each key is a flashcard question and its corresponding value is the answer. "
|
| 59 |
-
"Do not include any additional text.\n\nDocument:\n\n{text}"
|
| 60 |
)
|
| 61 |
messages = [
|
| 62 |
{"role": "system", "content": "You are an educational assistant that creates study flashcards."},
|
|
|
|
| 54 |
|
| 55 |
def generate_flashcards_from_text(text, num_cards):
|
| 56 |
prompt = (
|
| 57 |
+
f"Generate {num_cards} flashcards based on the following document. \n\nDocument:\n\n{text} "
|
| 58 |
"Return a Python dictionary where each key is a flashcard question and its corresponding value is the answer. "
|
| 59 |
+
#"Do not include any additional text.\n\nDocument:\n\n{text}"
|
| 60 |
)
|
| 61 |
messages = [
|
| 62 |
{"role": "system", "content": "You are an educational assistant that creates study flashcards."},
|