micole66 commited on
Commit
13bbeb4
1 Parent(s): 48ff222

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,10 +4,10 @@ def get_pipe(name):
4
  tokenizer = AutoTokenizer.from_pretrained(name)
5
  model = AutoModelForSeq2SeqLM.from_pretrained(name)
6
  pipe = pipeline(
7
- "text-generator", model=model, tokenizer=tokenizer, framework="pt"
8
  )
9
  return pipe
10
- model_names = ['EleutherAI/gpt-neo-1.3B'] #, 'bigscience/T0p', 'bigscience/T0pp']
11
  #model_names = ['bigscience/T0_3B','bigscience/T0'] #, 'bigscience/T0p', 'bigscience/T0pp']
12
  pipes = [get_pipe(name) for name in model_names]
13
  def _fn(text, do_sample, min_length, max_length, temperature, top_p, pipe):
 
4
  tokenizer = AutoTokenizer.from_pretrained(name)
5
  model = AutoModelForSeq2SeqLM.from_pretrained(name)
6
  pipe = pipeline(
7
+ "summarization", model=model, tokenizer=tokenizer, framework="pt"
8
  )
9
  return pipe
10
+ model_names = ['bigscience/T0_3B'] #, 'bigscience/T0p', 'bigscience/T0pp']
11
  #model_names = ['bigscience/T0_3B','bigscience/T0'] #, 'bigscience/T0p', 'bigscience/T0pp']
12
  pipes = [get_pipe(name) for name in model_names]
13
  def _fn(text, do_sample, min_length, max_length, temperature, top_p, pipe):