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

Widget for image captioning #15

Closed
osanseviero opened this issue Jun 16, 2021 · 12 comments
Closed

Widget for image captioning #15

osanseviero opened this issue Jun 16, 2021 · 12 comments
Assignees

Comments

@osanseviero
Copy link
Member

Would have as input

  • Image

Would output

  • Text

This should be similar in implementation to the image classification widget.

@mishig25
Copy link
Collaborator

I've implement ImageCaptioningWidget here.

input/request: identical to ImageClassificationWidget
const requestBody = { file }; // uploaded image

output/response: identical to TextGenerationWidget
[ { "generated_text": "..." } ]

Questions:

  1. I've assumed ImageCaptioningWidget api contract (request and response specifications) from similar widgets. Please let me know if there's a better way to find api contracts for the widgets
  2. What modelId should I supply here?
  3. Would there be icon for ImageCaptioingWidget?
  4. Is there a preferred way to mock/stub the api response?

@osanseviero
Copy link
Member Author

That's very cool! Feel free to open a draft PR so we can discuss over code 😄

  1. Your proposed API contract seems fine to me. I'll send a PR to add this pipeline (FYI @Narsil in case you have ideas)
  2. At the moment we have no model for this task. You can remove it for the time being :)
  3. Yes, we should have an icon. @julien-c any ideas?

@Narsil
Copy link

Narsil commented Jun 17, 2021

  1. LGTM too.

  2. There are not "spec" like openAPI or something like it, aside from code right now.

@mishig25
Copy link
Collaborator

@osanseviero removed ModelData from widgets/src/routes/index.svelte and opened a draft PR huggingface/huggingface_hub#115

@julien-c
Copy link
Member

Would there be icon for ImageCaptioingWidget?

Feel free to propose one @mishig25!

@julien-c
Copy link
Member

@mishig25 our icon style is from https://icones.js.org/collection/carbon (cc @gary149)

@julien-c
Copy link
Member

@osanseviero

At the moment we have no model for this task. You can remove it for the time being :)

Let's plan to add/build one otherwise this widget won't be terribly useful :)

@osanseviero
Copy link
Member Author

Let's plan to add/build one otherwise this widget won't be terribly useful :)

Yeah, I'm on it right now :)

huggingface/huggingface_hub#114 added the pipeline to the API validation, now we need to add it to one of the docker images (I was thinking to a new Keras image).

@mishig25
Copy link
Collaborator

@julien-c how does this one look: carbon:align-box-bottom-center ?

@julien-c
Copy link
Member

@mishig25 yeah looks good to me

@mishig25
Copy link
Collaborator

mishig25 commented Jun 17, 2021

@julien-c added the icon and pushed the changes

@osanseviero
Copy link
Member Author

This is now done for text-to-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants