Commit fe040ce8 authored by Carlos Daniel Vilaseca's avatar Carlos Daniel Vilaseca
Browse files

rf: dom queries in Models component

parent f4f6724d
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
let showLiteLLM = false; let showLiteLLM = false;
let showLiteLLMParams = false; let showLiteLLMParams = false;
let modelUploadInputElement: HTMLInputElement;
let liteLLMModelInfo = []; let liteLLMModelInfo = [];
let liteLLMModel = ''; let liteLLMModel = '';
...@@ -546,6 +546,7 @@ ...@@ -546,6 +546,7 @@
<div class="flex-1 {modelInputFile && modelInputFile.length > 0 ? 'mr-2' : ''}"> <div class="flex-1 {modelInputFile && modelInputFile.length > 0 ? 'mr-2' : ''}">
<input <input
id="model-upload-input" id="model-upload-input"
bind:this={modelUploadInputElement}
type="file" type="file"
bind:files={modelInputFile} bind:files={modelInputFile}
on:change={() => { on:change={() => {
...@@ -559,9 +560,7 @@ ...@@ -559,9 +560,7 @@
<button <button
type="button" type="button"
class="w-full rounded text-left py-2 px-4 dark:text-gray-300 dark:bg-gray-850" class="w-full rounded text-left py-2 px-4 dark:text-gray-300 dark:bg-gray-850"
on:click={() => { on:click={modelUploadInputElement.click}
document.getElementById('model-upload-input').click();
}}
> >
{#if modelInputFile && modelInputFile.length > 0} {#if modelInputFile && modelInputFile.length > 0}
{modelInputFile[0].name} {modelInputFile[0].name}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment