Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,9 +75,9 @@ 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[:
|
81 |
messages=[
|
82 |
{"role": "system", "content": "You are a professional reviewer. Now I will give you a paper. You need to give a complete review opinion according to the following requirements and format:"+ self.review_format + "Be sure to use {} answers".format(self.language)} ,
|
83 |
{"role": "user", "content": input_text + " Translate the output into {}.".format(self.language)},
|
|
|
75 |
try:
|
76 |
text_token = len(self.encoding.encode(text))
|
77 |
except:
|
78 |
+
text_token = 13000
|
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=[
|
82 |
{"role": "system", "content": "You are a professional reviewer. Now I will give you a paper. You need to give a complete review opinion according to the following requirements and format:"+ self.review_format + "Be sure to use {} answers".format(self.language)} ,
|
83 |
{"role": "user", "content": input_text + " Translate the output into {}.".format(self.language)},
|