Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hmm 🤔 #974

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions js/src/lib/components/InferenceWidget/InferenceWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
import FeatureExtractionWidget from "./widgets/FeatureExtractionWidget/FeatureExtractionWidget.svelte";
import FillMaskWidget from "./widgets/FillMaskWidget/FillMaskWidget.svelte";
import ImageClassificationWidget from "./widgets/ImageClassificationWidget/ImageClassificationWidget.svelte";
import ImageSegmentationWidget from "./widgets/ImageSegmentationWidget/ImageSegmentationWidget.svelte";
import ImageToImageWidget from "./widgets/ImageToImageWidget/ImageToImageWidget.svelte";
import ImageToTextWidget from "./widgets/ImageToTextWidget/ImageToTextWidget.svelte";
import ImageSegmentationWidget from "./widgets/ImageSegmentationWidget/ImageSegmentationWidget.svelte";
import ObjectDetectionWidget from "./widgets/ObjectDetectionWidget/ObjectDetectionWidget.svelte";
import QuestionAnsweringWidget from "./widgets/QuestionAnsweringWidget/QuestionAnsweringWidget.svelte";
import VisualQuestionAnsweringWidget from "./widgets/VisualQuestionAnsweringWidget/VisualQuestionAnsweringWidget.svelte";
import ReinforcementLearningWidget from "./widgets/ReinforcementLearningWidget/ReinforcementLearningWidget.svelte";
import SentenceSimilarityWidget from "./widgets/SentenceSimilarityWidget/SentenceSimilarityWidget.svelte";
import SummarizationWidget from "./widgets/SummarizationWidget/SummarizationWidget.svelte";
import TableQuestionAnsweringWidget from "./widgets/TableQuestionAnsweringWidget/TableQuestionAnsweringWidget.svelte";
import TabularDataWidget from "./widgets/TabularDataWidget/TabularDataWidget.svelte";
import TextGenerationWidget from "./widgets/TextGenerationWidget/TextGenerationWidget.svelte";
import TextToImageWidget from "./widgets/TextToImageWidget/TextToImageWidget.svelte";
import TextToSpeechWidget from "./widgets/TextToSpeechWidget/TextToSpeechWidget.svelte";
import TokenClassificationWidget from "./widgets/TokenClassificationWidget/TokenClassificationWidget.svelte";
import TabularDataWidget from "./widgets/TabularDataWidget/TabularDataWidget.svelte";
import ReinforcementLearningWidget from "./widgets/ReinforcementLearningWidget/ReinforcementLearningWidget.svelte";
import VisualQuestionAnsweringWidget from "./widgets/VisualQuestionAnsweringWidget/VisualQuestionAnsweringWidget.svelte";
import ZeroShotClassificationWidget from "./widgets/ZeroShowClassificationWidget/ZeroShotClassificationWidget.svelte";
import ZeroShotImageClassificationWidget from "./widgets/ZeroShotImageClassificationWidget/ZeroShotImageClassificationWidget.svelte";

Expand Down
2 changes: 1 addition & 1 deletion js/src/lib/components/InferenceWidget/shared/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export async function getModelLoadInfo(
if (response.ok && typeof output === "object" && output.loaded !== undefined) {
// eslint-disable-next-line @typescript-eslint/naming-convention
const {state, compute_type} = output;
return {compute_type, state}
return {compute_type, state};
} else {
console.warn(response.status, output.error);
return {state: "error" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
</script>

s<WidgetWrapper
<WidgetWrapper
{apiUrl}
{includeCredentials}
{applyInputSample}
Expand Down
1 change: 1 addition & 0 deletions js/src/lib/interfaces/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ export type WidgetInputSampleValue =
| number
| number[]
| Record<string, string | string[] | number[]>;

export type WidgetInputSample = Record<string | "example_title" | "group", WidgetInputSampleValue>;

/**
Expand Down