readme: ---
  license: apache-2.0
  tags:
  - generated_from_trainer
  metrics:
  - accuracy
  - f1
  model-index:
  - name: distilbert-base-uncased-finetuned-greenplastics-3
    results: []
  widget:
  - text: >-
      The present disclosure relates to a process for recycling of plastic waste
      comprising: segregating plastic waste collected from various sources
      followed by cleaning of the segregated plastic waste to obtain segregated
      cleaned waste; grinding of the segregated cleaned waste to obtain grinded
      waste; introducing the grinded waste into an extrusion line having a venting
      extruder component as part of the extrusion line, to obtain molten plastic;
      and removing the impurities by vacuum venting of the molten plastic to
      obtained recycled plastic free from impurities. The present disclosure
      further relates to various articles like Industrial Post Recycled (IPR)
      plastic tubes, blow moulded bottles, pallates, manufactured from the
      recycled plastic waste.
  language:
  - en
  pipeline_tag: text-classification
  library_name: transformers
  datasets:
  - cwinkler/patents_green_plastics
  ---
  
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
  should probably proofread and complete it, then remove this comment. -->
  
  # Classification of patent abstracts - "Green Plastics" or "No Green Plastics"
  
  This model (distilbert-base-uncased-finetuned-greenplastics-3) classifies patents into "green plastics" or "no green plastics" by their abstracts.
  
  The model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the [green plastics dataset](https://huggingface.co/datasets/cwinkler/patents_green_plastics) (11.196 samples of patent abstracts). The green plastics dataset was split into 70 % training data and 30 % test data (using ".train_test_split(test_size=0.3)").
  The model achieves the following results on the evaluation set:
  
  - Accuracy: 0.8574
  - F1: 0.8573
  
  The maximum number of taining steps was set to 200 to avoid overfitting. I considered an accuracy of 0.8574 to be suitable for the task. Further training would lead to a high accuracy but testing the final model with random examples was not really satisfying. That is why I chose to limit the training steps.
  
  ## EPO - CodeFest on Green Plastics
  
  The model has been developed for submission to the [CodeFest on Green Plastics](https://www.epo.org/news-events/in-focus/codefest.html) by the European Patent Office (EPO).
  
  The task:
  
  **_"To develop creative and reliable artificial intelligence (AI) models for automating the identification of patents related to green plastics."_**
  
  ## How to use the model
  
  ```python
  from transformers import pipeline
  
  model_id = "cwinkler/distilbert-base-uncased-finetuned-greenplastics-3"
  classifier = pipeline("text-classification", model=model_id)
  
  your_abstract = <insert_your_abstract_here_as_a_string>
  # e.g. your_abstract = "The present disclosure relates to a process for recycling of plastic waste comprising: segregating plastic waste collected from various sources followed by cleaning of the segregated plastic waste to obtain segregated cleaned waste; grinding of the segregated cleaned waste to obtain grinded waste; introducing the grinded waste into an extrusion line having a venting extruder component as part of the extrusion line, to obtain molten plastic; and removing the impurities by vacuum venting of the molten plastic to obtained recycled plastic free from impurities. The present disclosure further relates to various articles like Industrial Post Recycled (IPR) plastic tubes, blow moulded bottles, pallates, manufactured from the recycled plastic waste."
  preds = classifier(your_abstract, return_all_scores=True)
  print(preds)
  ```
  
  ## Examples
  
  Following examples are randomly chosen abstracts from patent literature.
  
  ### "Green Plastics"
  
  - "A process and plant for the thermolytic conversion of waste organic materials into desirable hydrocarbon products involve the steps of delivering melted waste material 11 5 to one or more pyrolysis chambers 26 via heated and valved manifolds 22 and effecting pyrolysis of the waste material into a gaseous state in an oxygen purged and pressure controlled environment. Pyrolytic gases are then trans erred to one or more condensers 30a to distil and cool product hydrocarbons into their respective fractions. Includes the melting of waste (plastic) material 11 before delivery ir to any of the pyrolysis chambers 10 26, making the recovery of hydrocarbon material semi-continuous, directing melted waste material into one or more, but preferably four, pyrolysis chambers 26ab,c,d, making each chamber capable of independent operation. Included is mechanically removing waste char from walls of the pyrolysis chamber 107 by rotary blades and removal of char from the chamber 107 by use of an inernal auger 112 or other suitable 15 means."\
  **score: 0.696**
  
  - "A trash sorting and recycling method, a tras