sweetssweets commited on
Commit
a4b6a50
Β·
verified Β·
1 Parent(s): 41aef7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def NMRExtractor(Paragraph, max_length):
65
 
66
  pipe = pipeline(task="text-generation", model=base_model, tokenizer=tokenizer, max_length=max_length)
67
  print('prompt',prompt)
68
- result = pipe(f"{prompt}",max_length=1024,truncation=True)
69
  print('result',result)
70
  generation = result[0]['generated_text']
71
  print('generation',generation)
@@ -123,7 +123,7 @@ demo = gr.Interface(
123
  πŸ’‘ We have released the GPU version code of NMRExtractor on github, and the inference speed is an average of 0.5 seconds per item. https://github.com/.../NMRExtractor\n
124
  ✏️1. Enter your text or click to select one from the examples below.\n
125
  πŸ“€2. Set parameters: "max_length": modify according to the length of the text you enter.\n
126
- πŸ†3. After clicking submit, wait about 300 seconds⏰.
127
  """,
128
 
129
  article = 'https://github.com/.../NMRExtractor',
 
65
 
66
  pipe = pipeline(task="text-generation", model=base_model, tokenizer=tokenizer, max_length=max_length)
67
  print('prompt',prompt)
68
+ result = pipe(f"{prompt}",max_length=max_length,truncation=True)
69
  print('result',result)
70
  generation = result[0]['generated_text']
71
  print('generation',generation)
 
123
  πŸ’‘ We have released the GPU version code of NMRExtractor on github, and the inference speed is an average of 0.5 seconds per item. https://github.com/.../NMRExtractor\n
124
  ✏️1. Enter your text or click to select one from the examples below.\n
125
  πŸ“€2. Set parameters: "max_length": modify according to the length of the text you enter.\n
126
+ πŸ†3. After clicking submit, because the CPU runs very slowly, you need to wait for a long time⏰.
127
  """,
128
 
129
  article = 'https://github.com/.../NMRExtractor',