akoksal commited on
Commit
d88c0f6
·
1 Parent(s): 8286387

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -20,7 +20,6 @@ from transformers import AutoTokenizer, pipeline
20
  def predict(instruction, topp, max_length, temperature):
21
  if "[EOI]" not in instruction:
22
  instruction = instruction + " [EOI]"
23
- return instruction
24
  x = generate(instruction,
25
  do_sample=True,
26
  top_p=topp,
@@ -40,7 +39,16 @@ def process_example(args):
40
  with gr.Blocks() as demo:
41
  with gr.Column():
42
  gr.Markdown(
43
- """Hello"""
 
 
 
 
 
 
 
 
 
44
  )
45
  with gr.Row():
46
  with gr.Column(scale=3):
 
20
  def predict(instruction, topp, max_length, temperature):
21
  if "[EOI]" not in instruction:
22
  instruction = instruction + " [EOI]"
 
23
  x = generate(instruction,
24
  do_sample=True,
25
  top_p=topp,
 
39
  with gr.Blocks() as demo:
40
  with gr.Column():
41
  gr.Markdown(
42
+ """# LongForm: Optimizing Instruction Tuning for Long Text Generation with Corpus Extraction
43
+ The LongForm dataset is created by leveraging English corpus examples with augmented instructions. We select a diverse set of human-written documents from existing corpora such as C4 and Wikipedia and generate instructions for the given documents via LLMs. Then, we extend these examples with structured corpora examples such as Stack Exchange and WikiHow and task examples such as question answering, email writing, grammar error correction, story/poem generation, and text summarization.
44
+
45
+ Paper: https://arxiv.org/abs/2304.08460
46
+ Dataset and Models: https://github.com/akoksal/LongForm
47
+
48
+ **Tips**:
49
+ 1. Use the "[EOI]" token at the end of the instruction for OPT models. It adds automatically if you forget it.
50
+ 2. The LongForm dataset and models mainly focus on long text generation and have limitations regarding structured prediction tasks in NLP.
51
+ """
52
  )
53
  with gr.Row():
54
  with gr.Column(scale=3):