Alexandre-Numind
commited on
Commit
•
b1b293d
1
Parent(s):
9b07b7c
Update app.py
Browse files
app.py
CHANGED
@@ -296,7 +296,7 @@ model.eval()
|
|
296 |
def get_prediction(text,template,example):
|
297 |
size = len(tokenizer(text)["input_ids"])
|
298 |
print(size)
|
299 |
-
if size >
|
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,"",""])
|
|
|
296 |
def get_prediction(text,template,example):
|
297 |
size = len(tokenizer(text)["input_ids"])
|
298 |
print(size)
|
299 |
+
if size > 5000:
|
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,"",""])
|