DJF-on-arm commited on
Commit
b573147
·
verified ·
1 Parent(s): 30df1ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -190,7 +190,7 @@ def fast_decode_step(token, e_seq, h, c, decoder_model, e_mask=None):
190
  c = tf.convert_to_tensor(c, dtype=tf.float32)
191
  return decoder_model([token, e_seq, e_mask, h, c], training=False)
192
 
193
- def reply(text, max_decode_len=MAX_LEN, rep_penalty=1.3, beam_width=7, length_penalty=0.7, temperature=0.7):
194
  text = text.strip()
195
  if MoE:
196
  if not text.startswith("<TASK_"):
@@ -301,12 +301,12 @@ def respond(message, history, max_tokens, temperature, top_p):
301
  with gr.Blocks() as demo:
302
  with gr.Sidebar():
303
  gr.LoginButton()
304
- gr.Markdown("### Model Info\nIAMAM v1.0.0\n40M Parameters\nLSTM + Attention")
305
 
306
  gr.ChatInterface(
307
  fn=respond,
308
- title="IAMAM (I AM A Model)",
309
- description="A lightweight Keras 3 LSTM Model with bidirectionality and attention! (Powered by Beam Search)",
310
  additional_inputs=[
311
  gr.Slider(minimum=1, maximum=MAX_LEN, value=32, step=1, label="Max new tokens"),
312
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
 
190
  c = tf.convert_to_tensor(c, dtype=tf.float32)
191
  return decoder_model([token, e_seq, e_mask, h, c], training=False)
192
 
193
+ def reply(text, max_decode_len=MAX_LEN, rep_penalty=1.3, beam_width=3, length_penalty=0.7, temperature=0.7):
194
  text = text.strip()
195
  if MoE:
196
  if not text.startswith("<TASK_"):
 
301
  with gr.Blocks() as demo:
302
  with gr.Sidebar():
303
  gr.LoginButton()
304
+ gr.Markdown("### Model Info\nIAMAM v1.1.0\n40M Parameters\nLSTM + Attention")
305
 
306
  gr.ChatInterface(
307
  fn=respond,
308
+ title="A Math AutoBiography maker!",
309
+ description="Try asking it to make a autobiography on 2 + 2! (Runs IAMAM v1.1.0)",
310
  additional_inputs=[
311
  gr.Slider(minimum=1, maximum=MAX_LEN, value=32, step=1, label="Max new tokens"),
312
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),