Spaces:
Running
Running
Commit
·
7d8cfe5
1
Parent(s):
b665a1f
Upload app.py
Browse files
app.py
CHANGED
@@ -437,7 +437,7 @@ class Reader:
|
|
437 |
text += list(paper.section_text_dict.values())[0]
|
438 |
#max_token = 2500 * 4
|
439 |
#text = text[:max_token]
|
440 |
-
chat_summary_text, utoken1, ctoken1, ttoken1 = self.chat_summary(text=text, key=str(key), p, temperature)
|
441 |
htmls.append(chat_summary_text)
|
442 |
|
443 |
# TODO 往md文档中插入论文里的像素最大的一张图片,这个方案可以弄的更加智能一些:
|
@@ -455,7 +455,7 @@ class Reader:
|
|
455 |
# methods
|
456 |
method_text += paper.section_text_dict[method_key]
|
457 |
text = summary_text + "\n<Methods>:\n" + method_text
|
458 |
-
chat_method_text, utoken2, ctoken2, ttoken2 = self.chat_method(text=text, key=str(key), p, temperature)
|
459 |
htmls.append(chat_method_text)
|
460 |
else:
|
461 |
chat_method_text = ''
|
@@ -478,7 +478,7 @@ class Reader:
|
|
478 |
text = summary_text + "\n <Conclusion>:\n" + conclusion_text
|
479 |
else:
|
480 |
text = summary_text
|
481 |
-
chat_conclusion_text, utoken3, ctoken3, ttoken3 = self.chat_conclusion(text=text, key=str(key), p, temperature)
|
482 |
htmls.append(chat_conclusion_text)
|
483 |
htmls.append("\n")
|
484 |
# token统计
|
|
|
437 |
text += list(paper.section_text_dict.values())[0]
|
438 |
#max_token = 2500 * 4
|
439 |
#text = text[:max_token]
|
440 |
+
chat_summary_text, utoken1, ctoken1, ttoken1 = self.chat_summary(text=text, key=str(key), p=p, temperature=temperature)
|
441 |
htmls.append(chat_summary_text)
|
442 |
|
443 |
# TODO 往md文档中插入论文里的像素最大的一张图片,这个方案可以弄的更加智能一些:
|
|
|
455 |
# methods
|
456 |
method_text += paper.section_text_dict[method_key]
|
457 |
text = summary_text + "\n<Methods>:\n" + method_text
|
458 |
+
chat_method_text, utoken2, ctoken2, ttoken2 = self.chat_method(text=text, key=str(key), p=p, temperature=temperature)
|
459 |
htmls.append(chat_method_text)
|
460 |
else:
|
461 |
chat_method_text = ''
|
|
|
478 |
text = summary_text + "\n <Conclusion>:\n" + conclusion_text
|
479 |
else:
|
480 |
text = summary_text
|
481 |
+
chat_conclusion_text, utoken3, ctoken3, ttoken3 = self.chat_conclusion(text=text, key=str(key), p=p, temperature=temperature)
|
482 |
htmls.append(chat_conclusion_text)
|
483 |
htmls.append("\n")
|
484 |
# token统计
|