Alexandre-Numind
commited on
Commit
•
ae9b20d
1
Parent(s):
12abed9
Update app.py
Browse files
app.py
CHANGED
@@ -296,8 +296,8 @@ model.eval()
|
|
296 |
def get_prediction(text,template,example):
|
297 |
size = len(tokenizer(text)["input_ids"])
|
298 |
print(size)
|
299 |
-
if size > 2000:
|
300 |
-
|
301 |
try:
|
302 |
prompt = create_prompt(text,template,[example,"",""])
|
303 |
except:
|
|
|
296 |
def get_prediction(text,template,example):
|
297 |
size = len(tokenizer(text)["input_ids"])
|
298 |
print(size)
|
299 |
+
# if size > 2000:
|
300 |
+
# raise gr.Error("Max token for input text is 2000 tokes. Yours is: "+str(size))
|
301 |
try:
|
302 |
prompt = create_prompt(text,template,[example,"",""])
|
303 |
except:
|