Spaces:
Runtime error
Runtime error
Commit
·
868f6da
1
Parent(s):
5d00bc6
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ MAX_MAX_NEW_TOKENS = 10240
|
|
| 60 |
DEFAULT_MAX_NEW_TOKENS = 4096
|
| 61 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 62 |
|
| 63 |
-
DESCRIPTION = "# <h1>
|
| 64 |
|
| 65 |
def clear_and_save_textbox(message): return '', message
|
| 66 |
|
|
@@ -104,14 +104,14 @@ def check_input_token_length(message, chat_history, system_prompt):
|
|
| 104 |
with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
| 105 |
gr.Markdown(DESCRIPTION)
|
| 106 |
with gr.Group():
|
| 107 |
-
chatbot = gr.Chatbot(label='
|
| 108 |
with gr.Row():
|
| 109 |
-
textbox = gr.Textbox(container=False, show_label=False, placeholder='
|
| 110 |
model_id = gr.Dropdown(label='LLM',
|
| 111 |
choices=[
|
| 112 |
-
'mistralai/Mistral-7B-Instruct-v0.1',
|
| 113 |
'HuggingFaceH4/zephyr-7b-beta',
|
| 114 |
-
'meta-llama/Llama-2-7b-chat-hf'
|
| 115 |
],
|
| 116 |
value='mistralai/Mistral-7B-Instruct-v0.1', scale=3)
|
| 117 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
|
@@ -123,8 +123,8 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
|
| 123 |
|
| 124 |
saved_input = gr.State()
|
| 125 |
|
| 126 |
-
with gr.Accordion(label='Advanced Options', open=False
|
| 127 |
-
system_prompt = gr.Textbox(label='System prompt', value=DEFAULT_SYSTEM_PROMPT, lines=5, interactive=False)
|
| 128 |
max_new_tokens = gr.Slider(label='Max New Tokens', minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|
| 129 |
temperature = gr.Slider(label='Temperatur', minimum=0.1, maximum=4.0, step=0.1, value=0.1)
|
| 130 |
top_p = gr.Slider(label='Top-P (nucleus sampling)', minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|
|
|
|
| 60 |
DEFAULT_MAX_NEW_TOKENS = 4096
|
| 61 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 62 |
|
| 63 |
+
DESCRIPTION = "# <h1>ChatGEO</h1>"
|
| 64 |
|
| 65 |
def clear_and_save_textbox(message): return '', message
|
| 66 |
|
|
|
|
| 104 |
with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
| 105 |
gr.Markdown(DESCRIPTION)
|
| 106 |
with gr.Group():
|
| 107 |
+
chatbot = gr.Chatbot(label='ChatGEO')
|
| 108 |
with gr.Row():
|
| 109 |
+
textbox = gr.Textbox(container=False, show_label=False, placeholder='Olá, ChatGEO', scale=7)
|
| 110 |
model_id = gr.Dropdown(label='LLM',
|
| 111 |
choices=[
|
| 112 |
+
#'mistralai/Mistral-7B-Instruct-v0.1',
|
| 113 |
'HuggingFaceH4/zephyr-7b-beta',
|
| 114 |
+
#'meta-llama/Llama-2-7b-chat-hf'
|
| 115 |
],
|
| 116 |
value='mistralai/Mistral-7B-Instruct-v0.1', scale=3)
|
| 117 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
|
|
|
| 123 |
|
| 124 |
saved_input = gr.State()
|
| 125 |
|
| 126 |
+
with gr.Accordion(label='Advanced Options', open=False):
|
| 127 |
+
system_prompt = gr.Textbox(label='System prompt', value=DEFAULT_SYSTEM_PROMPT, lines=5, interactive=False, hide=True)
|
| 128 |
max_new_tokens = gr.Slider(label='Max New Tokens', minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|
| 129 |
temperature = gr.Slider(label='Temperatur', minimum=0.1, maximum=4.0, step=0.1, value=0.1)
|
| 130 |
top_p = gr.Slider(label='Top-P (nucleus sampling)', minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|