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

Some issues about inference #1

Open
HuichiZhou opened this issue Mar 24, 2024 · 0 comments
Open

Some issues about inference #1

HuichiZhou opened this issue Mar 24, 2024 · 0 comments

Comments

@HuichiZhou
Copy link

When I use the following model to inference,
code1 is a normal code, and code2 is a random string, why the output is true?

from transformers import pipeline

pipe = pipeline(model="Lazyhope/python-clone-detection", trust_remote_code=True)
code1 = """h = int(input()) ans = 0 n_enemy = 1 while h > 1: h //= 2 ans += n_enemy n_enemy *= 2 if h == 1: ans += n_enemy print(ans)"""
code2 = """123456789"""
is_clone = pipe((code1, code2))
is_clone

{False: 0.01862591877579689, True: 0.9813740849494934}

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

1 participant