Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -32,15 +32,15 @@ import datetime
|
|
| 32 |
import json
|
| 33 |
import arxiv
|
| 34 |
|
| 35 |
-
def summarize_research_direction(
|
| 36 |
prompt_qa = (
|
| 37 |
-
"Based on the list of the researcher's
|
| 38 |
-
"Here are the
|
| 39 |
)
|
| 40 |
|
| 41 |
openai.api_key = KEY
|
| 42 |
input = {}
|
| 43 |
-
input['peronalinfo'] =
|
| 44 |
prompt = prompt_qa.format_map(input)
|
| 45 |
try:
|
| 46 |
completion = openai.ChatCompletion.create(
|
|
|
|
| 32 |
import json
|
| 33 |
import arxiv
|
| 34 |
|
| 35 |
+
def summarize_research_direction(papers):
|
| 36 |
prompt_qa = (
|
| 37 |
+
"Based on the list of the researcher's papers from different periods, please write a comprehensive first person persona. Focus more on recent papers. Be concise and clear (around 300 words)."
|
| 38 |
+
"Here are the papers from different periods: {papers}"
|
| 39 |
)
|
| 40 |
|
| 41 |
openai.api_key = KEY
|
| 42 |
input = {}
|
| 43 |
+
input['peronalinfo'] = papers
|
| 44 |
prompt = prompt_qa.format_map(input)
|
| 45 |
try:
|
| 46 |
completion = openai.ChatCompletion.create(
|