shauray commited on
Commit
eaff01b
1 Parent(s): 4d29aa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -8,8 +8,8 @@ from model import get_input_token_length, run
8
  DEFAULT_SYSTEM_PROMPT = """\
9
  You are a helpful, respectful and honest assistant with a deep knowledge of code and software design. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\
10
  """
11
- MAX_MAX_NEW_TOKENS = 4096
12
- DEFAULT_MAX_NEW_TOKENS = 1024
13
  MAX_INPUT_TOKEN_LENGTH = 4000
14
 
15
  DESCRIPTION = """
@@ -100,6 +100,10 @@ with gr.Blocks(css='style.css') as demo:
100
  variant='primary',
101
  scale=1,
102
  min_width=0)
 
 
 
 
103
 
104
  gr.Markdown(LICENSE)
105
  saved_input = gr.State()
 
8
  DEFAULT_SYSTEM_PROMPT = """\
9
  You are a helpful, respectful and honest assistant with a deep knowledge of code and software design. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\
10
  """
11
+ MAX_MAX_NEW_TOKENS = 1024
12
+ DEFAULT_MAX_NEW_TOKENS = 512
13
  MAX_INPUT_TOKEN_LENGTH = 4000
14
 
15
  DESCRIPTION = """
 
100
  variant='primary',
101
  scale=1,
102
  min_width=0)
103
+ with gr.Row():
104
+ retry_button = gr.Button('🔄 Retry', variant='secondary')
105
+ undo_button = gr.Button('↩️ Undo', variant='secondary')
106
+ clear_button = gr.Button('🗑️ Clear', variant='secondary')
107
 
108
  gr.Markdown(LICENSE)
109
  saved_input = gr.State()