# Text classification with 100 labels - Multi label

**URL:** <https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884>\
**Category:** Uncategorized\
**Tags:** enhancement, usage, textcat, done, front-end\
**Created:** [May 8, 2020, 11:32am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884 "2020-05-08T11:32:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 8, 2020, 11:32am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/1 "2020-05-08T11:32:44Z")

</div>

I am trying multi-label and multi-class classifier (around 100) classes. I read up many of the answers and also your documentation, I am going with the approach of labelling on a class at a time but I want to add a feature which can also take in suggestions from the annotators for the other classes that this text might belong to.

For this, I wrote a custom recipe which will also give a text-input (which is free text), to make it easier for me to later merge all this data I want to provide the user with a drop-down with my label list. I wanted to know if we can do this in the same text input block.

Any suggestions/help on this is highly appreciated.

Thanks,  
Vaishnavi

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 8, 2020, 8:01pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/2 "2020-05-08T20:01:19Z")

</div>

> [@VaishKandala](#):
>
> For this, I wrote a custom recipe which will also give a text-input (which is free text), to make it easier for me to later merge all this data I want to provide the user with a drop-down with my label list. I wanted to know if we can do this in the same text input block.

Hi! Just to make sure I understand the question correctly: You want to have a free-form input that also has a dropdown/typeahead with options? For example, like this: [W3Schools Tryit Editor](https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_datalist)

It's not currently built in – although it's a nice idea, especially adding it to the input as a datalist – I'll test this as a new feature 🤓 In the meantime, you could add this as a custom HTML block as an `<input>` with a `<datalist>` and add [custom JavaScript](https://prodi.gy/docs/custom-interfaces#js-css) that calls `window.prodigy.update({ user_input: input.value })` to update the current task with whatever the user has typed in.

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 11, 2020, 5:30am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/3 "2020-05-11T05:30:18Z")

</div>

Thanks Ines. Yes, this is precisely what I wanted 🙂 I will write a custom HTML Block for now!

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 11, 2020, 9:28am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/4 "2020-05-11T09:28:03Z")

</div>

Okay, perfect 🙂

Btw, I played around with the feature and it was very easy to implement, so Prodigy v1.10 will support a `"field_suggestions"` property that lets you provide a list of auto-suggestions that are shown when the user types or presses ↓ in the field.

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 25, 2020, 12:46pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/5 "2020-05-25T12:46:12Z")

</div>

Hi Ines,

I am now trying to run multiple annotations on different ports. These are manual annotations for Gold Set no training happening in the background. My commands look something like this:

PRODIGY\_PORT=5678 prodigy classification mechanics file\_name l -F /nlp/prodigy\_pipeline/custom\_recipe/interface\_receipe.py

I am able to run it normally but when I try to use "nohup" mode it's not working. Why do you think so?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 26, 2020, 8:48am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/6 "2020-05-26T08:48:58Z")

</div>

> [@VaishKandala](#):
>
> I am able to run it normally but when I try to use "nohup" mode it's not working. Why do you think so?

What exactly do you mean by "not working"? Is there an error?

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 26, 2020, 8:55am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/7 "2020-05-26T08:55:06Z")

</div>

Yes, it says the command cannot be run file or directory missing.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 26, 2020, 12:36pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/8 "2020-05-26T12:36:39Z")

</div>

Hmm, this sounds like it might not be a problem with Prodigy directly and more with the way `nohup` runs the command? It should definitely be no problem to run Prodigy this way and people have been doing this a lot. What command did you run? Just `PRODIGY_PORT=5678 nohup prodigy [...]`?

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 27, 2020, 8:06am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/9 "2020-05-27T08:06:31Z")

</div>

Thanks Ines.

I was able to get this to work. There was a problem with the ec2 instance and fixed it now.

However, I have one last pressing issue. As I have mentioned earlier I am annotating for multi-label, multi-class classification task. I have around 100 classes, I want to start three parallel annotation sessions.

PRODIGY\_PORT=5678 nohup prodigy [....] --label class1  
PRODIGY\_PORT=1234 nohup prodigy [....] --label class2 and so-on.

I am hosting prodigy application in Ec2 instance and able to run multiple sessions successfully. But when I use proxy\_pass the external link says "Oops, something went wrong" - Project couldn't be fetched properly.

I tried proxypass with other generic websites and it works fine, so I am assuming it's got something to do with my prodigy project.

 ![Screenshot 2020-05-28 at 10.39.13 AM](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/7/7a9e1f95a12b489affc0fa2fabe01cd2a0255a83.png)

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 28, 2020, 5:36am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/10 "2020-05-28T05:36:22Z")

</div>

