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

how do i install it? #1

Open
oogxdd opened this issue Jul 5, 2021 · 14 comments
Open

how do i install it? #1

oogxdd opened this issue Jul 5, 2021 · 14 comments

Comments

@oogxdd
Copy link

oogxdd commented Jul 5, 2021

i'm new to python. can i use some help?

@TheProtaganist
Copy link
Owner

That's quite alright I'm pretty new at python myself. I've been using it for 2 years 🙂. This isn't exactly a python package yet but to use download the latest release, in the example.py file copy, what I have in the "Usage" section that can be found in https://github.com/TheProtaganist/gpt-j. Then if you are using an ide or idle use "find-replace" and where it says bot replace that with the person or character you wish to talk create. Where it says user you can put in any name. In a python, editor go to where it says edit, scroll down till you see replace and replace bot and user one by one. Then in the sample dialog just replace the current text with any conversation you want (the bot or whatever you replaced bot with being the one who will respond). I suggest you only replace the bot and user values changing the other values might cause problems. One last piece of advice. Keep numbers (temperature 0.3 and top_p 0.6) as low as possible. somewhere between 1 and zero will work. If you have any more questions feel free to ask.

@oogxdd
Copy link
Author

oogxdd commented Jul 6, 2021

yeah i mean more like how to install GPTJ dependency? i tried to do it with pip but no success

i'm trying to run example.py file but it says it can't resolve GPTJ dependency

@TheProtaganist
Copy link
Owner

sorry for the inconvenience. It seems I forgot to add a requirements text in my program. Try installing requests library and see if it works. In the meantime, I'll add requirements.txt to the repository.

@TheProtaganist
Copy link
Owner

It would appear the site is down again. It might be up in a few. Sorry for this. I'll let you know when it is fixed...

@oogxdd
Copy link
Author

oogxdd commented Jul 6, 2021

KK can't wait to try the api

@TheProtaganist
Copy link
Owner

I'm working on a lot of things right now and I should have a new release ready in no time. Good news the site is back online!!! I'll have it ready soon.

@TheProtaganist
Copy link
Owner

Working on a few bugs I'll have it ready by tomorrow...

@TheProtaganist
Copy link
Owner

It would appear I accidentally deleted the files of the project by trying to upload my first package. I'm very sorry for the delay. I'll have it ready no later than tomorrow. I just need to recover some files.

@oogxdd
Copy link
Author

oogxdd commented Jul 9, 2021

no worries. i seem to got it working with a node server

although i like where you're going. i want to build a tl;dr summarizer with gpt-j but found that it doesn't treat "tl;dr:" keyword same way gpt-3 does and produces you generation instead of summarisation

but now i see in your repo how i can train the model by providing it example and hope that would work (if i feed it a couple of tldr's)

i'm using an endpoint provided by https://github.com/vicgalle/gpt-j-api. do you know if i can use advance features with this endpoint?

i'm also curious in using python more so will be looking for your lib to be ready as well 😇

@TheProtaganist
Copy link
Owner

All done! do pip install gptj and import GPTJ.Basic_api and GPTJ.gptj_api or after you have installed it just download the files I provided here and change the prompts to something that fits your needs. I published the gptj package on PyPI yesterday. I was gonna inform you but I was too tried after working on the project all day. It was like 12:00AM. Thank you for your interest in this project if you have any more questions feel free to ask 🤗

@TheProtaganist
Copy link
Owner

TheProtaganist commented Jul 9, 2021

I am planning to add an examples folder with a list of prompts you can give. Bad words are censored and it will return an error if anyone is using the API for spam. But the examples you can give are literally endless as long as it doesn't contain offensive content. I am kinda tired after working on projects all day but I'll have an examples folder ready soon.

@TheProtaganist
Copy link
Owner

new version 2.2.2 added install to get rid of single-line responses from the previous version 2.2.0

@oogxdd
Copy link
Author

oogxdd commented Jul 9, 2021

any suggestions on how i can implement content filter? (to exclude an offensive content)

@TheProtaganist
Copy link
Owner

TheProtaganist commented Jul 9, 2021

I already did that. I used an algorithm to make sure that if someone is using it for spam it will give a message that they can't use spam. But for the bot response, I would suggest you set the examples to words that don't contain bad words (Although it wouldn't be possible to give bad words because they blocked). I suggest from GPTJ.security import check_for_insults (if check_for_insults(response) != "" (contains insults): do (your code))

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

No branches or pull requests

2 participants