BlinkDL commited on
Commit
d7e18bd
1 Parent(s): d1d3692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,7 +7,7 @@ nvmlInit()
7
  gpu_h = nvmlDeviceGetHandleByIndex(0)
8
  ctx_limit = 1024
9
  title = "RWKV-4-Pile-14B-20230228-ctx4096-test663"
10
- desc = f'''DEMO limited to ctxlen {ctx_limit}. Links:
11
  <a href='https://github.com/BlinkDL/ChatRWKV' target="_blank" style="margin:0 0.5em">ChatRWKV</a>
12
  <a href='https://github.com/BlinkDL/RWKV-LM' target="_blank" style="margin:0 0.5em">RWKV-LM</a>
13
  <a href="https://pypi.org/project/rwkv/" target="_blank" style="margin:0 0.5em">RWKV pip package</a>
@@ -88,17 +88,17 @@ examples = [
88
 
89
  iface = gr.Interface(
90
  fn=infer,
91
- description=f'''{desc}''',
92
  allow_flagging="never",
93
  inputs=[
94
- gr.Textbox(lines=14, label="Prompt"), # prompt
95
  gr.Slider(10, 200, step=10, value=100), # token_count
96
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
97
  gr.Slider(0.0, 1.0, step=0.05, value=0.8), # top_p
98
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
99
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
100
  ],
101
- outputs=gr.Textbox(label="Generated Output", lines=30),
102
  examples=examples,
103
  cache_examples=False,
104
  ).queue()
 
7
  gpu_h = nvmlDeviceGetHandleByIndex(0)
8
  ctx_limit = 1024
9
  title = "RWKV-4-Pile-14B-20230228-ctx4096-test663"
10
+ desc = f'''Links:
11
  <a href='https://github.com/BlinkDL/ChatRWKV' target="_blank" style="margin:0 0.5em">ChatRWKV</a>
12
  <a href='https://github.com/BlinkDL/RWKV-LM' target="_blank" style="margin:0 0.5em">RWKV-LM</a>
13
  <a href="https://pypi.org/project/rwkv/" target="_blank" style="margin:0 0.5em">RWKV pip package</a>
 
88
 
89
  iface = gr.Interface(
90
  fn=infer,
91
+ description=f'''==> Please try examples first (bottom of page) <== (edit them to use your question). Demo limited to ctxlen {ctx_limit}. {desc}''',
92
  allow_flagging="never",
93
  inputs=[
94
+ gr.Textbox(lines=10, label="Prompt", value="Expert Questions & Helpful Answers\nAsk Research Experts\nQuestion:\nHow can we eliminate poverty?\n\nFull Answer:\n"), # prompt
95
  gr.Slider(10, 200, step=10, value=100), # token_count
96
  gr.Slider(0.2, 2.0, step=0.1, value=1.0), # temperature
97
  gr.Slider(0.0, 1.0, step=0.05, value=0.8), # top_p
98
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # presencePenalty
99
  gr.Slider(0.0, 1.0, step=0.1, value=0.1), # countPenalty
100
  ],
101
+ outputs=gr.Textbox(label="Generated Output", lines=28),
102
  examples=examples,
103
  cache_examples=False,
104
  ).queue()