Skip to content

Commit 6b552ef

Browse files
author
Mishig Davaadorj
authored
Mv interfaces -> widgets/lib/interfaces (#227)
* Mv `interfaces` -> `widgets/lib/interfaces`
1 parent e71da5f commit 6b552ef

File tree

22 files changed

+85
-67
lines changed

22 files changed

+85
-67
lines changed

.github/workflows/js-interfaces-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: JS Interfaces
33
on:
44
push:
55
paths:
6-
- "interfaces/**"
6+
- "widgets/lib/interfaces/**"
77
pull_request:
88
paths:
9-
- "interfaces/**"
9+
- "widgets/lib/interfaces/**"
1010

1111

1212
jobs:
@@ -28,6 +28,6 @@ jobs:
2828
- name: Install deps
2929
run: npm i @types/node
3030
- name: Compile
31-
working-directory: ./interfaces
31+
working-directory: ./widgets/lib/interfaces
3232
run: |
3333
time tsc *.ts --lib es6,es2016,es2017,es2018,esnext --target es2018 --module commonjs --outDir dist

.github/workflows/js-widgets-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
paths:
66
- "widgets/**"
7+
- "!widgets/lib/interfaces/**"
78
pull_request:
89
paths:
910
- "widgets/**"
11+
- "!widgets/lib/interfaces/**"
1012

1113

1214
jobs:

.github/workflows/python-quality.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
branches:
66
- main
77
paths-ignore:
8-
- "interfaces/**"
98
- "widgets/**"
109
- "api-inference-community/**"
1110
pull_request:
1211
types: [assigned, opened, synchronize, reopened]
1312
paths-ignore:
14-
- "interfaces/**"
1513
- "widgets/**"
1614
- "api-inference-community/**"
1715

.github/workflows/python-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
branches:
66
- main
77
paths-ignore:
8-
- "interfaces/**"
98
- "widgets/**"
109
- "api-inference-community/**"
1110
pull_request:
1211
types: [assigned, opened, synchronize, reopened]
1312
paths-ignore:
14-
- "interfaces/**"
1513
- "widgets/**"
1614
- "api-inference-community/**"
1715

docs/hub/adding-a-library.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ explaining how that should be done.
140140

141141

142142
In order to do this, please take a look and update the following file with
143-
mentions of your library: [interfaces/Libraries.ts](https://github.com/huggingface/huggingface_hub/blob/main/interfaces/Libraries.ts).
143+
mentions of your library: [interfaces/Libraries.ts](https://github.com/huggingface/huggingface_hub/blob/main/widgets/lib/interfaces/Libraries.ts).
144144
This file is in Typescript as this is the ground truth that we're using on the Hugging Face website. A good
145145
understanding of Typescript isn't necessary to edit the file.
146146

@@ -316,7 +316,7 @@ All our widgets are [open sourced](https://github.com/huggingface/huggingface_hu
316316
### New pipelines
317317

318318
If you're adding a new pipeline type, you might also want to take a look at adding it to the
319-
[Types.ts](https://github.com/huggingface/huggingface_hub/blob/main/interfaces/Types.ts) for it to be identifiable as a possible pipeline.
319+
[Types.ts](https://github.com/huggingface/huggingface_hub/blob/main/widgets/lib/interfaces/Types.ts) for it to be identifiable as a possible pipeline.
320320

321321
Secondly, you should set the
322-
[widget default for that new pipeline](https://github.com/huggingface/huggingface_hub/blob/main/interfaces/DefaultWidget.ts) if you can.
322+
[widget default for that new pipeline](https://github.com/huggingface/huggingface_hub/blob/main/widgets/lib/interfaces/DefaultWidget.ts) if you can.

docs/hub/libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Hugging Face Hub Libraries Docs
99

1010
No, the Hub supports other libraries and we're working on expanding this support! We're happy to welcome to the Hub a set of Open Source libraries that are pushing Machine Learning forward.
1111

12-
The table below summarizes the supported libraries and how they are integrated. Find all our supported libraries [here](https://github.com/huggingface/huggingface_hub/blob/main/interfaces/Libraries.ts)!
12+
The table below summarizes the supported libraries and how they are integrated. Find all our supported libraries [here](https://github.com/huggingface/huggingface_hub/blob/main/widgets/lib/interfaces/Libraries.ts)!
1313

1414
| Library | Description | Inference API | Widgets | Download from Hub | Push to Hub |
1515
|-----------------------|-------------------------------------------------------------------------------|---------------|-------:|-------------------|-------------|

docs/hub/main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ For `🤗 Transformers` however, the model type is determined automatically from
6565

6666
## What are all the possible task/widget types?
6767

68-
You can find all the supported tasks [here](https://github.com/huggingface/huggingface_hub/blob/main/interfaces/Types.ts).
68+
You can find all the supported tasks [here](https://github.com/huggingface/huggingface_hub/blob/main/widgets/lib/interfaces/Types.ts).
6969

7070
Here are some with links to examples:
7171

docs/hub/model-repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ widget:
7171
- text: "Jens Peter Hansen kommer fra Danmark"
7272
```
7373
74-
We try to provide example inputs for some languages and most widget types in [this DefaultWidget.ts file](https://github.com/huggingface/huggingface_hub/blob/master/interfaces/DefaultWidget.ts). If we lack some examples, please open a PR updating this file to add them. Thanks!
74+
We try to provide example inputs for some languages and most widget types in [this DefaultWidget.ts file](https://github.com/huggingface/huggingface_hub/blob/master/widgets/lib/interfaces/DefaultWidget.ts). If we lack some examples, please open a PR updating this file to add them. Thanks!
7575
7676
## Can I specify which framework supports my model?
7777

widgets/package-lock.json

Lines changed: 66 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

widgets/src/lib/InferenceWidget/InferenceWidget.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import type { SvelteComponent } from "svelte";
3-
import type { PipelineType } from "../../../../interfaces/Types";
3+
import type { PipelineType } from "$lib/interfaces/Types";
44
import type { WidgetProps } from "./shared/types";
55
66
import AudioSourceSeparationWidget from "./widgets/AudioSourceSeparationWidget/AudioSourceSeparationWidget.svelte";

0 commit comments

Comments
 (0)