Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,7 @@ def format_prompt(message, history):
|
|
15 |
|
16 |
# Iterates through every past user input and response to be added to the prompt
|
17 |
print("History Type: {}".format(type(history)))
|
|
|
18 |
for user_prompt, bot_response in history:
|
19 |
corrected_prompt = prompt_prefix + user_prompt
|
20 |
|
@@ -51,7 +52,7 @@ def generate(prompt, history, system_prompt, temperature=0.9, max_new_tokens=256
|
|
51 |
|
52 |
|
53 |
additional_inputs=[
|
54 |
-
gr.Textbox( label="System Prompt",
|
55 |
gr.Slider( label="Temperature", value=0.9, minimum=0.0, maximum=1.0, step=0.05, interactive=True, info="Higher values produce more diverse outputs", ),
|
56 |
gr.Slider( label="Max new tokens", value=256, minimum=0, maximum=1048, step=64, interactive=True, info="The maximum numbers of new tokens", ),
|
57 |
gr.Slider( label="Top-p (nucleus sampling)", value=0.90, minimum=0.0, maximum=1, step=0.05, interactive=True, info="Higher values sample more low-probability tokens", ),
|
|
|
15 |
|
16 |
# Iterates through every past user input and response to be added to the prompt
|
17 |
print("History Type: {}".format(type(history)))
|
18 |
+
#history.append("It is my friends house in England.", "It is my friend's house in England.")
|
19 |
for user_prompt, bot_response in history:
|
20 |
corrected_prompt = prompt_prefix + user_prompt
|
21 |
|
|
|
52 |
|
53 |
|
54 |
additional_inputs=[
|
55 |
+
gr.Textbox( label="System Prompt", value="You are an expert at English grammar" , max_lines=1, interactive=True, ),
|
56 |
gr.Slider( label="Temperature", value=0.9, minimum=0.0, maximum=1.0, step=0.05, interactive=True, info="Higher values produce more diverse outputs", ),
|
57 |
gr.Slider( label="Max new tokens", value=256, minimum=0, maximum=1048, step=64, interactive=True, info="The maximum numbers of new tokens", ),
|
58 |
gr.Slider( label="Top-p (nucleus sampling)", value=0.90, minimum=0.0, maximum=1, step=0.05, interactive=True, info="Higher values sample more low-probability tokens", ),
|