Slaiwala commited on
Commit
f1c07d3
·
verified ·
1 Parent(s): 82c5f3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -46,8 +46,9 @@ SPACE_REPO_ID = os.environ.get("SPACE_REPO_ID", "")
46
  # Generation / toggles
47
  ALLOW_WIKIPEDIA = False
48
  DEBUG = True
49
- MAX_NEW_TOKENS_GROUNDED = 512
50
- MAX_NEW_TOKENS_FALLBACK = 256
 
51
  MIN_USEFUL_CHARS = 260
52
 
53
  def dlog(tag, msg):
@@ -970,17 +971,18 @@ with gr.Blocks(theme="soft") as demo:
970
  )
971
 
972
  send_btn.click(
973
- predict,
974
- inputs=[user_in, chat, state],
975
- outputs=[chat, user_in, feedback_grp, rating, comment, state],
976
- concurrency_limit=8, # heavy LLM call
977
  )
978
 
 
979
  user_in.submit(
980
- predict,
981
- inputs=[user_in, chat, state],
982
- outputs=[chat, user_in, feedback_grp, rating, comment, state],
983
- concurrency_limit=8, # heavy LLM call
984
  )
985
 
986
  clear_btn.click(
 
46
  # Generation / toggles
47
  ALLOW_WIKIPEDIA = False
48
  DEBUG = True
49
+ MAX_NEW_TOKENS_GROUNDED = 384 # was 512
50
+ MAX_NEW_TOKENS_FALLBACK = 192 # was 256
51
+
52
  MIN_USEFUL_CHARS = 260
53
 
54
  def dlog(tag, msg):
 
971
  )
972
 
973
  send_btn.click(
974
+ predict,
975
+ inputs=[user_in, chat, state],
976
+ outputs=[chat, user_in, feedback_grp, rating, comment, state],
977
+ concurrency_limit=3,
978
  )
979
 
980
+
981
  user_in.submit(
982
+ predict,
983
+ inputs=[user_in, chat, state],
984
+ outputs=[chat, user_in, feedback_grp, rating, comment, state],
985
+ concurrency_limit=3,
986
  )
987
 
988
  clear_btn.click(