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

qg not working #20

Open
andre-macdonald opened this issue May 26, 2021 · 8 comments
Open

qg not working #20

andre-macdonald opened this issue May 26, 2021 · 8 comments

Comments

@andre-macdonald
Copy link

Hi, I last used T2T 5 May 2021, today I want to produce more work and it wasn't working. I then downloaded the latest but it too isn't working . Please help. Thanks in advance for quick and positive response

@artitw
Copy link
Owner

artitw commented May 26, 2021

Take a look at the latest documentation in the README to update your code. If you still prefer the old API you can install previous versions according to the date you prefer.

@andre-macdonald
Copy link
Author

hi please help with the error I get, refer image. thanks in advance.
T2T ERROR

@artitw
Copy link
Owner

artitw commented May 28, 2021

Looks like you are using the old API. Below are two options. I would recommend option 2 if possible.

  1. Install older version, e.g. pip install text2text==0.1.0 and keep your code as is.
    OR
  2. Use new API, e.g. pip install -U text2text and follow the code below.
from text2text import Handler
Handler([
            bio_str,
            bio_str,
            bio_str,
            bio_str,
            bio_str,
            "I will go to school today to take my math exam.",
            "I will go to school today to take my math exam.",
            "Tomorrow is my cousin's birthday. He will turn 24 years old.",
            notre_dame_str,
            bacteria_str,
            bacteria_str,
            bacteria_str,
            "I will go to school today to take my math exam. [SEP] school",
            "I will go to school today to take my math exam. [SEP] exam",
            "I will go to school today to take my math exam. [SEP] math",
          ], src_lang='en').question()

@andre-macdonald
Copy link
Author

T2T REC API N_WORK
What am I doing wrong?

@artitw
Copy link
Owner

artitw commented May 29, 2021

Looks like a previous cell assigning the value for the variable bio_str has not been executed. Try running that, or just replace that line with your own text.

@andre-macdonald
Copy link
Author

Could you pleas provide an example screen shot of what you mean. I don't know how to code I'm learning as go. Thanks again

@artitw
Copy link
Owner

artitw commented May 29, 2021

No worries. Copy and paste the example below and adapt it to your needs. Let us know if it works, or if you get another error.

from text2text import Handler
Handler([
            "I will go to school today to take my math exam.",
            "I will go to school today to take my math exam.",
            "Tomorrow is my cousin's birthday. He will turn 24 years old.",
          ], src_lang='en').question()

@andre-macdonald
Copy link
Author

Working, Thank you so much! You're the best!

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