SebastianSchramm commited on
Commit
5257ec0
1 Parent(s): 2f8f51f

fix link in title and add one example

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -29,7 +29,7 @@ prompt_template = "Below is an instruction that describes a task, paired with an
29
  "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:"
30
 
31
 
32
- def generate(instruction, input, temperature=1.0, max_new_tokens=256, top_p=0.9, length_penalty=1.0):
33
  formatted_instruction = prompt_template.format(instruction=instruction, input=input)
34
 
35
  # make sure temperature top_p and length_penalty are floats
@@ -73,8 +73,7 @@ def generate(instruction, input, temperature=1.0, max_new_tokens=256, top_p=0.9,
73
  yield output
74
  return output
75
 
76
- examples = [
77
- ]
78
 
79
  def process_example(args):
80
  for x in generate(args):
@@ -86,14 +85,14 @@ with gr.Blocks(theme=theme) as demo:
86
  gr.Markdown(
87
  """<h1><center>Instruction-tuned Cerebras GPT 111M Language Model for Text</center></h1>
88
  <p>
89
- [Cerebras-GPT-111M-instruction](SebastianSchramm/Cerebras-GPT-111M-instruction)
90
  </p>
91
  """
92
  )
93
  with gr.Row():
94
  with gr.Column(scale=3):
95
- instruction = gr.Textbox(placeholder="Instruction...", label="instruction")
96
- input = gr.Textbox(placeholder="Input...", label="input")
97
  output = gr.Textbox(
98
  interactive=False,
99
  lines=8,
 
29
  "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:"
30
 
31
 
32
+ def generate(instruction, input='', temperature=1.0, max_new_tokens=256, top_p=0.9, length_penalty=1.0):
33
  formatted_instruction = prompt_template.format(instruction=instruction, input=input)
34
 
35
  # make sure temperature top_p and length_penalty are floats
 
73
  yield output
74
  return output
75
 
76
+ examples = []
 
77
 
78
  def process_example(args):
79
  for x in generate(args):
 
85
  gr.Markdown(
86
  """<h1><center>Instruction-tuned Cerebras GPT 111M Language Model for Text</center></h1>
87
  <p>
88
+ Link to model: [Cerebras-GPT-111M-instruction](SebastianSchramm/Cerebras-GPT-111M-instruction)
89
  </p>
90
  """
91
  )
92
  with gr.Row():
93
  with gr.Column(scale=3):
94
+ instruction = gr.Textbox(placeholder="Instruction...", label="Instruction")
95
+ input = gr.Textbox(placeholder="Input...", label="Input")
96
  output = gr.Textbox(
97
  interactive=False,
98
  lines=8,