Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Transformerlab App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
TransformerLab
Transformerlab App
Commits
fef4f87b
Commit
fef4f87b
authored
10 months ago
by
Tony Salomone
Browse files
Options
Downloads
Patches
Plain Diff
Pass source to model import.
parent
6a69ad62
No related branches found
Branches containing commit
Tags
llamaindex@0.0.9
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/renderer/components/ModelZoo/ImportModelsModal.tsx
+9
-4
9 additions, 4 deletions
src/renderer/components/ModelZoo/ImportModelsModal.tsx
with
9 additions
and
4 deletions
src/renderer/components/ModelZoo/ImportModelsModal.tsx
+
9
−
4
View file @
fef4f87b
...
...
@@ -25,7 +25,7 @@ const fetcher = (url) => fetch(url).then((res) => res.json());
export
default
function
ImportModelsModal
({
open
,
setOpen
})
{
const
[
importing
,
setImporting
]
=
useState
(
false
);
const
[
modelFolder
,
setModelFolder
]
=
useState
(
null
);
const
[
modelFolder
,
setModelFolder
]
=
useState
(
null
);
// Disabled folder support
const
{
data
:
modelsData
,
...
...
@@ -52,14 +52,15 @@ export default function ImportModelsModal({ open, setOpen}) {
let
next
=
model_ids
.
next
();
while
(
!
next
.
done
)
{
// In the iterator, each ite
a
m is a key (model_id) and a value (
blank
)
// In the iterator, each item is a key (model_id) and a value (
model_source
)
// this is just how it gets produced from the form
const
model_id
=
next
.
value
[
0
];
const
model_source
=
next
.
value
[
1
];
console
.
log
(
"
Importing
"
+
model_id
);
const
response
=
await
fetch
(
// TODO: Hardcoding hugging face as model source for now as it's the only source
chatAPI
.
Endpoints
.
Models
.
ImportLocal
(
"
huggingfa
ce
"
,
model_id
)
chatAPI
.
Endpoints
.
Models
.
ImportLocal
(
model_sour
ce
,
model_id
)
);
// Read the response to see if it was successful and report any errors
...
...
@@ -202,7 +203,11 @@ export default function ImportModelsModal({ open, setOpen}) {
{
row
.
installed
?
"
"
:
(
row
.
supported
?
<
Checkbox
name
=
{
row
.
id
}
defaultChecked
/>
?
<
Checkbox
name
=
{
row
.
id
}
value
=
{
row
.
source
}
defaultChecked
/>
:
<
Checkbox
disabled
/>
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment