fixed output bug
This commit is contained in:
parent
2b7bb0201c
commit
d362130983
5
main.py
5
main.py
@ -13,14 +13,14 @@ def query(query:str):
|
|||||||
list = search_paper(query)
|
list = search_paper(query)
|
||||||
for i in list:
|
for i in list:
|
||||||
if not mysql_connector.is_loaded(i['paperId']):
|
if not mysql_connector.is_loaded(i['paperId']):
|
||||||
print('New: '+i['q'])
|
print(i['citationStyles']['bibtex'])
|
||||||
res.append({
|
res.append({
|
||||||
'id':i['paperId'],
|
'id':i['paperId'],
|
||||||
'q':str(i['citationStyles']['bibtex']),
|
'q':str(i['citationStyles']['bibtex']),
|
||||||
'a':str(i['abstract']),
|
'a':str(i['abstract']),
|
||||||
'score':[]
|
'score':[]
|
||||||
})
|
})
|
||||||
print('New: '+len(res)+'/'+len(list))
|
print('New load: '+str(len(res))+'/'+str(len(list)))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@app.get("/fastdoi")
|
@app.get("/fastdoi")
|
||||||
@ -30,7 +30,6 @@ async def get_reference(questions):
|
|||||||
if(upload2fastgpt(res)):
|
if(upload2fastgpt(res)):
|
||||||
for i in res:
|
for i in res:
|
||||||
mysql_connector.new_load(i['id'])
|
mysql_connector.new_load(i['id'])
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user