Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ def extract_text_from_pdf(pdf_file,api):
|
|
| 10 |
chat_completion=client.chat.completions.create(
|
| 11 |
messages=[{"role": "system", "content": "Summarize the page and mainly keep the headings and topic names intact in the short summary."},
|
| 12 |
{"role": "user","content": "Summarize and mainly keep the heading and name of topics in summary:"+content,}],
|
| 13 |
-
model="llama3-
|
| 14 |
)
|
| 15 |
text += chat_completion.choices[0].message.content
|
| 16 |
return text
|
|
@@ -30,7 +30,7 @@ def study_planner(days, file,api):
|
|
| 30 |
chat_completion = client.chat.completions.create(
|
| 31 |
messages=[{"role": "system", "content": "Provided a research paper,you have to output a study plan to cover the topics in the paper in provided number of days.Also at last give a motivational quote on studying."},
|
| 32 |
{"role": "user","content": "The research paper is:" +study_material+" Now prepare a study plan to cover this in "+days+" days.Give the plan topic wise and can also include some important prerequisites for the paper.Also give a motivational quote at last.",}],
|
| 33 |
-
model="llama3-
|
| 34 |
)
|
| 35 |
study_plan = chat_completion.choices[0].message.content
|
| 36 |
"""pdf_path = text_to_pdf(study_plan)"""
|
|
|
|
| 10 |
chat_completion=client.chat.completions.create(
|
| 11 |
messages=[{"role": "system", "content": "Summarize the page and mainly keep the headings and topic names intact in the short summary."},
|
| 12 |
{"role": "user","content": "Summarize and mainly keep the heading and name of topics in summary:"+content,}],
|
| 13 |
+
model="llama3-70b-8192",
|
| 14 |
)
|
| 15 |
text += chat_completion.choices[0].message.content
|
| 16 |
return text
|
|
|
|
| 30 |
chat_completion = client.chat.completions.create(
|
| 31 |
messages=[{"role": "system", "content": "Provided a research paper,you have to output a study plan to cover the topics in the paper in provided number of days.Also at last give a motivational quote on studying."},
|
| 32 |
{"role": "user","content": "The research paper is:" +study_material+" Now prepare a study plan to cover this in "+days+" days.Give the plan topic wise and can also include some important prerequisites for the paper.Also give a motivational quote at last.",}],
|
| 33 |
+
model="llama3-70b-8192",
|
| 34 |
)
|
| 35 |
study_plan = chat_completion.choices[0].message.content
|
| 36 |
"""pdf_path = text_to_pdf(study_plan)"""
|