Tonic commited on
Commit
a75f7f9
β€’
1 Parent(s): 93b8804

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -64,7 +64,7 @@ def compute_embeddings(selected_task, input_text):
64
  except KeyError:
65
  print(f"Selected task not found: {selected_task}")
66
  return f"Error: Task '{selected_task}' not found. Please select a valid task."
67
- max_length = 2042
68
  processed_texts = [f'Instruct: {task_description}\nQuery: {input_text}']
69
 
70
  batch_dict = tokenizer(processed_texts, max_length=max_length - 1, return_attention_mask=False, padding=False, truncation=True)
 
64
  except KeyError:
65
  print(f"Selected task not found: {selected_task}")
66
  return f"Error: Task '{selected_task}' not found. Please select a valid task."
67
+ max_length = 1024
68
  processed_texts = [f'Instruct: {task_description}\nQuery: {input_text}']
69
 
70
  batch_dict = tokenizer(processed_texts, max_length=max_length - 1, return_attention_mask=False, padding=False, truncation=True)