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

Add inference demos #174

Open
9 of 25 tasks
coyotte508 opened this issue May 1, 2023 · 14 comments
Open
9 of 25 tasks

Add inference demos #174

coyotte508 opened this issue May 1, 2023 · 14 comments
Labels
documentation Improvements or additions to documentation inference @huggingface/inference related

Comments

@coyotte508
Copy link
Member

coyotte508 commented May 1, 2023

Add demos on https://huggingface.co/huggingfacejs (feel free to contribute demos, or to ask joining the organization)

Natural Language processing

  • Fill mask
  • Summarization
  • Question answering
  • Table question answering
  • Text classification
  • Text generation - demo
  • Text2Text generation
  • Token classification
  • Named entity recognition
  • Translation
  • Zero-shot classification
  • Conversational
  • Feature extraction
  • Sentence Similarity

Audio

  • Automatic speech recognition - demo
  • Audio classification - demo

Computer Vision

  • Image classification - demo
  • Object detection - demo
  • Image segmentation
  • Text to image
  • Image to image
  • Image to text - demo

Multimodal

  • Document question answering - demo
  • Visual question answering - demo

Tabular

  • Tabular regression
@coyotte508 coyotte508 added documentation Improvements or additions to documentation inference @huggingface/inference related labels May 1, 2023
@fikstoday
Copy link
Contributor

Recently used facebook/nllb-200-distilled-600M as model for translation task. Documentation was not clear
After looking at other examples and many errors later, this worked.

let result = await hf.translation({
        model: "facebook/nllb-200-distilled-600M",
        inputs: "how is the weather like in Gaborone",
        parameters : {
        src_lang: "eng_Latn",
        tgt_lang: "sot_Latn" }
      })

@julien-c
Copy link
Member

@fikstoday want to open a PR to add it to the docs?

@fikstoday
Copy link
Contributor

fikstoday commented Aug 21, 2023

Yes Yes
Where would this snippet be best placed?

@ArsalaBangash
Copy link
Contributor

I'm working on an object detection demo on this space

It's currently using Vue because I have faster prototyping speed with it, but it can be taken out once the demos are ready.

I'm actively creating more inference demos for my work with Scrimba, so I'm ready to be more involved with this issue.

@coyotte508
Copy link
Member Author

coyotte508 commented Oct 23, 2023

I'm working on an object detection demo on this space

It's currently using Vue because I have faster prototyping speed with it, but it can be taken out once the demos are ready.

I'm actively creating more inference demos for my work with Scrimba, so I'm ready to be more involved with this issue.

Nice! When it's ready we can duplicate it to https://huggingface.co/huggingfacejs

Vue is no problem, it's nice to have different frameworks

@ArsalaBangash
Copy link
Contributor

My Object Detection Demo is ready for review.

I welcome your feedback!

I'll be tackling image classification next.

@coyotte508
Copy link
Member Author

When clicking on "detect objects" directly, without doing anything else, I get this error:

image

@ArsalaBangash
Copy link
Contributor

@coyotte508 I addressed the issue and pushed my changes. It should work now. The models don't always detect objects so you may have to shuffle a couple times.

@coyotte508
Copy link
Member Author

Thank you, it works really nice!

Duplicated here: https://huggingface.co/spaces/huggingfacejs/object-detection-vue/tree/main

@ArsalaBangash
Copy link
Contributor

The Image Classification Demo is ready to review!

@julien-c
Copy link
Member

really cool Space @ArsalaBangash!

@ArsalaBangash
Copy link
Contributor

Demos for Speech Recognition and Audio Classification are ready to review!

@ArsalaBangash
Copy link
Contributor

I experimented with adding params for response length and temperature in this Text Summarization Demo, but I'd like some ML guidance on the values for the temperature param.

Beyond a value of 1, the results started looking like cgfrS$#%G~VygHB YT5>d%~l;mK~nj$#$#SD^X~C GFgjbNnV Gg~ ?

I have a few questions:

  1. Is it correct to label temperature as a param that controls randomness?
  2. What are reasonable options for the temperature param, and does it depend on the model?
  3. What other detailed params can I showcase that are easily explained without using deeper ML terminology?

@coyotte508
Copy link
Member Author

I experimented with adding params for response length and temperature in this Text Summarization Demo, but I'd like some ML guidance on the values for the temperature param.

Beyond a value of 1, the results started looking like cgfrS$#%G~VygHB YT5>d%~l;mK~nj$#$#SD^X~C GFgjbNnV Gg~ ?

I have a few questions:

1. Is it correct to label temperature as a param that controls randomness?

2. What are reasonable options for the temperature param, and does it depend on the model?

3. What other detailed params can I showcase that are easily explained without using deeper ML terminology?

cc @radames maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation inference @huggingface/inference related
Projects
None yet
Development

No branches or pull requests

4 participants