Spaces:
Sleeping
Sleeping
Update webui.py
Browse files
webui.py
CHANGED
@@ -53,6 +53,8 @@ def load_model(path, n_ctx, n_gpu_layers, n_threads, verbose, f16_kv, logits_all
|
|
53 |
except:
|
54 |
return ""
|
55 |
|
|
|
|
|
56 |
def list_models(name):
|
57 |
return os.listdir(f"{dir}/models")
|
58 |
|
@@ -117,7 +119,7 @@ chatbot = gr.Chatbot(show_label=False, layout="panel", show_copy_button=True, he
|
|
117 |
|
118 |
with gr.Blocks(theme="theme-repo/STONE_Theme", title="TensorLM", css="style.css") as demo:
|
119 |
with gr.Row():
|
120 |
-
model = gr.Dropdown(label="Model (only based on Llama in GGML format (.bin))", choices=os.listdir(f"{dir}/models"), value="
|
121 |
#refresh_model = gr.Button(value="Load model", interactive=True, scale=1)
|
122 |
with gr.Row():
|
123 |
with gr.Tab("💬"):
|
@@ -217,8 +219,8 @@ with gr.Blocks(theme="theme-repo/STONE_Theme", title="TensorLM", css="style.css"
|
|
217 |
|
218 |
|
219 |
|
220 |
-
model.change(load_model, inputs=[model, n_ctx, n_gpu_layers, n_threads, verbose, f16_kv, logits_all, vocab_only, use_mmap, use_mlock, n_batch, last_n_tokens_size, low_vram, rope_freq_base, rope_freq_scale], outputs=model, api_name=False, queue=False)
|
221 |
-
reload_model.click(load_model, inputs=[model, n_ctx, n_gpu_layers, n_threads, verbose, f16_kv, logits_all, vocab_only, use_mmap, use_mlock, n_batch, last_n_tokens_size, low_vram, rope_freq_base, rope_freq_scale], outputs=model, api_name=False, queue=True)
|
222 |
|
223 |
|
224 |
|
|
|
53 |
except:
|
54 |
return ""
|
55 |
|
56 |
+
load_model("llama-2-7b-chat.ggmlv3.q2_K.bin", 2048, 0, 32, True, True, False, False, True, False, 512, 64, False, 10000, 1)
|
57 |
+
|
58 |
def list_models(name):
|
59 |
return os.listdir(f"{dir}/models")
|
60 |
|
|
|
119 |
|
120 |
with gr.Blocks(theme="theme-repo/STONE_Theme", title="TensorLM", css="style.css") as demo:
|
121 |
with gr.Row():
|
122 |
+
model = gr.Dropdown(label="Model (only based on Llama in GGML format (.bin))", choices=os.listdir(f"{dir}/models"), value="llama-2-7b-chat.ggmlv3.q2_K.bin", interactive=False, allow_custom_value=False, scale=50)
|
123 |
#refresh_model = gr.Button(value="Load model", interactive=True, scale=1)
|
124 |
with gr.Row():
|
125 |
with gr.Tab("💬"):
|
|
|
219 |
|
220 |
|
221 |
|
222 |
+
#model.change(load_model, inputs=[model, n_ctx, n_gpu_layers, n_threads, verbose, f16_kv, logits_all, vocab_only, use_mmap, use_mlock, n_batch, last_n_tokens_size, low_vram, rope_freq_base, rope_freq_scale], outputs=model, api_name=False, queue=False)
|
223 |
+
#reload_model.click(load_model, inputs=[model, n_ctx, n_gpu_layers, n_threads, verbose, f16_kv, logits_all, vocab_only, use_mmap, use_mlock, n_batch, last_n_tokens_size, low_vram, rope_freq_base, rope_freq_scale], outputs=model, api_name=False, queue=True)
|
224 |
|
225 |
|
226 |
|