Spaces:
Runtime error
Runtime error
Commit
·
b8fa7b7
1
Parent(s):
21c67be
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,16 +99,7 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
|
| 99 |
undo_button = gr.Button('Undo', variant='secondary')
|
| 100 |
clear_button = gr.Button('Clear', variant='secondary')
|
| 101 |
|
| 102 |
-
|
| 103 |
-
textbox = gr.Textbox(container=False, show_label=False, placeholder='Olá, ChatGEO', scale=7)
|
| 104 |
-
model_id = gr.Dropdown(label='LLM',
|
| 105 |
-
choices=[
|
| 106 |
-
'mistralai/Mistral-7B-Instruct-v0.1',
|
| 107 |
-
'HuggingFaceH4/zephyr-7b-beta',
|
| 108 |
-
'meta-llama/Llama-2-7b-chat-hf'
|
| 109 |
-
],
|
| 110 |
-
value='mistralai/Mistral-7B-Instruct-v0.1', scale=3)
|
| 111 |
-
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
| 112 |
|
| 113 |
saved_input = gr.State()
|
| 114 |
|
|
@@ -120,6 +111,17 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
|
| 120 |
top_p = gr.Slider(label='Top-P (nucleus sampling)', minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|
| 121 |
top_k = gr.Slider(label='Top-K', minimum=1, maximum=1000, step=1, value=10)
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
textbox.submit(
|
| 124 |
fn=clear_and_save_textbox,
|
| 125 |
inputs=textbox,
|
|
|
|
| 99 |
undo_button = gr.Button('Undo', variant='secondary')
|
| 100 |
clear_button = gr.Button('Clear', variant='secondary')
|
| 101 |
|
| 102 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
saved_input = gr.State()
|
| 105 |
|
|
|
|
| 111 |
top_p = gr.Slider(label='Top-P (nucleus sampling)', minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|
| 112 |
top_k = gr.Slider(label='Top-K', minimum=1, maximum=1000, step=1, value=10)
|
| 113 |
|
| 114 |
+
with gr.Row():
|
| 115 |
+
textbox = gr.Textbox(container=False, show_label=False, placeholder='Olá, ChatGEO', scale=7)
|
| 116 |
+
model_id = gr.Dropdown(label='LLM',
|
| 117 |
+
choices=[
|
| 118 |
+
'mistralai/Mistral-7B-Instruct-v0.1',
|
| 119 |
+
'HuggingFaceH4/zephyr-7b-beta',
|
| 120 |
+
'meta-llama/Llama-2-7b-chat-hf'
|
| 121 |
+
],
|
| 122 |
+
value='HuggingFaceH4/zephyr-7b-beta', scale=3)
|
| 123 |
+
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
| 124 |
+
|
| 125 |
textbox.submit(
|
| 126 |
fn=clear_and_save_textbox,
|
| 127 |
inputs=textbox,
|