ultrin commited on
Commit
dd49e10
1 Parent(s): b2b54d9

fix tokenizer_kwargs

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -11,7 +11,7 @@ pipe = pipeline("text-generation", model="ai-forever/rugpt3large_based_on_gpt2")
11
 
12
  @app.get("/infer_t5")
13
  def t5(input):
14
- tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512,'return_tensors':'pt'}
15
  output = pipe(input, **tokenizer_kwargs)
16
  return {"output": output[0]["generated_text"]}
17
 
 
11
 
12
  @app.get("/infer_t5")
13
  def t5(input):
14
+ tokenizer_kwargs = {'max_length':512}
15
  output = pipe(input, **tokenizer_kwargs)
16
  return {"output": output[0]["generated_text"]}
17