![Screenshot 2020-05-28 at 11.00.23 AM](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/9/9224e8b55968935264be3b6ed62f334114e7410f.png)

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 28, 2020, 5:37am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/11 "2020-05-28T05:37:42Z")

</div>

Hi @ines  
It works fine for one proxypass but from the next one onwards it gives that error. Also, I checked the explorer console - it says "502 bad gateway". I am using Chrome.

---

<div class="post-metadata">

**Author:** ![tiangolo](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/tiangolo/32/1143_2.png) [@tiangolo](https://support.prodi.gy/u/tiangolo)\
**Post date:** [May 28, 2020, 7:32pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/12 "2020-05-28T19:32:39Z")

</div>

Hey @VaishKandala , what are you using with proxypass? Maybe Nginx? Apache? Or something like Traefik?

You might want to check if there's any error in the console, in developer tools.

Then also check the logs for the system on front (Nginx, Apache, Traefik, etc) .

And then also check the logs for Prodigy.

If you are running with nohup, you can probably redirect the output to a file, so that you can see the logs later, for example, something like:

```python
nohup prodigy ...some-params-here > logs-prodigy1.log 2>&1 

```

The `> logs-prodigy1.log` makes the logs go to a file `logs-prodigy1.log`, you would use a different file for each Prodigy you start. And then `2>&1` makes the `sterr` (the "error" logs) go to the same file as the normal logs.

Then, when you get the issue again, you can check if there's any error in those files too.

But also make sure you check in the proxy (Nginx, Apache, Traefik, etc) as the error might be in its configurations.

---

<div class="post-metadata">

**Author:** ![VaishKandala](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vaishkandala/32/1383_2.png) [@VaishKandala](https://support.prodi.gy/u/VaishKandala)\
**Post date:** [May 29, 2020, 9:52am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/13 "2020-05-29T09:52:10Z")

</div>

Thanks @tiangolo.

I am using Nginx and finally could figure out the issue. This is my first attempt with Nginx and I wasn't passing the ports in "upstream" so it was picking the default or if the default is not running it was giving an error. Now, the problem is solved with Nginx.

Thanks,  
Vaishnavi

---

<div class="post-metadata">

**Author:** ![tiangolo](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/tiangolo/32/1143_2.png) [@tiangolo](https://support.prodi.gy/u/tiangolo)\
**Post date:** [May 30, 2020, 4:18pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/14 "2020-05-30T16:18:59Z")

</div>

Awesome @VaishKandala ! 🎉

Thanks for reporting back.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 17, 2020, 5:57pm UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/15 "2020-06-17T17:57:53Z")

</div>

> [@ines](#):
>
> Btw, I played around with the feature and it was very easy to implement, so Prodigy v1.10 will support a `"field_suggestions"` property that lets you provide a list of auto-suggestions that are shown when the user types or presses ↓ in the field.

Just released Prodigy v1.10, which adds the `field_suggestions` option to `text_input` blocks!

> [@rocket Out now: Prodigy v1.10 (plus new video!)](https://support.prodi.gy/t/out-now-prodigy-v1-10-plus-new-video/3030):
>
> Prodigy v1.10 is out now tada And it includes a bunch of cool new features, including dependency and relation annotation, audio and video annotation, an enhanced manual image UI, more settings for NER annotation, including character-based highlighting and a cool example workflow for creating training data for fine-tuning transformer models, new recipe callbacks for validating answers at runtime and for modifying examples before the database, new settings for UI customisation, and lots more! Th…

---

<div class="post-metadata">

**Author:** ![Mayank](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/mayank/32/1435_2.png) [@Mayank](https://support.prodi.gy/u/Mayank)\
**Post date:** [July 6, 2020, 7:05am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/16 "2020-07-06T07:05:14Z")

</div>

Hi @ines

I want to train a multi-label text classification model on the data provided on Prodigy docs page _news\_headlines.jsonl_. For this I need the annotated data set. Is it available? If it is, please share me the download link.  
Thanks

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [July 6, 2020, 10:00am UTC](https://support.prodi.gy/t/text-classification-with-100-labels-multi-label/2884/17 "2020-07-06T10:00:36Z")

</div>

> [@Mayank](#):
>
> For this I need the annotated data set. Is it available? If it is, please share me the download link.

Yes, there's a link "Downoad annotated data" here, but that includes the data annotated with some named entties: [Prodigy 101 – everything you need to know · Prodigy · An annotation tool for AI, Machine Learning & NLP](https://prodi.gy/docs/#first-steps3) You can also download the raw data from there. It's just some news headlines, nothing special.

Also, note that this is just an example dataset, though and it was created for the tutorial to make it easier for people to try things out. It's not particularly useful outside of that, so if you actually want to train your own model, you should also create your own dataset.
