ELin2025 commented on code in PR #5568:
URL: https://github.com/apache/texera/pull/5568#discussion_r3445071047
##########
frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts:
##########
@@ -237,6 +507,19 @@ export class OperatorPropertyEditFrameComponent implements
OnInit, OnChanges, On
});
}
+ private isHuggingFaceOperator(): boolean {
+ if (!this.currentOperatorId) return false;
+ const operator =
this.workflowActionService.getTexeraGraph().getOperator(this.currentOperatorId);
+ return operator.operatorType === "HuggingFace";
+ }
Review Comment:
Done
##########
frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts:
##########
@@ -167,6 +170,273 @@ export class OperatorPropertyEditFrameComponent
implements OnInit, OnChanges, On
// used to tear down subscriptions that takeUntil(teardownObservable)
private teardownObservable: Subject<void> = new Subject();
+ readonly huggingFaceTaskPreviewSamples: Record<
+ string,
+ {
+ kind: "image" | "video" | "audio" | "text";
+ inputLabel?: string;
+ outputLabel?: string;
+ title?: string;
+ body?: string;
+ outputBody?: string;
+ pills?: string[];
+ assetSrc?: string;
+ }
+ > = {
+ "text-to-image": {
+ kind: "image",
+ inputLabel: "Text prompt",
+ outputLabel: "Generated image",
+ title: "Comic-style city action scene",
+ body: "Prompt becomes a generated image preview.",
+ assetSrc: "assets/sample-image.png",
+ },
+ "image-to-image": {
+ kind: "image",
+ inputLabel: "Source image",
+ outputLabel: "Edited image",
+ title: "Image transformation preview",
+ body: "Image input produces a modified image result.",
+ assetSrc: "assets/sample-image.png",
+ },
+ "text-to-video": {
+ kind: "video",
+ inputLabel: "Text prompt",
+ outputLabel: "Generated video",
+ title: "Prompt-based motion preview",
+ body: "Prompt becomes a generated video clip.",
+ assetSrc: "assets/sample-video.mp4",
+ },
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]