ysharma HF staff commited on
Commit
2864b70
·
1 Parent(s): a68aa93
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,7 +40,7 @@ def text_generate(prompt):
40
  {
41
  "top_p": 0.9,
42
  "temperature": 1.1,
43
- "max_new_tokens": 250,
44
  "return_full_text": True
45
  }}
46
  response = requests.post(API_URL, headers=headers, json=json_)
@@ -60,10 +60,10 @@ demo = gr.Blocks()
60
  with demo:
61
  gr.Markdown("<h1><center>Step By Step With Bloom</center></h1>")
62
  gr.Markdown(
63
- """ [BigScienceW Bloom](https://twitter.com/BigscienceW) \n\n Large language models have demonstrated a capability of 'Chain-of-thought reasoning'. Some amazing researchers [Jason Wei et al.](https://arxiv.org/abs/2206.07682) recently found out that by addding **Lets think step by step** it improves the model's zero-shot performance. Some might say — You can get good results out of LLMs if you know how to speak to them."""
64
  )
65
  with gr.Row():
66
- example_prompt = gr.Radio( ["Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?\nA: Let’s think step by step.\n", "Q: Roger has 5 tennis balls already. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now?\nA: Let’s think step by step.\n", "Q: On average Joe throws 25 punches per minute. A fight lasts 5 rounds of 3 minutes each. How many punches did he throw?\nA: Let’s think step by step.\n"], label= "Choose a sample Prompt")
67
  #input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
68
  generated_txt = gr.Textbox(lines=7)
69
 
 
40
  {
41
  "top_p": 0.9,
42
  "temperature": 1.1,
43
+ #"max_new_tokens": 250,
44
  "return_full_text": True
45
  }}
46
  response = requests.post(API_URL, headers=headers, json=json_)
 
60
  with demo:
61
  gr.Markdown("<h1><center>Step By Step With Bloom</center></h1>")
62
  gr.Markdown(
63
+ """ [BigScienceW Bloom](https://twitter.com/BigscienceW) \n\n Large language models have demonstrated a capability of 'Chain-of-thought reasoning'. Some amazing researchers( [Jason Wei et al.](https://arxiv.org/abs/2206.07682)) recently found out that by addding **Lets think step by step** it improves the model's zero-shot performance. Some might say — You can get good results out of LLMs if you know how to speak to them."""
64
  )
65
  with gr.Row():
66
+ example_prompt = gr.Radio( ["Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?\nA: Let’s think step by step.\n", "Q: Roger has 5 tennis balls already. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now?\nA: Let’s think step by step.\n", "Q: On an average Joe throws 25 punches per minute. His fight lasts 5 rounds of 3 minutes each. How many punches did he throw?\nA: Let’s think step by step.\n"], label= "Choose a sample Prompt")
67
  #input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
68
  generated_txt = gr.Textbox(lines=7)
69