Coder Social home page Coder Social logo

Comments (4)

huhailinguist avatar huhailinguist commented on June 29, 2024

Hi there, if you check out the readme file, our models are actually available on huggingface e.g.: https://huggingface.co/SJTU-CL/RoBERTa-large-ArguGPT

from argugpt.

ryuryukke avatar ryuryukke commented on June 29, 2024

Sorry my question was unclear, I knew the model was available on huggingface, but is there an implementation code for the detection using ArguGPT?

Thanks.

from argugpt.

yikang0131 avatar yikang0131 commented on June 29, 2024

Hi, we have released two detectors (document-level and sentence-level)

Note that the document should be no longer than 512 tokens for doc-level detector. While there is no upper limit for sent-level detector (but it takes longer for gpu/cpu to predict the results).

You can deploy the doc-level detector as following:

from transformers import pipeline
pipe = pipeline("text-classification", model="SJTU-CL/RoBERTa-large-ArguGPT")
result = pipe({your_essay})[0]
label, prob = result['label'], result['score']

To implement the sent-level detector, you can refer to the codes in our huggingface space: https://huggingface.co/spaces/SJTU-CL/argugpt-detector/blob/main/app.py
We first split the essay into sentences, predicting the label and prob of each sentence (predict_one_sent); then we compute the overall score of the whole document (predict_doc)

from argugpt.

ryuryukke avatar ryuryukke commented on June 29, 2024

Thank you so much for your detailed comments! I'll close this issue.

from argugpt.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.