Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ class Reviewer:
|
|
55 |
|
56 |
self.language = language
|
57 |
self.paper_pdf = paper_pdf
|
58 |
-
self.max_token_num =
|
59 |
self.encoding = tiktoken.get_encoding("gpt2")
|
60 |
|
61 |
|
@@ -75,7 +75,7 @@ class Reviewer:
|
|
75 |
try:
|
76 |
text_token = len(self.encoding.encode(text))
|
77 |
except:
|
78 |
-
text_token =
|
79 |
input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
|
80 |
input_text = "This is the paper for your review:" + text[:input_text_index]
|
81 |
messages=[
|
|
|
55 |
|
56 |
self.language = language
|
57 |
self.paper_pdf = paper_pdf
|
58 |
+
self.max_token_num = 13000
|
59 |
self.encoding = tiktoken.get_encoding("gpt2")
|
60 |
|
61 |
|
|
|
75 |
try:
|
76 |
text_token = len(self.encoding.encode(text))
|
77 |
except:
|
78 |
+
text_token = 10000
|
79 |
input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
|
80 |
input_text = "This is the paper for your review:" + text[:input_text_index]
|
81 |
messages=[
|